Docker Community Forums

Share and learn in the Docker community.

Port 443 used! - For Docker Trusted Registry after installing Docker UCP

docker

(Rajkiran) #1

Unable to start Docker Trusted Registry after Docker UCP installation is done. UCP is fine, able to login into Web UI. But while starting DTR, here is the output.

masternode@masternode-KVM:~$ sudo bash -c “$(sudo docker run docker/trusted-registry install)” Checking for required image: docker/trusted-registry-distribution:v2.2.1 Checking for required image: postgres:9.4.1 Checking for required image: docker/trusted-registry:1.4.2 Checking for required image: docker/trusted-registry-admin-server:1.4.2 Checking for required image: docker/trusted-registry-log-aggregator:1.4.2 Checking for required image: docker/trusted-registry-garant:1.4.2 Checking for required image: docker/trusted-registry-nginx:1.4.2 Checking for required image: docker/trusted-registry-index:1.4.2 INFO [1.4.2] Attempting to connect to docker engine dockerHost=“unix:///var/run/docker.sock” INFO [1.4.2] Running install command INFO [1.4.2] Running pull command Bringing up docker_trusted_registry_postgres. Creating container docker_trusted_registry_postgres with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_postgres with docker daemon unix:///var/run/docker.sock INFO [1.4.2] Already at latest database schema version version=2 INFO [1.4.2] Running start command Pulling image docker/trusted-registry-index:1.4.2 with docker daemon unix:///var/run/docker.sock Pulling image docker/trusted-registry-nginx:1.4.2 with docker daemon unix:///var/run/docker.sock Pulling image docker/trusted-registry-admin-server:1.4.2 with docker daemon unix:///var/run/docker.sock Pulling image docker/trusted-registry-log-aggregator:1.4.2 with docker daemon unix:///var/run/docker.sock Pulling image docker/trusted-registry-garant:1.4.2 with docker daemon unix:///var/run/docker.sock Pulling image postgres:9.4.1 with docker daemon unix:///var/run/docker.sock Bringing up docker_trusted_registry_registry_index. Creating container docker_trusted_registry_registry_index with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_registry_index with docker daemon unix:///var/run/docker.sock Bringing up docker_trusted_registry_postgres. Creating container docker_trusted_registry_postgres with docker daemon unix:///var/run/docker.sock Container already exists for daemon at unix:///var/run/docker.sock: docker_trusted_registry_postgres Starting container docker_trusted_registry_postgres with docker daemon unix:///var/run/docker.sock Container docker_trusted_registry_postgres is already running for daemon at unix:///var/run/docker.sock Bringing up docker_trusted_registry_auth_server. Creating container docker_trusted_registry_auth_server with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_auth_server with docker daemon unix:///var/run/docker.sock Bringing up docker_trusted_registry_log_aggregator. Creating container docker_trusted_registry_log_aggregator with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_log_aggregator with docker daemon unix:///var/run/docker.sock Bringing up docker_trusted_registry_admin_server. Creating container docker_trusted_registry_admin_server with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_admin_server with docker daemon unix:///var/run/docker.sock Bringing up docker_trusted_registry_load_balancer. Creating container docker_trusted_registry_load_balancer with docker daemon unix:///var/run/docker.sock Starting container docker_trusted_registry_load_balancer with docker daemon unix:///var/run/docker.sock Traceback (most recent call last): File “/usr/local/bin/stacker”, line 9, in load_entry_point(‘stacker==0.1’, ‘console_scripts’, ‘stacker’)() File “build/bdist.linux-x86_64/egg/stacker/cli.py”, line 128, in main File “build/bdist.linux-x86_64/egg/stacker/cli.py”, line 47, in handler File “build/bdist.linux-x86_64/egg/stacker/container.py”, line 256, in run File “build/bdist.linux-x86_64/egg/stacker/container.py”, line 182, in start File “build/bdist.linux-x86_64/egg/stacker/daemon.py”, line 280, in start_container File “/usr/local/lib/python2.7/dist-packages/docker_py-1.1.1_dev-py2.7.egg/docker/client.py”, line 913, in start self._raise_for_status(res) File “/usr/local/lib/python2.7/dist-packages/docker_py-1.1.1_dev-py2.7.egg/docker/client.py”, line 119, in _raise_for_status raise errors.APIError(e, response, explanation=explanation) docker.errors.APIError: 500 Server Error: Internal Server Error (“Cannot start container docker_trusted_registry_load_balancer: failed to create endpoint docker_trusted_registry_load_balancer on network bridge: Bind for 0.0.0.0:443 failed: port is already allocated”) ERROR [1.4.2] Failed to run stacker command command=run error=“exit status 1” FATAL [1.4.2] Failed to run containers: map[error:exit status 1] error="exit status 1"
masternode@masternode-KVM:~$

Kindly help on how to setup DTR after UCP.


(Myproberts) #2

I am having the same issue and I am interested if anybody has found a resolution other than moving DTR or UCP to a port other than 443.


(Bantonelli) #3

Same problem on my end, anyone figure this out?

docker.errors.APIError: 500 Server Error: Internal Server Error ("failed to create endpoint docker_trusted_registry_load_balancer on network dtr: Bind for 0.0.0.0:443 failed: port is already allocated")


(Myproberts) #4

Yes, if you are running DTR and UCP on the same system, you need to make one of them run on another port since they both attempt to use 443 by default.

In my case, I am running UCP on 8443, you can achieve this by installing it with the --controller-port “” option when installing UCP.

I haven’t decided yet what is more efficient, running UCP on a different port, or running DTR on a different port. I also have not yet looked to see if you can just run them on seperate IP’s.


(Myproberts) #5

In your case @bantonelli, you installed UCP before installing DTR, so UCP is already running on 443 and DTR cannot bind to 443, you could reinstall UCP to run on 8443 (there is a fresh install option, I don’t recall what it was off hand, and don’t have access to my system from this laptop to look for you)

If you need more specific help, let me know, I can check later (more likely tomorrow since my other laptop is at my office and I am at home right now)


(Bantonelli) #6

Thanks @myproberts , this solved my problem! Add --fresh-install to do a clean install.