OWASP/crAPI

'crapi-identity' container killed shortly after docker-compose up

unaPoloGTIc opened this issue · 2 comments

On 'develop' branch, last commit is
`commit 3231797 (HEAD -> develop, origin/develop, origin/HEAD)
Merge: edf286c e36040f
Author: Roshan Piyush roshan.piyush@traceable.ai
Date: Tue Jul 20 22:48:13 2021 +0530

Merge pull request #3 from PauloASilva/fix/typos

fix: typos on signup form & welcome email`

starting with
$ docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d

after 1-2 minutes, crapi-web and crapi-community fail and complain that crapi-identity isn't available
Host crapi-identity:8080 not yet available...

log of crapi-identity:
`--------------------------------------------------------
docker-compose-wait 2.7.3

Starting with configuration:

  • Hosts to be waiting for: [postgresdb:5432,mongodb:27017]
  • Timeout before failure: 120 seconds
  • TCP connection timeout before retry: 5 seconds
  • Sleeping time before checking for hosts availability: 0 seconds
  • Sleeping time once all hosts are available: 0 seconds
  • Sleeping time between retries: 5 seconds

Checking availability of postgresdb:5432
Host postgresdb:5432 is now available!

Checking availability of mongodb:27017
Host mongodb:27017 is now available!

docker-compose-wait - Everything's fine, the application can now start!

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.3.0.RELEASE)

2021-07-27 12:43:20.820 INFO 8 --- [ main] com.crapi.CRAPIBootApplication : Starting CRAPIBootApplication v1.0-SNAPSHOT on 90c9d95461f0 with PID 8 (/app/user-microservices-1.0-SNAPSHOT.jar started by root in /)
2021-07-27 12:43:21.004 INFO 8 --- [ main] com.crapi.CRAPIBootApplication : No active profile set, falling back to default profiles: default
2021-07-27 12:43:43.504 INFO 8 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2021-07-27 12:43:44.220 INFO 8 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 700ms. Found 8 JPA repository interfaces.
Killed`

Seems like your instance of crapi-identity took more than 120s to start. Please change the timeout in docker-compose.yml from WAIT_HOSTS_TIMEOUT=120 to WAIT_HOSTS_TIMEOUT=240 and verify.

Hi @piyushroshan thanks for the suggestion,
240 is the new default I see after pulling, I tried 700 as well, still the same.

0f64b4dbc8c7 crapi-web "/bin/sh -c '/wait &…" 3 minutes ago Up 3 minutes (health: starting) 127.0.0.1:8888->80/tcp crapi-web
fd978f48780b crapi-workshop "/bin/sh -c '/wait &…" 3 minutes ago Up 3 minutes (health: starting) 8000/tcp crapi-workshop
ba053c800ca2 crapi-community "/bin/sh -c '/wait &…" 3 minutes ago Up 3 minutes (health: starting) 8087/tcp crapi-community