Erudika / scoold

A Stack Overflow clone for teams (self-hosted or hosted)
https://scoold.com
Apache License 2.0
865 stars 238 forks source link

docker compose scoold container fails to contact para container #180

Closed csbrown closed 4 years ago

csbrown commented 4 years ago
scoold_1  | 2020-06-30 16:43:48 [ERROR] No connection to Para backend. Retrying connection in 10s (attempt 5 of 10)...
scoold_1  | 2020-06-30 16:43:58 [ERROR] No connection to Para backend. Retrying connection in 10s (attempt 6 of 10)...
scoold_1  | 2020-06-30 16:44:08 [ERROR] No connection to Para backend. Retrying connection in 10s (attempt 7 of 10)...

I have followed the instructions to deploy via docker compose exactly. Including creating the "Scoold" app via the para cli and copying the access and secret keys into my scoold-application.conf.

There doesn't seem to be any other information about why the connection is failing. The rest of the output is:

para_1    | 2020-06-30 16:47:25 [INFO ] --- Para.initialize() [production] ---
para_1    | 2020-06-30 16:47:25 [INFO ] Loaded new DAO, Search and Cache implementations - H2DAO, LuceneSearch and CaffeineCache.
para_1    | 2020-06-30 16:47:26 [INFO ] Server is healthy.
para_1    | 2020-06-30 16:47:26 [INFO ] Found root app 'para' and 1 existing child app(s).
para_1    | 2020-06-30 16:47:26 [INFO ] Instance #1 initialized.
para_1    | 2020-06-30 16:47:26 [INFO ] Starting ParaServer on eaa81e5f7739 with PID 1 (/para/para-jar-1.37.0.jar started by para in /para)
para_1    | 2020-06-30 16:47:26 [INFO ] The following profiles are active: production
para_1    | 2020-06-30 16:47:26 [INFO ] Listening on port 8080...
para_1    | 2020-06-30 16:47:28 [INFO ] Started ParaServer in 1.74 seconds (JVM running for 4.841)
scoold_1  |                           __    __
scoold_1  |    ______________  ____  / /___/ /
scoold_1  |   / ___/ ___/ __ \/ __ \/ / __  /
scoold_1  |  (__  ) /__/ /_/ / /_/ / / /_/ /
scoold_1  | /____/\___/\____/\____/_/\__,_/     (v1.39.3)
scoold_1  | 
scoold_1  | 2020-06-30 16:47:31 [INFO ] Starting ScooldServer v1.39.3 on 7cf7fe04bd63 with PID 1 (/scoold/scoold-1.39.3.jar started by scoold in /scoold)
scoold_1  | 2020-06-30 16:47:31 [INFO ] The following profiles are active: production
scoold_1  | 2020-06-30 16:47:32 [INFO ] Listening on port 8000...
scoold_1  | 2020-06-30 16:47:32 [INFO ] Initialized ParaClient with endpoint http://localhost:8080 and access key 'app:scoold'.

I'm not entirely sure how to list the available apps, but the line about "1 existing child apps" presumably refers to the Scoold app I created. Any thoughts on how to go about debugging this?

albogdano commented 4 years ago

When you use Docker you should point Scoold to the appropriate Docker host running Para which I think is not http://localhost:8080. Check your Docker setup and the docs to find out the correct hostname.

albogdano commented 4 years ago

In case Para is actually running on localhost:8080, try updating your scoold-application.conf file with the access keys for app:scoold then restart the Scoold container.

csbrown commented 4 years ago

Yes, I had to update para.endpoint in my scoold-application.conf to point to the IP address of the para container. Since my containers were both running on the same machine, I had initially assumed that I could use localhost:8080. However, localhost from the scoold container's point of view is the scoold container, not the machine. So I replaced localhost:8080 with the docker-assigned software-IP of the para container, which is usually 172.18.something. I could have also used the actual network IP address of the machine. In any case, this might be a good note to make in the docker-compose docs, since the example scoold-application config will absolutely need this line changed.

albogdano commented 4 years ago

README updated.