Good afternoon dear colleagues,
I am trying to install a new Doker every things going well until this error message appear “:8080 failed: port is already allocated” (the whole Terminal text below).
what can i do to resolve this problem?
Delate the old project (I don’t really need it. It is empty. Just an installation test installed this night) Or change the the “port”? knowing that I don’t know how i can apply any of both solution.
Please not that the system is MacOS “Imac”
Thanks for your help
ERROR: for d2-cluster-23771_gateway_1 Cannot start service gateway: driver failed programming external connectivity on endpoint d2-cluster-23771_gateway_1 (8e17cddc46ffd2f31e05c8d81248f37c7dcd18525bd51b6817f2ce59fc73d6c2): Bind for 0.0.0.0:8080 failed: port is already allocated
Creating d2-cluster-23771_db_1 … done
Creating d2-cluster-23771_core_1 …
Creating d2-cluster-23771_core_1 … done
ERROR: for gateway Cannot start service gateway: driver failed programming external connectivity on endpoint d2-cluster-23771_gateway_1 (8e17cddc46ffd2f31e05c8d81248f37c7dcd18525bd51b6817f2ce59fc73d6c2): Bind for 0.0.0.0:8080 failed: port is already allocated
Encountered errors while bringing up the project.
As you have kindly advised, I put all clusters DOWN and only one is UP: 188.8.131.52 (please the list in the log attached)
The problem since I have only an empty database I tried to install Sierra Leone one.
For that I follow the DHIS2 Guide : (yarn global add @dhis2/cli) and then (d2 cluster logs 184.108.40.206).
The database has started the download but never achieve the downloading as you can see from the log attached.
I would be grateful if you could identify the error and/or indicate the best way to have Sierra Leone in my programme.
Thanks again for your precious help
The problem with the port being used is due to another process listening on that port. This could be related to docker or not. For example, if you are runnin Tomcat (standalone) listening on port 8080, when launching the docker containers (via d2) they Tomcat container (named d2-cluster-core or similar) will fail as by default uses that port. This can be changed in while launching the containers via d2 and specifying the port.
For injecting the database you should use the --seed option. If you have already the containers launched and don’t want to delete them your option would be download the database and injecting it via psql commands (or by a graphical tool like dbeaver or heidiSQL). In order to use this you probably will need to get the IP of the container manually and use that private IP to connect to it.
First thanks a lot for your clear solution. I will try it now. I already deleted all the already installed clusters (Commands DOWN CLEAN). The only problem is I de not know what I should « seed » exactly. I would be grateful then if you could indicate to me:
The file should I use to seed;
Where can I find it ;
The procedure for seeding (commands to use in the terminal. Apologize, in fact, I don’t know how we use this command).
First thanks a lot for your kind help.
I applied your advice as you can see below. It seems to me that I don’t know how I can « seed ». What is the procedure for seeding. I tried to copy the file just after « --seed » it never works. Could you explain please how can I seed the file correctly?
Thanks again for your help
" File “requests/adapters.py”, line 498, in send
requests.exceptions.ConnectionError: (‘Connection aborted.’, FileNotFoundError(2, ‘No such file or directory’))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “docker-compose”, line 3, in
File “compose/cli/main.py”, line 81, in main
File “compose/cli/main.py”, line 200, in perform_command
File “compose/cli/command.py”, line 60, in project_from_options
File “compose/cli/command.py”, line 152, in get_project
File “compose/cli/docker_client.py”, line 41, in get_client
File “compose/cli/docker_client.py”, line 170, in docker_client
File “docker/api/client.py”, line 197, in init
File “docker/api/client.py”, line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (‘Connection aborted.’, FileNotFoundError(2, ‘No such file or directory’))
 Failed to execute script docker-compose
[ERROR] Failed to spin up cluster docker-compose cluster
iMac-de-Abdalla:~ abdallatoufikhossain$ »
If you run the below mentioned command, d2 cluster up 220.127.116.11 --db-version 2.37.7 --seed
the DB will get seeded automatically. You need not explicitly provide a db file as you are providing the version of DB you would need via –db-version.