Project

General

Profile

Bug #66844

Serial Ups will not work on reboot.

Added by Tim Rossolille 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
No priority
Assignee:
Alexander Motin
Category:
Hardware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Cannot Reproduce
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I have a HP R1500XR connected to uart2 /dev/cuau2 serial port is sunix ser5xxxx driver loads and i can connect to serial terminal fine, But when configuring ups I have to try multiple times before it will connect. Connection refused error if i select cuau0 then save then select cuau2 then save it will finally connect and everything works great until i reboot then i have to do it all over again until it connects. Freenas 11.1U6 any help why it will not work after reboot would be great thanks. Also tried a usb2serial adapter and works great even after reboot but not serial port.

Dec 25 06:52:14 freenas1 uart2: <Sunix SER5xxxx Serial Port> port 0xe020-0xe03f,0xe000-0xe01f irq 66 at device 0.0 numa-domain 1 on pci15
Dec 25 07:11:04 freenas1 upsmon8109: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 25 07:11:04 freenas1 upsmon8109: UPS ups is unavailable
Dec 25 07:11:25 freenas1 upsmon8108: upsmon parent: read

Dec 29 05:03:47 freenas1 upssched6432: Event: COMMBAD
Dec 29 05:03:47 freenas1 upsmon6428: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:03:49 freenas1 upsmon6428: Signal 15: exiting
Dec 29 05:03:49 freenas1 upslog6454: Signal 15: exiting
Dec 29 05:03:51 freenas1 bcmxcp6407: Signal 15: exiting
Dec 29 05:04:02 freenas1 upssched6432: Timer queue empty, exiting
Dec 29 05:04:02 freenas1 upsmon6427: upsmon parent: read
Dec 29 05:04:32 freenas1 upsmon6828: Startup successful
Dec 29 05:04:32 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:32 freenas1 upsmon6829: Communications with UPS ups lost
Dec 29 05:04:32 freenas1 upssched6833: Timer daemon started
Dec 29 05:04:32 freenas1 upslog6855: Startup successful
Dec 29 05:04:32 freenas1 upssched6833: New timer: COMMBAD (10 seconds)
Dec 29 05:04:37 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:37 freenas1 upsmon6829: UPS ups is unavailable
Dec 29 05:04:37 freenas1 upssched6859: Executing command: EMAIL
Dec 29 05:04:42 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:42 freenas1 upsmon6829: Signal 15: exiting
Dec 29 05:04:42 freenas1 upslog6855: Signal 15: exiting
Dec 29 05:04:42 freenas1 upssched6833: Event: COMMBAD
Dec 29 05:04:58 freenas1 upssched6833: Timer queue empty, exiting
Dec 29 05:04:58 freenas1 upsmon6828: upsmon parent: read
Dec 29 05:05:27 freenas1 bcmxcp7200: Startup successful
Dec 29 05:05:27 freenas1 upsmon7217: Startup successful
Dec 29 05:05:27 freenas1 upsmon7218: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:05:27 freenas1 upsmon7218: Communications with UPS ups lost
Dec 29 05:05:27 freenas1 upssched7222: Timer daemon started
Dec 29 05:05:27 freenas1 upslog7244: Startup successful

Dec 29 09:28:39 freenas1 bcmxcp20846: Startup successful
Dec 29 09:28:41 freenas1 upsd8378: Connected to UPS [ups]: bcmxcp-ups
Dec 29 09:28:41 freenas1 upsmon8402: Communications with UPS ups established
Dec 29 09:28:41 freenas1 upssched20850: Timer daemon started
Dec 29 09:28:41 freenas1 upssched20850: Cancel COMMBAD, event: COMMOK
Dec 29 09:28:54 freenas1 upssched20850: Timer queue empty, exiting
Dec 29 12:54:50 freenas1 upsd8378: User logged out from UPS [ups]
Dec 29 14:40:59 freenas1 upsd8378: User logged into UPS [ups]

History

#1 Updated by Dru Lavigne 7 months ago

  • Assignee changed from Release Council to Alexander Motin

#2 Updated by Tim Rossolille 7 months ago

  • File daemon.txt added
  • File messages.txt added

Tim Rossolille wrote:

I have a HP R1500XR connected to uart2 /dev/cuau2 serial port is sunix ser5xxxx driver loads and i can connect to serial terminal fine, But when configuring ups I have to try multiple times before it will connect. Connection refused error if i select cuau0 then save then select cuau2 then save it will finally connect and everything works great until i reboot then i have to do it all over again until it connects. Freenas 11.1U6 any help why it will not work after reboot would be great thanks. Also tried a usb2serial adapter and works great even after reboot but not serial port.

Dec 25 06:52:14 freenas1 uart2: <Sunix SER5xxxx Serial Port> port 0xe020-0xe03f,0xe000-0xe01f irq 66 at device 0.0 numa-domain 1 on pci15
Dec 25 07:11:04 freenas1 upsmon8109: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 25 07:11:04 freenas1 upsmon8109: UPS ups is unavailable
Dec 25 07:11:25 freenas1 upsmon8108: upsmon parent: read

