-
I've followed the set-up guide by Stux and got the jlmkr configured with dockage, got one container running after a bit of back and forth - learning curve of linux... my another container to migrate from Charts is Zigbee2MQTT (z2m) - I got it running but not in a consistent way and I cannot figure out what's causing the issue - it's the USB Zigbee stick mounting point that's not always present causing the container to fail at startup. This was not a problem with TrueCharts app - it was hardrock stable thus I do not believe this has anything to do with the stick itself, USB port etc. Error from z2m container's terminal:
I've been troubleshooting this for a few days, changing various settings in the the jail docker config, re-plugging my stick at various points, setting up symlinks etc and cannot figure it out. Here's my jlmkr docker config:
Here's my z2m compose:
z2m config:
Here's my USB stick, I do not use any other USB devices so it consistently appears on the same mount. You can see the permissions are extended, that's part of the troubleshooting I've done.
So the issue that I think I see is lack of the tty devices being passed over to jail - is that the case? If so, how would I do that for the docker jail? Here's ls -la /dev/ in the docker jail
I found similar thread but for iocage, where it seems there's a few settings to be set which allow for usb devices to appear under /dev/ - https://www.truenas.com/community/threads/access-usb-device-from-jail-state-of-the-art-method.107972/ so it is possible. I do not see any errors in the jails logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
So I'm digging deeper and deeper into this rabbit hole and my assumption is that the devices is not visible within the jail due to devfs rules config. I've found few sources where similar config is applied, but each seems outdated as things like service devfs restart do not seem to work in TrueNAS Scale right now. Does anyone have the wits to advise what and where has to be applied to make it work? I can do the startup script once I know it works... What I found: https://www.truenas.com/community/threads/apply-devfs-rules-in-a-jail.26589/ and https://forums.freebsd.org/threads/devfs-restart-causes-warning-mounting-usbs-is-awful-experience.76892/ Here's a guide which lists steps to create a script which re-creates devfs rule at startup as its lost during host reboot - which I think could be the issue I've seen i.e. along the way I've applied a rule which allowed for the device to appear in jail, was happy, started working on a next task and after one of the follow-up restarts noticed the passthrough is not working anymore, unfortunately I do not know what rule I've applied at that time... |
Beta Was this translation helpful? Give feedback.
-
Just dropping my thoughts; I'm using USB passthrough for usb-zigbee device that is used by HA container and these two work nicely. I'm passing /dev/serial/by-id/device and from what I can see from your docker config the bind is not complete. Not sure if your paste was incomplete but maybe check that one out. My docker config is like this: |
Beta Was this translation helpful? Give feedback.
Those articles don't apply to TrueNAS SCALE. SCALE is Linux, the articles you've linked are about FreeBSD. Jailmaker doesn't actually make jails, that's a FreeBSD thing. I misused the term jails, sorry for the confusion. I don't use USB devices on SCALE so I can't help you with your USB passthrough issue. Perhaps post your question in the forum too. I'm sure there are people using USB passthrough successfully with jailmaker.