Closed bbutel closed 4 years ago
Hi @bbutel !
Thanks for your interest in ARA and sorry for the lack of response for now, busy period.
Since the 4.1.0 version, we've applied a fix to the docker's entrypoint. Could you try with the new version of the docker images (or re run your docker-compose up
which will download the new version of the images) ?
Still not working but error is not the same (see attached logs). When I got to http://localhost:8080, nothing happens
Hmm, it seems that your server is unable to communicate with your database...
Could you please do a
docker-compose down
docker ps -a
And give me the output of this ?
I'll investigate also on my own computer and keep you in touch
Before running "docker-compose down":
docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 550c97c57c64 decathlon/ara-server:latest "sh /opt/ara/entrypo…" 40 seconds ago Exited (137) 5 seconds ago pocreport_server_1 296920fc2c48 decathlon/ara-db:latest "docker-entrypoint.s…" 41 seconds ago Exited (0) 3 seconds ago pocreport_db_1
After running"docker-compose down":
docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Interesting !
Can you try again a docker-compose up
after running a docker-compose down
?
Note : When you do a Ctrl+C
in a terminal after a docker-compose up
it will not stop the containers, you have to manually do a docker-compose down
everytime 🙂
Hello again @bbutel !
After doing a docker-compose up
, could run the following commands in another terminal please :
docker inspect --format='{{print .Image 0}}' app_db_1
docker inspect --format='{{print .Image 0}}' app_server_1
and give me the output of these two commands ?
I suspect that the docker-compose command doesn't download the newer version of the images and keep the one you have locally :)
The retrieved SHA256 should be :
sha256:c1ba83a12a9951e345d584a7d474e860e847f248bb0737816fa77f7742009f12
sha256: 49c66a302ff18833eea49187770fe12e0c4fbd5940f26cc43c27ab7f0470a843
docker inspect --format='{{print .Image 0}}' app_db_1
Error: No such object: app_db_1
docker inspect --format='{{print .Image 0}}' app_server_1
Error: No such object: app_server_1
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3d344a670ec6 decathlon/ara-server:latest "sh /opt/ara/entrypo…" About a minute ago Up 59 seconds 0.0.0.0:8080->8080/tcp pocreport_server_1
6058530475ff decathlon/ara-db:latest "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:3306->3306/tcp pocreport_db_1
docker inspect --format='{{print .Image 0}}' pocreport_server_1 sha256:bcc614e8b36011d515c6ecba182e46a8e021052a47bc427c77db1735e05dd9600 docker inspect --format='{{print .Image 0}}' pocreport_db_1 sha256:8ff2f19dc723cfe7289799016b41d0c27a0f0224ed1a5ae5f2fb134078a4eb190
indeed, sha are not the same
Could you try update the docker-compose file and replace the latest
(in line 8 and 16) by 4.1.0
and retry please ?
Done. After updating compose file, both images are downloaded but docker-compose up ends with the same behavior as before.
docker-compose up > error_log.txt Creating network "pocreport_default" with the default driver Creating pocreport_db_1 ... Creating pocreport_db_1 ... done Creating pocreport_server_1 ... Creating pocreport_server_1 ... done
Ok, the error log shows that the Host host.docker.internal
can't be resolved (which is the DNS used by docker-compose
). It seems that this is an issue on older version of Docker for mac : https://github.com/docker/for-linux/issues/264#issuecomment-389371854
What's the version of your Docker for mac ? (In your tray, click on the Docker icon, and in the menu click on About Docker Desktop
) I'm interested in the following informations :
For information I'm unable to reproduce the error with the following version of docker for mac
`docker version Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea838 Built: Wed Nov 13 07:29:52 2019 OS/Arch: linux/amd64 Experimental: false
Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea838 Built: Wed Nov 13 07:28:22 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683 `
Note that I'm not on Mac but on Ubuntu
Ok 😄
Could you check that the line docker.host.internal
appears in your /etc/hosts
file (Host and container) ?
I think that this is not a problem relative strictly to ARA but to Docker itself 🤔 Here I find someone who also got your problem and fix it (with a workaround) : https://dev.to/bufferings/access-host-from-a-docker-container-4099
I'll try with an Ubuntu OS if I reproduce your error
Hi @bbutel !
Just to let you know : I managed to reproduce your error on a Ubuntu 18.04 LTS VM.
I'll look into it a little deeper
Hi again @bbutel !
I figured it out ! Like I thought, the bug was not in ARA but in Docker itself. It seems that the host.docker.internal
DNS isn't implemented in Docker for GNU/Linux (see https://github.com/moby/moby/pull/40007).
As a workaround, you can edit your docker-compose.yml
file and replace the host.docker.internal
with this IP address 172.17.0.1
On my side, I will update the docs.
Regarding the dead link on https://github.com/Decathlon/ara/blob/version/4.1.0/docker/README.adoc#head, it's because those path are relatives and the branch version/4.1.0
is now deleted. You can refresh your browser and check the doc directly on master or on version/5.0.0
Thx, its works
Describe the bug On documentation for Mac (or a GNU/Linux PC), it is written: after retrieve docker-compose.yaml file, run "docker-compose up" failed In console log, i've got : "Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher"
Entire log provided in attachment. Also note that some link into the document are dead: https://github.com/Decathlon/ara/blob/version/4.1.0/docker/README.adoc#head error.log