Skip to content
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

Permission Errors #159

Open
gregg098 opened this issue Aug 29, 2020 · 2 comments
Open

Permission Errors #159

gregg098 opened this issue Aug 29, 2020 · 2 comments

Comments

@gregg098
Copy link

I started migrating my Home Assistant Zwave configuration over to this yesterday and have seen two crashes since then that seem to be related to permissions.

Here is my Docker Compose file:

  ozwd:
#    image: openzwave/ozwdaemon:latest
    image: openzwave/ozwdaemon:allinone-latest
    container_name: ozwd
    security_opt:
      - seccomp:unconfined
    devices:
      - ${OZWPATH}
    volumes:
      - ${DOCKERDIR}/ozw:/opt/ozw/config
    ports:
      - 1983:1983
      - 5901:5901
      - 7800:7800
    networks:
      - docker_apps
    environment:
      - MQTT_SERVER=${MQTTSERVER}
      - MQTT_USERNAME=${MQTTUSERNAME}
      - MQTT_PASSWORD=${MQTTPASSWORD}
      - USB_PATH=${OZWPATH}
      - OZW_NETWORK_KEY=${OZWKEY}
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

Storage location is /srv/docker/ozw. I don't know if this is related or not, but the entire /srv/docker folder is generally owned by my normal login user (sudo chown -R user:user /srv/docker when I created it), but most of the time, containers that run as root (like this one) will change those permissions as necessary. I've never had issues with other containers set up the same way (like Home Assistant).

Below is some of the log file from when this happens. There are a lot more identical entries before this. I have to completely restart the docker container for it to come back.

I dont have any other issues with my MQTT server (Mosquitto) or any other containers for that matter. Is there a permissions fix that needs to apply periodically or something?

2020-08-29T21:54:44.349014577Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:46.351209138Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:48.353367848Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:50.355706586Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:52.357996094Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:54.360530981Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:56.362854105Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:54:58.365346111Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:00.367630003Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:02.369804473Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:04.372114426Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:06.374609021Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:08.376774312Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:10.378163368Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:12.380244777Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:14.382099596Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:16.384102032Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:18.386329670Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:20.388600426Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:21.151106553Z s6-log: warning: unable to fd_chmod /opt/ozw/config/logs/ozwadmin//current to 0744: Operation not permitted,
2020-08-29T21:55:21.171808724Z [cont-finish.d] executing container finish scripts...,
2020-08-29T21:55:21.183616124Z [cont-finish.d] done.,
2020-08-29T21:55:21.184644721Z [s6-finish] waiting for services.,
2020-08-29T21:55:21.227420271Z s6-svwait: fatal: supervisor died,
2020-08-29T21:55:21.235583028Z s6-log: warning: unable to fd_chmod /opt/ozw/config/logs/novnc//current to 0744: Operation not permitted,
2020-08-29T21:55:21.431244483Z [s6-finish] sending all processes the TERM signal.,
2020-08-29T21:55:21.447263136Z [ozwdaemon]: Exited with Status Code 256,
2020-08-29T21:55:22.389515060Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:23.150380595Z s6-log: warning: unable to fd_chmod /opt/ozw/config/logs/ozwadmin//current to 0744: Operation not permitted,
2020-08-29T21:55:23.229429826Z s6-log: warning: unable to fd_chmod /opt/ozw/config/logs/novnc//current to 0744: Operation not permitted,
2020-08-29T21:55:24.391829563Z s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
2020-08-29T21:55:24.450394654Z [s6-finish] sending all processes the KILL signal and exiting.,
2020-08-29T21:55:26.405119702Z [s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
2020-08-29T21:55:26.499470917Z [s6-init] ensuring user provided files have correct perms...exited 0.,
2020-08-29T21:55:26.501878922Z [fix-attrs.d] applying ownership & permissions fixes...,
2020-08-29T21:55:26.504725811Z [fix-attrs.d] ozw-logs: applying... ,
2020-08-29T21:55:26.732042281Z [fix-attrs.d] ozw-logs: exited 0.,
2020-08-29T21:55:26.734846402Z [fix-attrs.d] done.,
2020-08-29T21:55:26.736202940Z [cont-init.d] executing container initialization scripts...,
2020-08-29T21:55:26.738977231Z [cont-init.d] ozw-logs: executing... ,
2020-08-29T21:55:26.753104283Z [cont-init.d] ozw-logs: exited 0.,
2020-08-29T21:55:26.755042976Z [cont-init.d] done.,
2020-08-29T21:55:26.757055547Z [services.d] starting services,
@davidsuarez82
Copy link

Hi,

Same issue here; after restarting the container it works perfectly for some time (between hours and days)

s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-svwait: fatal: timed out,
[s6-finish] sending all processes the TERM signal.,
[ozwdaemon]: Exited with Status Code 256,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
s6-log: warning: unable to rename /opt/ozw/config/logs/ozwdaemon/current to /opt/ozw/config/logs/ozwdaemon/previous: Permission denied,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] ozw-logs: applying... ,
[fix-attrs.d] ozw-logs: exited 0.,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] ozw-logs: executing... ,
[cont-init.d] ozw-logs: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
[ozwdaemon]: Setting Up.....,
[ozwdaemon]:  ,
[ozwdaemon]: ========================================================================,
[ozwdaemon]: Detailed Logging is available in the logs directory of the mapped volume,
[ozwdaemon]: ========================================================================,
[ozwdaemon]:  ,
[ozwdaemon]: Waiting until the MQTT broker at 192.168.20.60:1883 is available...,
[ozwdaemon]: Starting...,
[ozwdaemon]: Executing: /usr/local/bin/ozwdaemon,

@elad-bar
Copy link

happens to me also every 2-3 weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants