kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
642 stars 78 forks source link

docker deployment: cannot bind to port (Synology) #87

Open tca22 opened 1 year ago

tca22 commented 1 year ago

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!

cedricve commented 1 year ago

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.

tca22 commented 1 year ago

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 ...

cedricve commented 1 year ago

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.

cedricve commented 1 year ago

@tca22 I just tried it in my own Synology, using the Docker ui, and I didn't had issues loading it.

Screenshot 2023-03-17 at 19 55 45
tca22 commented 1 year ago

Doesn't work for me, strange!

I removed the image, so I can do a fresh install from the command-line:

1) sudo docker run -p 41980:80 --name mycamera -d kerberos/agent:latest container is downloaded, no error on the command-line

2) 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!

cedricve commented 1 year ago

@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

tca22 commented 1 year ago

@cedricve had agent:latest, tried this now sudo docker run -p 41980:80 --name mycamera -d kerberos/agent:192f78a, but no change, same error :-/

cedricve commented 1 year ago

What architecture is your Synology (version) running on?

cedricve commented 1 year ago

What docker version are you using?

tca22 commented 1 year ago

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

cedricve commented 10 months ago

@tca22 do you have an update on this ?