Sunday, February 10, 2019

Synology: ports already in use error message in DSM when creating a new Docker container

If you happen to create a new container, for a same service (e.g. new Unifi Controller with latest version), you could happen to run into the issue where the same ports cannot be used again, due to a check that DSM is performing. It could also be the case that the config file for this does not get deleted. The solution is to manually move or delete the file for the time being.


  1. Start looking for the port that is reported as already in use (in my case it was 10001)
  2. grep -Rl "10001" /usr | grep docker
  3. Go to the folder where the port reservations for services are kept
  4. cd /usr/local/etc/services.d/
    Output:
    root@server:/usr/local/etc/services.d# ls -l
    total 36
    -rw-r--r-- 1 root root 395 Mar  4  2017 AudioStation.sc
    -rw-r--r-- 1 root root  98 Dec 13 08:52 CloudStation.sc
    -rw-r--r-- 1 root root 109 Dec 30 12:48 docker_trusting_boyd.sc
    -rw-r--r-- 1 root root 109 Feb 08 12:48 docker_unifi.sc
    -rw-r--r-- 1 root root 178 Mar  4  2017 iTunesServer.sc
    -rw-r--r-- 1 root root 688 Feb  9 14:53 MailServer.sc
    -rw-r--r-- 1 root root 105 Apr 18  2017 ProxyServer.sc
    -rwxr-xr-x 1 root root 250 Jan  1  2017 SurveillanceStation.sc
    -rw-r--r-- 1 root root 426 Mar 11  2018 synovpn_port
    -rw-r--r-- 1 root root 262 Apr 14  2017 VideoStation.sc
  5. Move the corresponding file or delete it

No comments:

Post a Comment