angelnu / docker-ccu

Script to create a docker container with the CCU2 firmware
Apache License 2.0
32 stars 13 forks source link

ln: failed to create symbolic link './rfd.conf': Operation not permitted #45

Closed David91919 closed 3 years ago

David91919 commented 4 years ago

Hello,

I struggle to get the container running. The logs don´t go past S11init, last week after the Kernel updates of Pivccu i got to S61 rfd and no further (came up with ...... ERROR), HTTP showed CCU starting up screen endlessly.

I sense it has sth. to do with the failed to create symbolic link ./rfd.conf.

What could be the issue?

Cheers David

`sudo sh deploy.sh deploy.sh: 25: deploy.sh: [[: not found

Stoping docker container ccu ccu ccu

Load eq3_char_loop module Enable realtime kernel.sched_rt_runtime_us = -1

Starting container as plain docker docker run --privileged --restart=always --mount type=volume,src=ccu_data,dst=/mnt --detach=true --name ccu -p 81:80 -p 2002:2001 -p 2011:2010 -p 2222:22 -p 8181:8181 -e PERSISTENT_DIR=/mnt --hostname ccu angelnu/ccu:3 57dceceebf8f8bd868277a9dc8387646d4439c2f29d961103d4c675bc93fe4d0

Docker container started! Docker data volume used: ccu_data deploy.sh: 133: deploy.sh: [[: not found You can find its location with the command 'docker volume inspect ccu_data' [ { "CreatedAt": "2020-09-26T06:15:09+02:00", "Driver": "local", "Labels": null, "Mountpoint": "/var/lib/docker/volumes/ccu_data/_data", "Name": "ccu_data", "Options": null, "Scope": "local" } ] ln: failed to create symbolic link './rfd.conf': Operation not permitted `

`Copying from /mnt to /usr/local/ sending incremental file list  / boot_par/.gitkeep sent 124 bytes received 39 bytes 326.00 bytes/sec total size is 0 speedup is 0.00 Starting CCU services Starting /etc/init.d/S00InstallAddon Starting /etc/init.d/S00watchdog S00watchdog - skipping Starting /etc/init.d/S01InitHost S01InitHost - defaults Checking device Detected piVCCU kernel module Starting /etc/init.d/S02InitRTC S02InitRTC - skipping Starting /etc/init.d/S03InitURandom S03InitURandom - skipping Starting /etc/init.d/S04CheckFactoryReset Checking for Factory Reset: not required Starting /etc/init.d/S04CheckResizeLocalFS S04CheckResizeLocal - skipping Starting /etc/init.d/S05CheckBackupRestore Checking for Backup Restore: not required Starting /etc/init.d/S05avahi-setup.sh Starting /etc/init.d/S06InitSystem mkdir: can't create directory '/var/lib/dbus': No such file or directory chmod: /var/lib/dbus: No such file or directory Initializing System: OK Starting /etc/init.d/S07DisableHdmi /entrypoint.sh: line 21: /etc/init.d/S07DisableHdmi: Permission denied Starting /etc/init.d/S07logging Starting logging: OK Starting /etc/init.d/S10udev S10udev - skipping Starting /etc/init.d/S11InitRFHardware

`

FlexiFrog commented 3 years ago

I second that, however there is no error message about rfd.conf.

Load eq3_char_loop module Enable realtime kernel.sched_rt_runtime_us = -1

Starting container as plain docker docker run --privileged --restart=always --mount type=volume,src=ccu_data,dst=/mnt --detach=true --name ccu -p 2080:80 -p 2001:2001 -p 2010:2010 -p 2222:22 -p 8181:8181 -e PERSISTENT_DIR=/mnt --hostname ccu angelnu/ccu:3 549a36a28316bbaf20a4cf2b98c26a2bccc1d67ce63895f79bb3665721abca00

Docker container started! Docker data volume used: ccu_data You can find its location with the command 'docker volume inspect ccu_data' [ { "CreatedAt": "2020-10-04T10:10:34+01:00", "Driver": "local", "Labels": null, "Mountpoint": "/var/lib/docker/volumes/ccu_data/_data", "Name": "ccu_data", "Options": null, "Scope": "local" } ]

The ccu log looks the same and hangs forever at "Starting /etc/init.d/S11InitRFHardware"

angelnu commented 3 years ago

The errors in deploy.sh need to be debugged (which version of bash are you using?) but should not affect the container. The first one in line 25 checks that you are running as root and the one about the rfd.conf creates a symbolic link into the git checkout so it is easy to debug rfd.conf.

I would suggest to exec into the container and finding in which command the init is hanging. You can also manually execute /etc/init.d/S11InitRFHardware within the container.

What adapter do you use?

David91919 commented 3 years ago

Hello again :) Couple months later and I am circling back to this issue. Sorry for the absence.

Have been switching SD cards between HifiberryOS and PiVCCU3 which is quite annoying but HifiberryOS now supports Docker and I´ve got some spare time so trying it again with the same rfd.conf operation not permitted.

(side note: trying to install this docker on a OMV5 installation just aint gonna happen... the USB module wont even let my RPI4 start, I suspect some USB device conflict)

