Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alysson-azevedo/f024a391eebf67912fdd7a499fcff897 to your computer and use it in GitHub Desktop.
Save alysson-azevedo/f024a391eebf67912fdd7a499fcff897 to your computer and use it in GitHub Desktop.
$ bin/cake bake model -c cli Plans
Welcome to CakePHP v3.2.8 Console
---------------------------------------------------------------
App : src
Path: /mnt/data/alysson/ws/flaggs/api/src/
PHP : 5.6.21
---------------------------------------------------------------
One moment while associations are detected.
Exception: SQLSTATE[08006] [7] could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? in [/mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php, line 48]
2016-05-14 04:24:24 Error: [PDOException] SQLSTATE[08006] [7] could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Stack Trace:
#0 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php(48): PDO->__construct('pgsql:dbname=ap...', 'flaggs', '', Array)
#1 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php(68): Cake\Database\Driver\Postgres->_connect('pgsql:dbname=ap...', Array)
#2 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php(45): Cake\Database\Driver\Postgres->connect()
#3 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php(165): Cake\Database\Schema\BaseSchema->__construct(Object(Cake\Database\Driver\Postgres))
#4 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Schema/Collection.php(52): Cake\Database\Driver\Postgres->schemaDialect()
#5 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(43): Cake\Database\Schema\Collection->__construct(Object(Cake\Database\Connection))
#6 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Database/Connection.php(317): Cake\Database\Schema\CachedCollection->__construct(Object(Cake\Database\Connection), true)
#7 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/ORM/Table.php(428): Cake\Database\Connection->schemaCollection()
#8 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(750): Cake\ORM\Table->schema()
#9 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(728): Bake\Shell\Task\ModelTask->getCounterCache(Object(Cake\ORM\Table))
#10 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(133): Bake\Shell\Task\ModelTask->getBehaviors(Object(Cake\ORM\Table))
#11 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(109): Bake\Shell\Task\ModelTask->getTableContext(Object(Cake\ORM\Table), 'plans', 'Plans')
#12 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(96): Bake\Shell\Task\ModelTask->bake('Plans')
#13 [internal function]: Bake\Shell\Task\ModelTask->main('Plans')
#14 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Console/Shell.php(456): call_user_func_array(Array, Array)
#15 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Console/Shell.php(450): Cake\Console\Shell->runCommand(Array, false)
#16 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(217): Cake\Console\Shell->runCommand(Array, true, Array)
#17 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(181): Cake\Console\ShellDispatcher->_dispatch(Array)
#18 /mnt/data/alysson/ws/flaggs/api/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(127): Cake\Console\ShellDispatcher->dispatch(Array)
#19 /mnt/data/alysson/ws/flaggs/api/bin/cake.php(33): Cake\Console\ShellDispatcher::run(Array)
#20 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment