Everything was hunky dory. I was going to add zigbee and rebooted box after attaching the adapter. Then my zwave-js-ui stopped working. I get the message when I try to start the container:
driver failed programming external connectivity on endpoint zwave-js-ui (6242415d27ff4a6bc545c880a1e699b38cbf04533268848efacc6ed865398129): Error starting userland proxy: listen tcp4 0.0.0.0:8091: bind: address already in use
I’ve checked and nothing else is using port 8091.
I’ve tried many things including stopping all of the other containers and trying to start just that one. I’ve checked my config file and I think stuff looks good there. Thoughts on next steps?
Here is my docker-compose with passwords replaced by asterisk. The frigate is very basic as I did one camera for a quick test and will be building it out further.
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
restart: unless-stopped
ports:
- "9000:9000/tcp"
- "9443:9443/tcp"
environment:
- TZ=America/New_York
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- /opt/portainer/data:/data
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto
restart: unless-stopped
ports:
- "1883:1883/tcp"
environment:
- TZ=America/New_York
volumes:
- /opt/mosquitto/config:/mosquitto/config
- /opt/mosquitto/data:/mosquitto/data
- /opt/mosquitto/log:/mosquitto/log
stdin_open: true
tty: true
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: always
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=*******************
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want log times and dates to match your timezone instead of UTC
# Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#- TZ=America/New_York
networks:
- zwave
devices:
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
- '/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_ce6f950cbb21ec118280b9942c86906c-if00-port0:/dev/zwave'
volumes:
- zwave-config:/opt/z-wave-js:/usr/src/app/store
# Or by using local folder
# - ./store:/usr/src/app/store
ports:
- "8091:8091" # port for web interface
- "3000:3000" # port for Z-Wave JS websocket server
frigate:
container_name: frigate
#privileged: true # this may not be necessary for all setups
restart: always
image: blakeblackshear/frigate:stable-amd64
#shm_size: "64mb" # update for your cameras based on calculation above
#devices:
# - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
# - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
# - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /Home/ha/frigate/config.yml:/config/config.yml:ro
- /Home/ha/frigate/media:/media/frigate
# - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
# target: /tmp/cache
# tmpfs:
# size: 1000000000
ports:
- "5000:5000"
- "1935:1935"
environment:
FRIGATE_RTSP_PASSWORD: "***********"
networks:
zwave:
name: zwave
volumes:
zwave-config:
name: zwave-config
Also “docker ps” at command line and verify the container is not running
Ive had a docker container fail to start like this where a stopped or deleted container is somehow still bound to port and prevent container start. Maybe it took 1 or 2 reboots of host, i forget, but ultimately docker will show bound container as running or correctly shows it as stopped and allows container start.
Your log says port 8091 is already in use. Do you have multiple instances of zwavejsui running? I would go into portainer and see if it is running twice. You would need to remove any old container or duplicate instances, and then run your compose to add it again. Since the config settings are stored in the persistent volume you have, removing the containers and then reinstalling won’t lose any data - it would be the same process you use when you update a container - pull new image, stop old container, remove old container, run compose to install new container with new image.
You can also try running sudo lsof -i:8091
to see what is using the port
Yes, tried this earlier, too. Forgot that I got this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1286 root 19u IPv4 18186 0t0 TCP localhost:8091 (LISTEN)
I couldn’t figure out what that went to, got distracted, and forgot about it…
So this is interesting:
UID PID PPID C STIME TTY TIME CMD
root 1286 650 0 11:44 ? 00:00:02 /snap/zwave-js-ui/136/bin/no
Yet my portainer shows it’s not running and no IP – EDIT: it’s showing an IP. It wasn’t earlier. I’m not able to access the web interface from the FTP.
Okay gents, this is weird…I can access it from http://localhost:8091. So what the heck is going on? Nothing is configured in this and it looks different than I remember. What in sam hill??
I unplugged the z-wave adapter and restarted…no change.
I commented out the whole z-wave section of my docker compose and ran docker compose -d --remove-orphans and it showed it was removed…and I can still access via localhost:8091. So…where the heck is this thing launching from???
Yes, interesting. I was able to stop the snap service and then spin up my container and now container isn’t erroring out.
However, how the heck did the snap get installed and how do I get rid of it. I tried to disable it and it says it’s not installed.
snap services
Service Startup Current Notes
zwave-js-ui.zwave-js-ui enabled active -
zwavejs2mqtt.zwavejs2mqtt disabled inactive -
sudo snap disable zwave-js-ui.zwave-js-ui
error: snap "zwave-js-ui.zwave-js-ui" is not installed
Not sure what to do next. Also, the container was given a new network and so HA zwave-js-ui integration cannot connect to my container. Do you know if there is a way to change the IP it’s pointing to?
If you install Home assistant container in host networking mode (which is what the documentation says and necessary for many integrations to work) then it wont be in the same docker network as zwavejsui and wont be accessible by container name.
If homeassistant is in host networking mode, zwavejsui is configured to map port 3000 to the host, and they are on the same machine, you should be able to just readd the zwavejs integration and specify
ws://localhost:3000 as the url.
Using localhost will make any changes to the docker ip for the zwavejs container not impact the connection , since port 3000 will always be bound to the host machine.
So, this was not working. I finally figured out that I had to tick on the WS server in the z-wave-js gui. I also lost my security keys in the process, and generating new ones means excluding and including all of my devices again. THANKFULLY most of my devices haven’t been added yet because they are in-wall switches that I haven’t yet installed after uninstalling them from my old house.
Still zero clue how the snap version got installed (I took no steps to do this). Anyone have any thoughts on that? This has been working great for 6 weeks until a couple of days ago and they only new thing added was that zigbee radio. Could Debian have installed the snap version just based on me plugging it in and rebooting (akin to Windows finding a driver)?