Dec 29 05:03:47 freenas1 upssched6432: Event: COMMBAD
Dec 29 05:03:47 freenas1 upsmon6428: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:03:49 freenas1 upsmon6428: Signal 15: exiting
Dec 29 05:03:49 freenas1 upslog6454: Signal 15: exiting
Dec 29 05:03:51 freenas1 bcmxcp6407: Signal 15: exiting
Dec 29 05:04:02 freenas1 upssched6432: Timer queue empty, exiting
Dec 29 05:04:02 freenas1 upsmon6427: upsmon parent: read
Dec 29 05:04:32 freenas1 upsmon6828: Startup successful
Dec 29 05:04:32 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:32 freenas1 upsmon6829: Communications with UPS ups lost
Dec 29 05:04:32 freenas1 upssched6833: Timer daemon started
Dec 29 05:04:32 freenas1 upslog6855: Startup successful
Dec 29 05:04:32 freenas1 upssched6833: New timer: COMMBAD (10 seconds)
Dec 29 05:04:37 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:37 freenas1 upsmon6829: UPS ups is unavailable
Dec 29 05:04:37 freenas1 upssched6859: Executing command: EMAIL
Dec 29 05:04:42 freenas1 upsmon6829: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:04:42 freenas1 upsmon6829: Signal 15: exiting
Dec 29 05:04:42 freenas1 upslog6855: Signal 15: exiting
Dec 29 05:04:42 freenas1 upssched6833: Event: COMMBAD
Dec 29 05:04:58 freenas1 upssched6833: Timer queue empty, exiting
Dec 29 05:04:58 freenas1 upsmon6828: upsmon parent: read
Dec 29 05:05:27 freenas1 bcmxcp7200: Startup successful
Dec 29 05:05:27 freenas1 upsmon7217: Startup successful
Dec 29 05:05:27 freenas1 upsmon7218: UPS [ups]: connect failed: Connection failure: Connection refused
Dec 29 05:05:27 freenas1 upsmon7218: Communications with UPS ups lost
Dec 29 05:05:27 freenas1 upssched7222: Timer daemon started
Dec 29 05:05:27 freenas1 upslog7244: Startup successful

Dec 29 09:28:39 freenas1 bcmxcp20846: Startup successful
Dec 29 09:28:41 freenas1 upsd8378: Connected to UPS [ups]: bcmxcp-ups
Dec 29 09:28:41 freenas1 upsmon8402: Communications with UPS ups established
Dec 29 09:28:41 freenas1 upssched20850: Timer daemon started
Dec 29 09:28:41 freenas1 upssched20850: Cancel COMMBAD, event: COMMOK
Dec 29 09:28:54 freenas1 upssched20850: Timer queue empty, exiting
Dec 29 12:54:50 freenas1 upsd8378: User logged out from UPS [ups]
Dec 29 14:40:59 freenas1 upsd8378: User logged into UPS [ups]

I was correct with the pid not being created. I have found a way to make it work after reboot still get errors till fix starts then all ok.

Fix was to add task command /usr/local/sbin/upsd and postinit enabled. I am sure this is not the correct way but works now every time.

Not sure why it does not have this problem with usb2serial cable only serial port. could it be that my serial port is cuau2 witch would be 3rd serial port or just something wrong in the way it calls upsd with serial from config screen?

#3 Updated by Tim Rossolille 7 months ago

  • File deleted (messages.txt)

#4 Updated by Tim Rossolille 7 months ago

  • File deleted (daemon.txt)

#5 Updated by Alexander Motin 6 months ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

Unfortunately in provided debug I see no reason why it fails on boot. Most of logs you provided is a useless noise from other service daemons trying to talk to upsd. You must look for some error messages from upsd and bcmxcp processes. In provided daemon.txt I see only:

Dec 29 09:27:52 freenas1 bcmxcp[8376]: Signal 15: exiting
Dec 29 09:27:52 freenas1 upsd[8378]: Can't connect to UPS [ups] (bcmxcp-ups): No such file or directory

, but I have no idea what that means.

I'd make sure that first serial port is not used by anything else, like FreeNAS serial console. Unfortunately without full provided debug I can't say that.

What's about the proper way to start nutd, it would sound as `service nut start`.

#6 Updated by Tim Rossolille 6 months ago

Not sure what else i can provide, The only thing i noticed was pid was not being created for upsd. I kept trying different things including setting a command to call upsd at post and that worked. now after update i no longer need to use command upsd it just works every reboot seems to be good now.
I was on 11-1u6 now 11-1u6.3.

Alexander Motin wrote:

Unfortunately in provided debug I see no reason why it fails on boot. Most of logs you provided is a useless noise from other service daemons trying to talk to upsd. You must look for some error messages from upsd and bcmxcp processes. In provided daemon.txt I see only:
[...]
, but I have no idea what that means.

I'd make sure that first serial port is not used by anything else, like FreeNAS serial console. Unfortunately without full provided debug I can't say that.

What's about the proper way to start nutd, it would sound as `service nut start`.

#7 Updated by Alexander Motin 6 months ago

  • Status changed from Blocked to Closed
  • Target version changed from Backlog to N/A
  • Reason for Closing set to Cannot Reproduce
  • Reason for Blocked deleted (Need additional information from Author)

If it works now, then so be it, great. We really have no abilities to debug each specific UPS driver.

#8 Updated by Dru Lavigne 6 months ago

  • File deleted (daemon.txt)

#9 Updated by Dru Lavigne 6 months ago

  • File deleted (messages.txt)

Also available in: Atom PDF