docker deployment: cannot bind to port (Synology)
tca22 opened this issue · 11 comments
Hi,
I try to run kerberos-agent from scratch with docker: docker run --name camera1 -p 41980:80 -d kerberos/agent:latest
The container is shutdown immediately with the log entry:
[GIN-debug] [ERROR] listen tcp :80: bind: permission denied 2023/03/17 09:25:56 listen tcp :80: bind: permission denied
I tried --privileged
execution as well - no success.
As far as I understand, port 80 is used for binding even though it should be 41980.
Do I miss something?
Thanks!
hello @tca22, so if you bind on port 80 it does work -p 80:80
. What happens if you bind to port 81 -p 81:80
.
Hello @cedricve,
I see my title is misleading.
I would like to use a different port than 80, as 80 is already in use.
So the error-messages are different, but neither -p 80:80, -p 81:80 or e.g. -p 81980:80 work.
-p 80:80
docker: Error response from daemon: driver failed programming external connectivity on endpoint camera1 (3d51e7a4da542bf1dfe777219d6209203716c5653918357c2061ca77d2ce3e14): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use.
-p 81:80 or -p 41980:80
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/exec: no such file or directory: unknown.
I do run Docker on Synology with a few "kerberos/kerberos" containers, but would like to use the newer "kerberos/agent" developments ...
Any thoughts?
EDIT:
It seems there are different errror-messages on the command-line-prompt and within the container-log ...
Interesting! Let me check on my synology as well. Might makes sense to do so, and store your recordings in Kerberos Vault on your Synology as well.
@tca22 I just tried it in my own Synology, using the Docker ui, and I didn't had issues loading it.
Doesn't work for me, strange!
I removed the image, so I can do a fresh install from the command-line:
-
sudo docker run -p 41980:80 --name mycamera -d kerberos/agent:latest
container is downloaded, no error on the command-line -
docker-ui shows that the container is stoped
the container-log attached
mycamera.csv
Well, seems to be a local issue then. Would you mind giving some directions where to start looking?
Thanks!
@tca22 which release are you using? Can you take a specific release? https://hub.docker.com/layers/kerberos/agent/192f78a/images/sha256-334d5416fb129e83da82435f584d02c9774f88404a813bb32aba1da73ae43bd3?context=explore
kerberos/agent:192f78a
@cedricve had agent:latest
, tried this now sudo docker run -p 41980:80 --name mycamera -d kerberos/agent:192f78a
, but no change, same error :-/
What architecture is your Synology (version) running on?
What docker version
are you using?
DSM 7.1.1-42962 Update 4
(DS718+)
Docker version 20.10.3, build 55f0773
EDIT [20230317]:
start to do the basic things: restarted system, no change...
EDIT [20230319]:
docker-compose, no change (attached terminal output and yml-file)
docker-compose.yml.txt
terminal.log