-
-
Notifications
You must be signed in to change notification settings - Fork 211
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Zwavejsui-ui container not started automatically (RPI) #3646
Comments
Apologies that I lost the formatting in the initial post. Here a retry: This is my docker-compose.yml:
This is my Mosquitto docker-compose.yaml:
|
@hvoorend I don't see any issue on your docker-compose file, did you try to check if on boot there is any error that prevents the container to start for some reason? Because AFAIK starting it with |
Thanks Robert, good to know that docker-compose up -d should be enough. I will go through my logs and see if I can find any issues. |
Ok let me know 🙏🏼 |
Will sure do. Pls. allow me to find a bit of time to do my investigation. |
I've found this post that helped me out: [https://stackoverflow.com/questions/64644587/containers-not-restarted-after-update-with-restart-always-in-docker-compose-yml]. ``` root@raspberrypi:~# docker inspect zwave-js-ui | grep -i restart -A 5
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 18334,
"ExitCode": 0,
"Error": "",
--
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
--
"RestartPolicy": {
"Name": "unless-stopped",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
So I've updated the Restart Policy for my container with: docker update zwave-js-ui --restart always
Redisplaying the Restart Policy now showed: "Name": "always" (see below).
Rebooted and all came up automatically. Same for power off/on. Issue solved.
Good learning experience. Hope this explanation will help someone if he/she runs into this issue.
/root@raspberrypi:~# docker inspect zwave-js-ui | grep -i restart -A 5
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 18334,
"ExitCode": 0,
"Error": "",
--
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
--
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
|
The "unless-stopped" is also in both YML files for the MQTT and the zwave-js-ui container. So I could change this to "always". But with above knowledge it can be more handy to keep it on unless-stopped in the yml's for now. |
It could be. So I can close this, right? Feel free to reopen in case |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
My MQTT-, zwavejsui-ui-, Domoticz-package runs perfectly fine and I’m happy with it. The only thing now is: my Mosquitto container is automatically started by docker-compose at RPI startup (after reboot or power on) but my zwavejs-ui container is not. I have to start it manually from /opt/zwavejs-ui/ with docker-compose up -d every time after power off/on or reboot. How can I make the zwavejsui-ui container auto start?
This is my docker-compose.yml:
pi@raspberrypi:/opt/zwavejs-ui $ cat docker-compose.yml version: "3.7" services: zwave-js-ui: container_name: zwave-js-ui image: zwavejs/zwave-js-ui:latest restart: unless-stopped tty: true stop_signal: SIGINT environment: - SESSION_SECRET=mySecretSession - TZ=Europe/Amsterdam devices: - '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave' volumes: - ./store:/usr/src/app/store ports: - "8091:8091" # port for web interface - "3000:3000" # port for Z-Wave JS websocket server
This is my Mosquitto docker-compose.yaml
`pi@raspberrypi:/opt/mosquitto $ cat docker-compose.yaml
services:
mosquitto:
restart: unless-stopped
build:
context: .
volumes:
- type: bind
source: ./config/
target: /mosquitto/config/
- type: bind
source: ./log/
target: /mosquitto/log/
- type: volume
source: data
target: /mosquitto/data/
ports:
- target: 1883
published: 1883
protocol: tcp
mode: host
- target: 9001
published: 9001
protocol: tcp
mode: host
volumes:
data:
name: "mqtt-broker-data" `
The text was updated successfully, but these errors were encountered: