openthc / docker

8 stars 1 forks source link

Multiple docker services failing #8

Open mugane-dj opened 3 months ago

mugane-dj commented 3 months ago

Hello OpenTHC team,

I ran into an issue where multiple services describe in docker compose file failed to start. Here is the stack trace:

app.openthc.me  | RUN0
lab.openthc.me  | RUN0
app.openthc.me  | PHP Fatal error:  Uncaught PDOException: SQLSTATE[08006] [7] could not connect to server: Connection refused
app.openthc.me  |   Is the server running on host "sql" (172.22.0.4) and accepting
app.openthc.me  |   TCP/IP connections on port 5432? in /opt/openthc/app/vendor/edoceo/radix/lib/DB/SQL.php:27
app.openthc.me  | Stack trace:
app.openthc.me  | #0 /opt/openthc/app/vendor/edoceo/radix/lib/DB/SQL.php(27): PDO->__construct()
app.openthc.me  | #1 /opt/openthc/app/lib/App.php(78): Edoceo\Radix\DB\SQL->__construct()
app.openthc.me  | #2 /first-run.php(11): App::init_db()
app.openthc.me  | #3 {main}
app.openthc.me  |   thrown in /opt/openthc/app/vendor/edoceo/radix/lib/DB/SQL.php on line 27
lab.openthc.me  | INSTALL FIRST RUN POS
cre.openthc.me  | RUN0
lab.openthc.me  | Exception: 7:"SQLSTATE[08006] [7] could not connect to server: Connection refused
lab.openthc.me  |   Is the server running on host "sql" (172.22.0.4) and accepting
lab.openthc.me  |   TCP/IP connections on port 5432?" @ /opt/openthc/lab/vendor/edoceo/radix/lib/DB/SQL.php#27
sso.openthc.me  | RUN0
sso.openthc.me  | PHP Warning:  require_once(boot.php): failed to open stream: No such file or directory in /first-run.php on line 7
sso.openthc.me  | PHP Fatal error:  require_once(): Failed opening required 'boot.php' (include_path='.:/usr/share/php') in /first-run.php on line 7
pos.openthc.me  | RUN0
pos.openthc.me  | INSTALL FIRST RUN POS
lab.openthc.me  | !! System Error
lab.openthc.me  | The system encountered a very unexpected error.
lab.openthc.me  | Details from the request have been logged and some humans have been notified.
lab.openthc.me  | ---
lab.openthc.me  | 
lab.openthc.me  | SQLSTATE[08006] [7] could not connect to server: Connection refused
lab.openthc.me  |   Is the server running on host "sql" (172.22.0.4) and accepting
lab.openthc.me  |   TCP/IP connections on port 5432?
lab.openthc.me  | SQL.php#27
cre.openthc.me  | PHP Fatal error:  Uncaught PDOException: SQLSTATE[08006] [7] could not translate host name "dbname=" to address: Name or service not known in /opt/openthc/cre/vendor/edoceo/radix/lib/DB/SQL.php:27
cre.openthc.me  | Stack trace:
cre.openthc.me  | #0 /opt/openthc/cre/vendor/edoceo/radix/lib/DB/SQL.php(27): PDO->__construct()
cre.openthc.me  | #1 /first-run.php(13): Edoceo\Radix\DB\SQL->__construct()
cre.openthc.me  | #2 {main}
cre.openthc.me  |   thrown in /opt/openthc/cre/vendor/edoceo/radix/lib/DB/SQL.php on line 27
app.openthc.me exited with code 255
lab.openthc.me exited with code 1
cre.openthc.me exited with code 255
sso.openthc.me exited with code 255

PSA: I do not work with PHP, I just wanted to run an instance of the app to research on the track and trace implementation. Thank you!

mashiox commented 3 months ago

Thank you for giving the tires a kick, Samuel!

This appears related to how the environment is installing the database scheme, and inserting the initial set of data the environment needs to function with these services.

Our team has been working on this feature recently, and one of our big hurdles has been putting all of the data together we need, including a few unique sets we need for different use cases like testing, demos. The user data set has fewer requirements, but testing has taken a higher priority.

I will leave this issue open for any additional context, or collaboration. I will update it when I know the usability has taken a step forward.

mugane-dj commented 3 months ago

Got it! Thank you Matt.