Docker - "Local port conflicts with other ports used by other services"

Currently reading
Docker - "Local port conflicts with other ports used by other services"

25
5
NAS
DS1019+, DS916+
Operating system
  1. Windows
Mobile operating system
  1. Android
  2. iOS
I'm trying to install Lidarr as a docker container. Previously, I had (briefly) run as a docker container before (I think - it was a long while ago), but I stopped that, and removed the image and container.
Now, when I go to configure the docker image, it tells me "local port 8686 conflicts with other ports used by other services". No other current container uses that port. And while I can easily just choose a different local port, I'd like to figure out what is using that port, and stop it. I don't see that port at all when doing

netstat -tlpn | sort -t: -k2 -n

And this doesn't show 8686, either:

sudo docker ps --format "table {{.Image}}\t{{.Ports}}\t{{.Status}}"
(I found that on the internet)

So how can I figure out where this port is in use, and stop using it there, and start using it with my docker container?

Thanks
 
Most often the port is already set for another container.

Barring that, you can find all ports that Synology reserves n the Knowledge Base.

But no biggie... just change the local port (it's good security by obscurity practice).
 
I've looked at the docs, and 8686 is not a reserved port in use by Synology. And sure, I can change the port easily enough, but I'd like to spend at least a little time trying to actually resolve it, as opposed to just working around it. :)
 
Nope.

sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
678dbeb169e3 linuxserver/sonarr:latest "/init" 2 days ago Up 2 days 0.0.0.0:9898->8989/tcp Sonarr
55413b610530 linuxserver/radarr:latest "/init" 10 days ago Up 5 days 0.0.0.0:7878->7878/tcp linuxserver-radarr1
bc0bd6abe0fc linuxserver/sabnzbd:latest "/init" 13 days ago Up 5 days 0.0.0.0:8088->8080/tcp SABnzbd
3dbb13d31fcb portainer/portainer-ee:latest "/portainer" 3 weeks ago Up 5 days 0.0.0.0:8000->8000/tcp, 0.0.0.0:9443->9443/tcp, 9000/tcp portainer
249c94d882ae containrrr/watchtower:latest "/watchtower" 5 weeks ago Up 5 days 8080/tcp watchtower
df8a87acd01d tautulli/tautulli:latest "./start.sh python T…" 5 weeks ago Up 5 days (healthy) 0.0.0.0:8181->8181/tcp tautulli-tautulli
 
Please add -a to your command to show us all stopped containers as well.

Also it doesn't necessarily have to be a collision with a published host port mapping of a container, or a container port of a container running in network=host mode. It could also be any other process running on the host that binds the port.

You can try this netstat command instead: sudo netstat -tulpn | grep ':8686 ' (the space char at the end is intended to prevent false positives)
 
I have no stopped containers. :)

root@Warehouse-2:/etc/samba# sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c6f14dd151b7 linuxserver/sabnzbd:latest "/init" 7 hours ago Up 7 hours 0.0.0.0:8088->8080/tcp SABnzbd
678dbeb169e3 linuxserver/sonarr:latest "/init" 3 days ago Up 3 days 0.0.0.0:9898->8989/tcp Sonarr
55413b610530 linuxserver/radarr:latest "/init" 11 days ago Up 6 days 0.0.0.0:7878->7878/tcp linuxserver-radarr1
3dbb13d31fcb portainer/portainer-ee:latest "/portainer" 3 weeks ago Up 6 days 0.0.0.0:8000->8000/tcp, 0.0.0.0:9443->9443/tcp, 9000/tcp portainer
249c94d882ae containrrr/watchtower:latest "/watchtower" 5 weeks ago Up 6 days 8080/tcp watchtower
df8a87acd01d tautulli/tautulli:latest "./start.sh python T…" 5 weeks ago Up 6 days (healthy) 0.0.0.0:8181->8181/tcp tautulli-tautulli


And I already did that netstat command, which shows nothing.

turgon@Warehouse-2:~$ sudo netstat -tulpn | grep ':8686 '
Password:
turgon@Warehouse-2:~$

