nystudio107 / craft

nystudio107 Craft 3 CMS scaffolding project
BSD Zero Clause License
291 stars 85 forks source link

Craft can't fetch the `info` table row #51

Closed mortscode closed 3 years ago

mortscode commented 3 years ago

Describe the bug

Following the start up instructions in the installation section. Getting stuck with this error that repeats every 30 seconds:

queue_1       | 
queue_1       |     Craft can’t fetch the `info` table row.                                                            
queue_1       |     Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project.info' doesn't exist    
queue_1       | 
queue_1       | Exception 'yii\db\Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project.queue' doesn't exist
queue_1       | The SQL being executed was: SELECT `id`
queue_1       | FROM `queue`
queue_1       | WHERE ((`channel`='queue') AND (`fail`=FALSE)) AND (`timeUpdated` < 1614148962 - `ttr`)'
queue_1       | 
queue_1       | in /var/www/project/cms/vendor/yiisoft/yii2/db/Schema.php:678
queue_1       | 
queue_1       | Error Info:
queue_1       | Array
queue_1       | (
queue_1       |     [0] => 42S02
queue_1       |     [1] => 1146
queue_1       |     [2] => Table 'project.queue' doesn't exist
queue_1       | )
queue_1       | 
queue_1       | Caused by: Exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project.queue' doesn't exist'
queue_1       | 
queue_1       | in /var/www/project/cms/vendor/yiisoft/yii2/db/Command.php:1299
queue_1       | 
queue_1       | Stack trace:
queue_1       | #0 /var/www/project/cms/vendor/yiisoft/yii2/db/Command.php(1299): PDOStatement->execute()
queue_1       | #1 /var/www/project/cms/vendor/yiisoft/yii2/db/Command.php(1165): yii\db\Command->internalExecute('SELECT `id`\nFRO...')
queue_1       | #2 /var/www/project/cms/vendor/yiisoft/yii2/db/Command.php(450): yii\db\Command->queryInternal('fetchAll', 7)
queue_1       | #3 /var/www/project/cms/vendor/yiisoft/yii2/db/Query.php(318): yii\db\Command->queryColumn()
queue_1       | #4 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(634): yii\db\Query->column(Object(craft\db\Connection))
queue_1       | #5 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(745): craft\queue\Queue->craft\queue\{closure}()
queue_1       | #6 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(644): craft\queue\Queue->_lock(Object(Closure))
queue_1       | #7 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(559): craft\queue\Queue->_moveExpired()
queue_1       | #8 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(745): craft\queue\Queue->craft\queue\{closure}()
queue_1       | #9 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(580): craft\queue\Queue->_lock(Object(Closure))
queue_1       | #10 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(126): craft\queue\Queue->reserve()
queue_1       | #11 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(141): craft\queue\Queue->run()
queue_1       | #12 /var/www/project/cms/vendor/craftcms/cms/src/queue/Command.php(88): craft\queue\Queue->listen(10)
queue_1       | #13 [internal function]: craft\queue\Command->actionListen('10')
queue_1       | #14 /var/www/project/cms/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
queue_1       | #15 /var/www/project/cms/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
queue_1       | #16 /var/www/project/cms/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('listen', Array)
queue_1       | #17 /var/www/project/cms/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('listen', Array)
queue_1       | #18 /var/www/project/cms/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('queue/listen', Array)
queue_1       | #19 /var/www/project/cms/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('queue/listen', Array)
queue_1       | #20 /var/www/project/cms/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('queue/listen', Array)
queue_1       | #21 /var/www/project/cms/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request))
queue_1       | #22 /var/www/project/cms/craft(22): yii\base\Application->run()
queue_1       | #23 {main}
queue_1       | -> craft queue/listen will retry in 30 seconds

To reproduce

Steps to reproduce the behaviour:

  1. Download via composer
  2. Duplicate and rename the example.env and example.env.sh files
  3. Run docker-compose up

Expected behavior

The environment would fire up via docker.

Versions

khalwat commented 3 years ago

Ignore all errors from queue_1 -- and look through the messages to see if there are other errors shown, probably from the database container.

khalwat commented 3 years ago

This was an issue with the MariaDB image we were using; I've switched it to the official containers in https://github.com/nystudio107/craft/releases/tag/2.4.26