humanmade / altis-local-server

Local Server module for Altis
https://www.altis-dxp.com/resources/docs/local-server/
17 stars 4 forks source link

Cavalcade service fails to start #431

Closed nikolareljin closed 2 years ago

nikolareljin commented 2 years ago

When trying to run the containers with the command

composer server

the following containers fail to run:

ed12df1994b1   humanmade/altis-local-server-php:4.0.0-dev     "/usr/local/bin/cava…"   2 days ago   Restarting (1) 43 seconds ago     wsj-deloitte_cavalcade_1

When checking the error log of the service composer server logs cavalcade

Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wordpress.wp_cavalcade_jobs' doesn't exist
cavalcade_1        | #0 /etc/cavalcade/inc/class-runner.php(247): PDO->prepare('SELECT * FROM w...')
cavalcade_1        | #1 /etc/cavalcade/inc/class-runner.php(127): HM\Cavalcade\Runner\Runner->get_next_job()
cavalcade_1        | #2 /etc/cavalcade/bin/cavalcade(33): HM\Cavalcade\Runner\Runner->run()
cavalcade_1        | #3 {main}
...

Source

The following database was empty:

wordpress

on the host localhost:

e0bb2d29e7fa   biarms/mysql:5.7     "/usr/local/bin/dock…"   2 hours ago   Up 2 hours (healthy)                    0.0.0.0:49235->3306/tcp, :::49235->3306/tcp   wsj-deloitte-db

Another potential improvement would be to have the ability to expose constant port for the DB (in the ./vendor/docker-compose.yml).

OS

roborourke commented 2 years ago

Was this this from a clean set up or was there any project specific code? This would most likely happen if there's a PHP fatal error occurring. If you can't replicate it with a clean install of Altis then the issue is probably elsewhere. It happens if a project has further setup steps or has code that tries to access the database too early before WP has installed.

roborourke commented 2 years ago

Going to close this out as there seem to be no +1s or response so far. It's very likely this is not cavalcade specific and some PHP fatal error in the app prevented WP from installing. This can often be confirmed by running composer server logs php.