That's why I don't understand docker thinks there's a conflict, there are no containers with that port (stopped or otherwise), and nothing else on the system is listening to that port. (there may have been a package version of lidarr long ago, but that was stopped and deleted, and there's nothing there now.
 
I am not a docker specialist, but I use Portainer for my needs because it makes all easier for me...
I can see that using Portainer is quite easy to see all reserved ports and the status of containers. I would suggest to try it, maybe it will help to find a solution.
 
I am not a docker specialist, but I use Portainer for my needs because it makes all easier for me...
I can see that using Portainer is quite easy to see all reserved ports and the status of containers. I would suggest to try it, maybe it will help to find a solution.
Look at the docker listing - I do run Portainer. LOL it's not showing that port, either, that I can see.
 
Last edited by a moderator:
(there may have been a package version of lidarr long ago, but that was stopped and deleted, and there's nothing there now.
My guess is this uninstalled community package is still holding onto the port somewhere, ie uninstallation wasn't complete. Maybe install / uninstall it again?
Has the machine been rebooted since you uninstalled the original lidarr pkg? If not, the kernel could be retaining a port registration somewhere...?
Edit: can see @one-eyed-king had a similar thought as I was posting!
 
Indeed, it makes no sense a port conflict is reported. This kind of reminds me to problems people with older kernels (<4.8.x) on their Diskstations experienced in the past: When the blue whale sinks. If you are affected by this issue, then afair restarting the docker package or the nas itself remedied the issue for them.

@MikeLeone I am not mistaken the DS1019+ uses a 4.4.x kernel, and the DS916+ should be either 3.10.x or 4.4.x as well. so both are potentially affected.
 
Last edited:
Indeed, it makes no sense a port conflict is reported. This kind of reminds me to problems people with older kernels (<4.8.x) on their Diskstations experienced in the past: When the blue whale sinks. If you are affected by this issue, then afair restarting the docker package or the nas itself remedied the issue for them.

@MikeLeone I am not mistaken the DS1019+ uses a 4.4.x kernel, and the DS916+ should be either 3.10.x or 4.4.x as well. so both are potentially affected.

Uptime on the DS1019+ (where docker runs) is 6 days, I updated DSM then, so docker would also have restarted then. And the lidarr package would have been uninstalled well before that.

I looked in package manger, and lidarr isn't listed as being installed anymore.

I suppose I can try installing the package, then immediately uninstalling it again. I'll try that tonight.

Nope: can't install the package, either ..

1671314761858.png



At this point, I may just have to use a different port. Although I would love to figure out why ...
Nothing is listening on that port, not at the NAS address, anyway ...

PS C:\Users\turgo> Test-NetConnection 10.0.0.82 -port 8686
WARNING: TCP connect to (10.0.0.82 : 8686) failed


ComputerName : 10.0.0.82
RemoteAddress : 10.0.0.82
RemotePort : 8686
InterfaceAlias : Wired Gigabit
SourceAddress : 10.0.0.75
PingSucceeded : True
PingReplyDetails (RTT) : 1 ms
TcpTestSucceeded : False

I even tried stopping all containers, and stopping the whole docker package. Then I restarted docker, and all containers. No good, same error. I guess I am at the point of just choosing a different port (like 18686 or whatever) ...
 

Attachments

  • 1671321457134.png
    1671321457134.png
    11.9 KB · Views: 36

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

If the image supports... Even so, it can't be authenticated with a LAN IP.
Replies
3
Views
1,209
As per my initial replies. The wording in the error log does suggest that Sab is indeed trying to create...
Replies
37
Views
8,595
Deleted member 5784
D
I have installed Vaultwarden via Docker. All clients are refusing to connect. It looks to be due to the...
Replies
0
Views
2,085
New(er) DS920 owner and I've gotten some of the kinks out of my set up as well as become familiar with...
Replies
0
Views
2,654
  • Question
I hope Synology will iron out the impediments that prevent your solution to work. Its a brilliant idea! :)...
Replies
3
Views
5,314

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top