USACE / cwms-data-api

Corps Water Management System RESTful Data Service
MIT License
13 stars 14 forks source link

Docker-compose failing startup #465

Closed adamkorynta closed 10 months ago

adamkorynta commented 12 months ago

@rripken and @ktarbet were having issues getting the docker-compose to startup in their development environments. The specific errors can be added to the description or as comments.

ktarbet commented 12 months ago

15-Nov-2023 17:41:22.005 SEVERE [http-nio-7000-exec-1] cwms.cda.security.OpenIDAccessManager. Unable to initialize realm. data-api_1 | java.net.ConnectException: Connection refused (Connection refused) data-api_1 | at java.net.PlainSocketImpl.socketConnect(Native Method) data-api_1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

MikeNeilson commented 12 months ago

hmm, that implements either a network/hostname/port problem or that the api isn't actually waiting for the database to be ready.

ktarbet commented 12 months ago

@MikeNeilson Thanks for pointing me to networking.

The instructions say: Add <real host ip> cwms-data.localhost auth.localhost traefik.localhost to the /etc/hosts file

So instead of 127.0.0.1 I used 192.168.206.134 in /etc/hosts

192.168.206.134 is my Private IP, and I can now see the swagger UI!

MikeNeilson commented 12 months ago

It would be good to figure out a way to not need to do that, but given how just utterly picky some of those services are about URLs and docker with address I'm not sure we can.

MikeNeilson commented 12 months ago

Perhaps a bigger font could help future users though.

ktarbet commented 12 months ago

I have a PR here to warn about 127.0.0.1 : https://github.com/USACE/cwms-data-api/pull/466

ktarbet commented 10 months ago

Closing this issue - docker compose is working for me -- below is my writeup.

https://github.com/USACE/cwms-data-api/wiki/How-to-use-Docker%E2%80%90compose-with-a-windows-Client