What I use now is a freshly flashed HifiberryOS on my RPI 4 with a DAC pro+ XLR pcb and a Smartkram USB-2 pcb hosting a RF-Mod pcb https://smartkram.de/produkt/platine-hb-rf-usb-2/ https://de.elv.com/elv-homematic-komplettbausatz-funkmodul-fuer-raspberry-pi-hm-mod-rpi-pcb-fuer-smart-home-hausautomation-142141

I changed the HTTP port to 89 (81 wont work as its in use on the HifiberryOS) in the settings.template, everything else is as latest release on 24.12.20.

Error msg is as follows:

´# docker volume inspect ccu_data [ { "CreatedAt": "2020-12-24T21:16:11+01:00", "Driver": "local", "Labels": null, "Mountpoint": "/var/lib/docker/volumes/ccu_data/_data", "Name": "ccu_data", "Options": null, "Scope": "local" } ]

I tried chmod 777 on /var/lib/docker/volumes/ but no change...

David91919 commented 3 years ago

docker inspect ccu

[ { "Id": "98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d", "Created": "2020-12-24T20:20:18.743086238Z", "Path": "/entrypoint.sh", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 3392, "ExitCode": 0, "Error": "", "StartedAt": "2020-12-24T20:20:20.728132247Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:41c35074221cb8123efe96e8b9bf2aade2e237d28114300b227e49f6679c2470", "ResolvConfPath": "/var/lib/docker/containers/98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d/resolv.conf", "HostnamePath": "/var/lib/docker/containers/98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d/hostname", "HostsPath": "/var/lib/docker/containers/98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d/hosts", "LogPath": "/var/lib/docker/containers/98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d/98c471ffe30ea5d7e979e75b55bfe90d2191b261db74db99026924dba84ce13d-json.log", "Name": "/ccu", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "2001/tcp": [ { "HostIp": "", "HostPort": "2001" } ], "2010/tcp": [ { "HostIp": "", "HostPort": "2010" } ], "22/tcp": [ { "HostIp": "", "HostPort": "2222" } ], "80/tcp": [ { "HostIp": "", "HostPort": "89" } ], "8181/tcp": [ { "HostIp": "", "HostPort": "8181" } ] }, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Capabilities": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": true, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DeviceRequests": null, "KernelMemory": 0, "KernelMemoryTCP": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "PidsLimit": null, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "Mounts": [ { "Type": "volume", "Source": "ccu_data", "Target": "/mnt" } ], "MaskedPaths": null, "ReadonlyPaths": null }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/afb52f389d0321649e998a6cfe47949f96a083c4244d0acaf6587ff70e21bb51-init/diff:/var/lib/docker/overlay2/756770497ec63deb38a7dbb56b2e6dccab7ce867957ac07df8120f3802bff6ad/diff:/var/lib/docker/overlay2/1d4f0f5c975bf57c32ca5c589d7de49d1b419b0dded8632a7003089c0f48be74/diff", "MergedDir": "/var/lib/docker/overlay2/afb52f389d0321649e998a6cfe47949f96a083c4244d0acaf6587ff70e21bb51/merged", "UpperDir": "/var/lib/docker/overlay2/afb52f389d0321649e998a6cfe47949f96a083c4244d0acaf6587ff70e21bb51/diff", "WorkDir": "/var/lib/docker/overlay2/afb52f389d0321649e998a6cfe47949f96a083c4244d0acaf6587ff70e21bb51/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "volume", "Name": "ccu_data", "Source": "/var/lib/docker/volumes/ccu_data/_data", "Destination": "/mnt", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "abaa328c71956b7005eb9bad1208492235db0aa2f44ffedd927788d351112552", "Source": "/var/lib/docker/volumes/abaa328c71956b7005eb9bad1208492235db0aa2f44ffedd927788d351112552/_data", "Destination": "/usr/local", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "ccu", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "2001/tcp": {}, "2010/tcp": {}, "22/tcp": {}, "80/tcp": {}, "8181/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PERSISTENT_DIR=/mnt", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/entrypoint.sh" ], "Image": "angelnu/ccu:3", "Volumes": { "/usr/local": {} }, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "20851e449eed3bbd5634c4c0e2c2c58b8dcc5f594ed78fa1d0c18ffcc2d1cf02", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "2001/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "2001" } ], "2010/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "2010" } ], "22/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "2222" } ], "80/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "89" } ], "8181/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "8181" } ] }, "SandboxKey": "/var/run/docker/netns/20851e449eed", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "1fe02cc579b0a75dfc87c616e9639532e87ba2ae6a36cd16c7b3199d4a891810", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "02:42:ac:11:00:02", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "a30f81c1b491e6ed67af71a779d461157c92c532a43c554d3181c01f0dc048c0", "EndpointID": "1fe02cc579b0a75dfc87c616e9639532e87ba2ae6a36cd16c7b3199d4a891810", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:02", "DriverOpts": null } } } } ]

angelnu commented 3 years ago

Sorry, I had been busy moving to RaspberryMatic -> see https://github.com/jens-maus/RaspberryMatic/wiki/Docker

Could you please test with the new container images - I will provide support so you can open issues there as well.