Can't get port assignments to work on container


tknx

Recommended Posts

Is this just broken? If I give it its own IP address and change the port - it sends different arguments than if I leave it on the bridge and change the port. Why?

 

Change port in Basic Config:
 

Quote

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='calibre-web' --net='br0' --ip='10.0.1.38' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'TCP_PORT_8083'='80' -e 'DOCKER_MODS'='linuxserver/calibre-web:calibre' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/ebooks/library/':'/books':'rw' -v '/mnt/user/appdata/calibre-web':'/config':'rw' 'linuxserver/calibre-web'

d506648f955d20519798e69ea9076397970d91a7cf3f439f7707f47c312ed8ec

 

 

This command doesn't do anything to the port at all. The container still runs at 8083.

Versus bridge:
 

Quote

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='calibre-web' --net='bridge' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'DOCKER_MODS'='linuxserver/calibre-web:calibre' -e 'PUID'='99' -e 'PGID'='100' -p '8088:8083/tcp' -v '/mnt/user/ebooks/library/':'/books':'rw' -v '/mnt/user/appdata/calibre-web':'/config':'rw' 'linuxserver/calibre-web'

fb7bb7671040ca73303db023f229d2574ddf159c17e36c1f9190baeef062954a

 

This one works to change the port. But can't be used in combination with an assigned IP.

Link to comment

When you assign a unique IP to a container, it negates any mappings set, and forces the app to manage all the ports. If you wish to change the listening port you will need to do that in the application itself, however that particular app does it. The unraid interface no longer has any control over what ports the app uses.

Link to comment

Okay - so narrowed it down. I switched the application port to 8081 to try a different one. Worked fine if I changed the advanced setting to [IP]:[PORT:8081].

 

I tried port 80. Didn't work.

 

Console shows:

[2019-07-29 16:29:08,995] INFO in web: Starting Calibre Web...
[2019-07-29 16:29:09,377] INFO in server: Starting Gevent server
[2019-07-29 16:29:09,378] INFO in server: Unable to listen on '', trying on IPv4 only...
[2019-07-29 16:29:09,379] INFO in server: Error starting server: Permission denied: ('0.0.0.0', 80)
Error starting server: Permission denied: ('0.0.0.0', 80)

So it doesn't like 80 for some reason, but has no problem with other ports. Since the application has its own IP address, not sure what the next step is.

Link to comment
9 hours ago, tknx said:

Is this just broken? If I give it its own IP address and change the port - it sends different arguments than if I leave it on the bridge and change the port. Why?

When giving a container its own IP address, all port mapping is ignored and whatever the app itself wants to use it uses. Basically the same thing as host network.  IE: Port mapping only works in Bridge mode.

 

To get it to use 80 instead of 8083, you have to modify file(s) within the container.  

Edited by Squid
Link to comment
40 minutes ago, Squid said:

When giving a container its own IP address, all port mapping is ignored and whatever the app itself wants to use it uses. Basically the same thing as host network.  IE: Port mapping only works in Bridge mode.

 

To get it to use 80 instead of 8083, you have to modify file(s) within the container.  

Won't OP hit the problem of trying to open privileged ports with a non-privileged user (non-root)?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.