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

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

Open
tca22 opened this issue Mar 17, 2023 · 11 comments
Open

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

tca22 opened this issue Mar 17, 2023 · 11 comments
Assignees
Labels
question Further information is requested

Comments

@tca22
Copy link

tca22 commented Mar 17, 2023

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!

@tca22 tca22 changed the title docker deployment: cannot bind to port 80 docker deployment: cannot bind to other port than 80 Mar 17, 2023
@cedricve
Copy link
Member

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
Copy link
Author

tca22 commented Mar 17, 2023

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
Copy link
Member

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
Copy link
Member

@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

@cedricve cedricve changed the title docker deployment: cannot bind to other port than 80 docker deployment: cannot bind to other port than 80 (Synology) Mar 17, 2023
@cedricve cedricve self-assigned this Mar 17, 2023
@cedricve cedricve added the question Further information is requested label Mar 17, 2023
@tca22
Copy link
Author

tca22 commented Mar 17, 2023

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
Copy link
Member

@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
Copy link
Author

tca22 commented Mar 17, 2023

@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
Copy link
Member

What architecture is your Synology (version) running on?

@cedricve
Copy link
Member

What docker version are you using?

@tca22
Copy link
Author

tca22 commented Mar 17, 2023

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

@tca22 tca22 changed the title docker deployment: cannot bind to other port than 80 (Synology) docker deployment: cannot bind to port (Synology) Mar 22, 2023
@cedricve
Copy link
Member

cedricve commented Sep 7, 2023

@tca22 do you have an update on this ?

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

No branches or pull requests

2 participants