-
-
Notifications
You must be signed in to change notification settings - Fork 359
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 2.8.1-3 "Can't claim USB device [051d:0002]@0/0: Entity not found" using usbhid-ups #2666
Comments
I thought removing and installing the package again might solve the problem. I also removed But somehow, the directory So I did this:
And now:
Somehow, I made it worse... But I don't understand how installing the packages again fails to install these files...? EDIT But |
I believe some answers around this general issue are in the mailing list. As for packaging, NUT team does not impact it directly, so it is technically a distro matter. That said, probably different packages defined for NUT there which deliver files which might need configuration files, all deliver the |
Of course I didn't expect my amended config files to appear. :) But the standard ones - which were installed when I first installed NUT, didn't reappear... I manually added Anyway, I had hoped this reinstall would have reset all the permissions. But I was wrong... But it looks like I'm where I started out; so maybe no harm no foul? |
Probably no foul. As you edited Re-check if the unit does exist and does not complain (like on the mailing list) - if so, go on to |
I'm not sure I fully understand what you mean... I'm not really a Linux master :) But here are some outputs:
There seem to be some problems with |
Looks great actually:
(if on the same machine as WARNING: The
This usually means either mismatch between I am a bit puzzled about |
Indeed:
I had hoped a fresh install would have reset all the permissions... Do you have any idea which commands might fix the permissions issues? |
Looking at your earlier post, the Also note, with an APC BX###MI device, #2565 and related issues and PRs may be relevant. That fix is not part of a released version yet though, so if you'd end up needing it before a release is cut and gets through distro packaging queues - a custom build would be required, e.g. per https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests |
As for file permissions, can you post |
I see... Shame on me for following the guide, and not reading the readme. I did that eventually for a few other conf files, but not this one... I assume this would be better?
? (I'll have access to the Linux server later today; I'll run |
Well, coming from legacy long ago, before my time, that
|
So it should be:
? |
Maybe, if it does work to mix it like that. If something still complains, separate this into two users for two use-cases, e.g.:
(and then use |
Thanks for all your time and effort, @jimklimov! Although we're not out of the woods yet, I'm afraid... Now
(Although I don't understand where this
Now:
Unfortunately, even after a Linux reboot, still:
As requested:
EDIT
But trying it again, resulted in failure again:
Puzzling... |
Looks cool about getting the driver and I think I think with #1917 in NUT v2.8.1 the driver program should have tried to communicate with the previous instance over its local socket (same as communications with |
Also note, that if you get You may be after |
Alternately, you can try sending commands to the UPS (using the |
The UPS didn't power cylce.
The Linux box shut down, but the UPS didn't power cycle...
You mean like so:
? Unfortunately, again no power cycle. (I've got a table lamp lit, so a power loss should be visible.) |
Looking at current code for the driver, the command sequence in Lines 969 to 993 in d244d73
|
I assume you mean the other options mentioned in that Java code?
No power cycle... I also tried:
But no effect on the lamp. FYI:
|
"OK" there means the command was accepted by the driver. Please try It may also be that the device model/firmware does not actually support that command, or we poke a wrong USB endpoint for that (e.g. worked for other related devices but not this one). |
And that's plain old C code ;) |
But no effect on the lamp...
What would that mean for my setup? End of the line? Or are there more avenues to be walked? :) |
Does this mean I uninstalled the packaged NUT? Should I reinstall it? But maybe first |
Seems so, wouldn't hurt to redo it cleanly. |
Hooray!
But changing
And I believe the variable should be changeable?
|
In your latest |
That was it. I should have read that... Apologies. Alas, no success:
Also, the battery allegedly is at 14 % again? |
It seems so, despite the somewhat reasonable 12.5V (might go up to 13.8 or so when fully charged though). Did you check with |
As for the battery, perhaps check it by leaving the UPS unplugged with a non-critical load (like an incandescent lamp or fan) that could best emulate the power draw of your computer, and see if it holds up for minutes or seconds. If the UPS can be safely opened to check the battery visually (most are replaceable) that can also be helpful - see if it is too swollen (plastic walls are usually not perfectly flat, but swelling is distinctive), etc. There was recently a discussion ported to Wiki about how different community members revise the replacement batteries they order (nominal vs factual weight, etc.) - maybe yours is indeed defective? See https://github.com/networkupstools/nut/wiki/Choosing-replacement-batteries-for-an-UPS |
But the UPS has been plugged in the entire time, and the value read
I'll check later today. Maybe the command threw off the |
Should not have... Although it's anyone's guess what the black box on the other side of the protocol does. One more guess I had is that some drivers map a number of hardware values (different USB or SNMP readings are mapped to same NUT names in different HW/FW of related models). But in case of |
A few hours ago, this was still the reading:
But now it's this:
The UPS works in mysterious ways... Now of course the next step is to actually make sure a power race can be avoided. |
Also a gentle reminder - if you got the code base from that PR #2750 built, would be great to check if the driver program would finally start for its shutdown mode ( |
I first tried I uninstalled the git installation, installed the package, and then reinstalled the git installation. This time the installation took forever! Now this is the output:
No success, the UPS never powered down. I did the same with the UPS unplugged from the power outlet. It looks to me like the same output:
However! When I plugged the UPS back in, it restarted! So the power race was avoided. Or was that the power race, I forgot the exact terminology. |
My Linux box did shut down seconds after unplugging the UPS, and I don't really understand why... Some relevant file configs here
&
I checked the logs, and I don't see any of these log entries...:
Maybe this was a problem:
So I did this:
|
So... quite a few things pop out, many about permissions: In the first test, as In the latest (with The quick shutdown remains questionable, maybe FSD conditions struck. On the upside, Tests with I wonder if due to the mix of packaging and manual installation, there was an older (packaged) driver program running as driver service, started before you |
Should I run
Is it possible to checks some logs to find out which FSD (which I assume stands for "forced shutdown"?) condition possibly struck?
My initial response was "no", since I only used the command you gave above. But I checked the wiki, and took a closer look at that command. So I now think I did indeed stop the services:
|
That I'm getting a bit lost about which driver programs you do actually have running or not when testing the new build for its shutdown ability. Can you please review the basics like |
|
Thanks, so at the moment at least By With |
With this driver running under systemd, we do not see in console log of the However, especially if the log verbosity is high enough (e.g. temporary |
I'm afraid you lost me on most of what you said, but I added the debug part:
|
But I just reinstalled the packaged NUT, no? Or was/is there maybe still some packaged version lingering on my system? |
Well, that's what I suspected (and IIRC it was the case when this discussion started - you had a NUT v2.8.1 package)... |
I'm afraid I lost track myself... Should I try to uninstall everything? If so, could you recommend the exact commands? That way we avoid the risk of me doing it halfheartedly. |
Hi Jim, I understand you want to close this issue, but could you help me with this last step of uninstalling every and all package NUT installs? :) |
Oh, the close was automatic due to PR merge, sorry about that. I'll try to take a look at the questions tomorrow, dayjob work load is coming back after team's vacations... |
Aha, I already found it an unexpected turn of events 😅 There's no rush, of course! |
So, I guess a prudent way forward to ensure there's only one NUT to consider in the system and there are no conflicts would be to back up Verify whether the In the build workspace you had, also With no installation to inherit "in-place" settings from, you may have to pass them explicitly when rebuilding NUT.
NOTE: The NOTE: If you want to fully match what the packaging delivers, check the huge list of options at https://github.com/networkupstools/nut/wiki/Building-NUT-on-Debian,-Raspbian-and-Ubuntu or the current definition at https://salsa.debian.org/debian/nut/-/blob/debian/debian/rules Picking up the installation and service activation from Wiki:
Note that the With current NUT |
Thanks Jim! I checked for the details of user ´nut´:
I uninstalled the packages. The user and group
I then ran I thought to go for the full monty, so I then ran the following command:
I then ran your suggested installation command:
I'll try to test how this works asap. (The output was too big, it's in this .txt file: nut-installation-output.txt.) |
Hi all,
Yesterday, I bought a UPS for the first time in my life, and was eager to dive into NUT. But not all is working as expected... I saw a similar thread started on 18 October, but it didn't help me. (I also spent a handful of hours searching the web for solutions, and of course read the manual and FAQ - "queequeg".)
I tried shutting my UPS (APC "Back-UPS BX750MI FW:295202G -302202G") down with
sudo upsdrvctl shutdown
, but no response. Digging around, I found a few things that raised my suspicion, but I can't figure it out...I followed this fine gentleman's guide (but tweaked it a bit - I don't know why he uses
master
andslave
for example?): https://technotim.live/posts/NUT-server-guide/.I must add that I created a few users and user groups during installation and configuration, following the documentation. But in the end, I lost oversight, and everything didn't work. So it's entirely possible there's a permissions issue somewhere. But I don't have any idea where...
Because of the trial-and-error approach, in the
.conf
files (shown below), a lot of stuff is commented out. I assume I can delete it, but I also assume the#
should be adequate? Anyway, I keep it in the output below for clarity.I'll just paste various outputs here, I hope that's a reasonable approach?
Thanks in advance for anyone's help!
Kind regards,
Erik
This seems strange? But after some googling, I found the below alternative - although I would expect it to work without
/lib/nut/
):The text was updated successfully, but these errors were encountered: