Closed eyduh closed 3 years ago
Finding the device is an expensive and time consuming operation. It is stable on most systems. Therefore the results are cached in devices.json
. In the event that the address changes it's possible to use the Reset button to clear everything and get it again. But I take your point that the error message isn't great. I'll raise an issue to fix that.
In your case, however, is there not a solution in the way you map the device? Scanimage thinks it's deviceId: 'epson2:libusb:005:002'
so would this work? i.e. you just change the left side of the mapping with the changed device but keep the right side stable?
- /dev/bus/009/002:/dev/bus/005/002
You could automate this with a bit of lsusb
and cut or awk.
In your case, however, is there not a solution in the way you map the device? Scanimage thinks it's
deviceId: 'epson2:libusb:005:002'
so would this work? i.e. you just change the left side of the mapping with the changed device but keep the right side stable?
Funny you should mention that.. I did try this at first but portainer threw an error when creating the stack. I'll have a go again and see what it actually says. Here we go:
Failure
Recreating scanserver_scanserver_1 ... [1A[2K Recreating scanserver_scanserver_1 ... [31merror[0m [1B ERROR: for scanserver_scanserver_1 Cannot start service scanserver: error gathering device information while adding custom device "/dev/bus/009/002": no such file or directory ERROR: for scanserver Cannot start service scanserver: error gathering device information while adding custom device "/dev/bus/009/002": no such file or directory Encountered errors while bringing up the project.
Superweird that it can't find the device when it is mapped to the old location but when I map it to the same location as on the host it works fine. I'll try and attach to the console of the container and edit devices.json
directly.
Strange. TBH I think the bigger issue, for me at least, is why the usb port id is changing. I have a feeling it's because it's running under a VM host. I can't find an exact match when searching, but this looks similar. And this too.
Both seem to point towards adding some udev rules. If that route worked then it would avoid having to re-find the scanner each time.
Closing due to inactivity. Please re-open if you find new information and I can help.
@sbs20 did you already implement a better error notification? I just ask because I had the same problem like @eyduh.
Did I get that right: I need to tell my debian system to give this device always the same usb-id?
Yes, you should now see "No devices found" or similar. I'm afraid I don't have sufficient information about the problem you're seeing to know the solution.
But if your USB id keeps changing then the solution you propose should help.
Unclear error message after restarting the host of the container. Logs indicate updated device mapping not applied and scanner still using old.
To Reproduce Steps to reproduce the behavior: Reboot host. Reconfigure Device mapping after USB paths changed. Try to scan, web gui says it's using new device mapping but logs point to the old one.
Expected behavior Scanning like prior to reboot.
Screenshots
Client (please complete the following information):
Server (please complete the following information): DietPi x86_64 Docker 20.10.3 CE Deployed server through Portainer 2.1.1
Using
where /dev/bus/00/00 changes with host reboots and is updated manually.
Logs
Additional context The docker host is running as a QEMU/KVM guest under proxmox with the USB Vendor/Device ID passed through to Docker host.
output of some other troubleshooting (scan server console through portainer):
scanimage:
The Web GUI and scanimage results indicate the new device map has been applied but logs indicate scan/preview still uses old device mapping.