Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nut_libusb_get_interrupt: Connection timed out on debug #2644

Open
masterwishx opened this issue Sep 27, 2024 · 18 comments
Open

nut_libusb_get_interrupt: Connection timed out on debug #2644

masterwishx opened this issue Sep 27, 2024 · 18 comments
Milestone

Comments

@masterwishx
Copy link
Contributor

Using NUT plugin for Unraid
When debug is on have many interrupt transfers :

have a lot of nut_libusb_get_interrupt: Connection timed out in debug log and
maybe also affect on #2643
or its just closing connection every time for cycle of reading data?

From libusb/libusb#1548 (comment) by @tormodvolden (have issues with interrupt transfers )

Mostly looks like this :

send_to_all: SETINFO driver.state "quiet"
Sep 27 09:37:30 DaRKNaS usbhid-ups[24218]: [D6:24218] send_to_all: write 29 bytes to socket 16 succeeded (ret=29): SETINFO driver.state "quiet"
Sep 27 09:37:31 DaRKNaS usbhid-ups[24218]: [D5:24218] send_to_all: SETINFO driver.state "updateinfo"
Sep 27 09:37:31 DaRKNaS usbhid-ups[24218]: [D6:24218] send_to_all: write 34 bytes to socket 16 succeeded (ret=34): SETINFO driver.state "updateinfo"
Sep 27 09:37:31 DaRKNaS usbhid-ups[24218]: [D1:24218] upsdrv_updateinfo...
Sep 27 09:37:32 DaRKNaS usbhid-ups[24218]: [D2:24218] nut_libusb_get_interrupt: Connection timed out
Sep 27 09:37:32 DaRKNaS usbhid-ups[24218]: [D1:24218] Got 0 HID objects...
Sep 27 09:37:32 DaRKNaS usbhid-ups[24218]: [D1:24218] Quick update...
Sep 27 09:37:32 DaRKNaS usbhid-ups[24218]: [D4:24218] 

image

@masterwishx
Copy link
Contributor Author

@tormodvolden @jimklimov do you think it's related to how nut proccess libusb or I can test it with xusb if it related to libusb itself?

I have also nut client on windows that read values from nut, also telegraf that read values and write to influxdbv2 for grafana dashboard.
Not shure if it can affect on isshue...

@tormodvolden
Copy link
Contributor

Is this causing a problem or is it just that you see the debug message in the log? You'll have to find out what the nut code tries to do, then what to expect from the device and libusb calls.

If you have suspicions about a libusb issue, you must provide LIBUSB_DEBUG=4 logs to start.

xusb can do some HID interrupt transfers, but I don't know if it fits with your device.

@masterwishx
Copy link
Contributor Author

Is this causing a problem or is it just that you see the debug message in the log? You'll have to find out what the nut code tries to do, then what to expect from the device and libusb calls.

Yes the problem upsrw commands not working for me , hovewer it write OK or Success #2643

@masterwishx
Copy link
Contributor Author

Is this causing a problem or is it just that you see the debug message in the log? You'll have to find out what the nut code tries to do, then what to expect from the device and libusb calls.

If you have suspicions about a libusb issue, you must provide LIBUSB_DEBUG=4 logs to start.

xusb can do some HID interrupt transfers, but I don't know if it fits with your device.

image

@tormodvolden
Copy link
Contributor

Personally I am allergic to text being pasted as images :) There are so many great tools to efficiently search and process textual information.

@masterwishx
Copy link
Contributor Author

Sorry, got it, will post the log here..

@masterwishx
Copy link
Contributor Author

Personally I am allergic to text being pasted as images :) There are so many great tools to efficiently search and process textual information.

nut debug log 1.10.24.txt

@masterwishx
Copy link
Contributor Author

Also tryed to add exported LIBUSB_DEBUG = 4 to ups.conf with debug_min = 6 but seems no effect with LIBUSB_DEBUG = 4

@tormodvolden
Copy link
Contributor

Please see #2616.

@masterwishx
Copy link
Contributor Author

Please see #2616.

Thanks, by #2616
I tryed to add LIBUSB_DEBUG = 4, but seems not worked for, I mean only debug_min=6 working by log I posted

@tormodvolden
Copy link
Contributor

Maybe bring that up in #2616, if you can't figure out how to enable this, the documentation is definitely not good enough.

@tormodvolden
Copy link
Contributor

Did you already read docs/man/nut.conf.txt ?

@masterwishx
Copy link
Contributor Author

Did you already read docs/man/nut.conf.txt ?

No just was reading #2616

@masterwishx
Copy link
Contributor Author

exported LIBUSB_DEBUG = 4

seems exported LIBUSB_DEBUG = 4 not documented yet in docs/man/nut.conf.txt
im using nut plugin for Unraid ,
So i just select UPS Driver Debug Level: 6 and its adding debug_min = 6 in ups.cong file

@tormodvolden
Copy link
Contributor

The LIBUSB_DEBUG variable is mentioned in docs/man/nut_usb_addvars.txt but docs/man/nut.conf.txt explains more in general how to set variables correctly.

@masterwishx
Copy link
Contributor Author

The LIBUSB_DEBUG variable is mentioned in docs/man/nut_usb_addvars.txt but docs/man/nut.conf.txt explains more in general how to set variables correctly.

So i added exported LIBUSB_DEBUG = 4 like in

`LIBUSB_DEBUG` before starting a NUT driver (may be set and "exported" via

my bad was i added to ups.conf instead of nut.conf

and nut started OK, if wrong variable was set in ups.conf NUT will not start .
So i added to nut.conf same effect ...

and from both logs , no info about libusb debug :

0.000000#011[D1:24188] debug level is '6'
0.000008#011[D5:24188] send_to_all: SETINFO driver.debug "6"
0.000021#011[D5:24188] send_to_all: SETFLAGS driver.debug RW NUMBER

@tormodvolden
Copy link
Contributor

What does docs/man/nut.conf.txt say about spaces? :)

@masterwishx
Copy link
Contributor Author

What does docs/man/nut.conf.txt say about spaces? :)

:) OK Got it, i will try it
but in nut plugin for Unraid that im using all config with spaces around equal , sorry for picture:

image

image

@jimklimov jimklimov added this to the 2.8.4 milestone Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants