Laravel Telescope connection to mysql problem by using docker network bridge

211 Views Asked by At

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Temporary failure in name resolution (SQL: insert into telescope_entries (batch_id, content, created_at, family_hash, type, uuid) values (975528a6-10a8-4f4e-b795-834edf9d71da, {"command":"make:job","exit_code":0,"arguments":{"command":"make:job","name":"Health/ProxmoxHeartBeatJob"},"options":{"force":false,"sync":false,"test":false,"pest":false,"help":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null},"hostname":"debian"}, 2022-09-23 10:01:39, ?, command, 975528a6-0f89-4ef1-89ed-a1ad477ca7e7)) {"exception":"[object] (Illuminate\Database\QueryException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Temporary failure in name resolution (SQL: insert into telescope_entries (batch_id, content, created_at, family_hash, type, uuid) values (975528a6-10a8-4f4e-b795-834edf9d71da, {"command":"make:job","exit_code":0,"arguments":{"command":"make:job","name":"Health\/ProxmoxHeartBeatJob"},"options":{"force":false,"sync":false,"test":false,"pest":false,"help":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null},"hostname":"debian"}, 2022-09-23 10:01:39, ?, command, 975528a6-0f89-4ef1-89ed-a1ad477ca7e7)) at /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php:759) [stacktrace] #0 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(898): Illuminate\Database\Connection->runQueryCallback() #1 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(878): Illuminate\Database\Connection->tryAgainIfCausedByLostConnection() #2 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(722): Illuminate\Database\Connection->handleQueryException() #3 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Illuminate\Database\Connection->run() #4 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(497): Illuminate\Database\Connection->statement() #5 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3204): Illuminate\Database\Connection->insert() #6 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(148): Illuminate\Database\Query\Builder->insert() #7 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(262): Laravel\Telescope\Storage\DatabaseEntriesRepository->Laravel\Telescope\Storage\{closure}() #8 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(149): Illuminate\Support\Collection->each() #9 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(663): Laravel\Telescope\Storage\DatabaseEntriesRepository->store() #10 [internal function]: Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #11 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(284): call_user_func() #12 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(674): Laravel\Telescope\Telescope::withoutRecording() #13 /opt/laravel/src/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(65): Laravel\Telescope\Telescope::store() #14 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #15 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #16 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(81): Illuminate\Container\Util::unwrapIfClosure() #17 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #18 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call() #19 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1177): Illuminate\Container\Container->call() #20 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(170): Illuminate\Foundation\Application->terminate() #21 /opt/laravel/src/artisan(51): Illuminate\Foundation\Console\Kernel->terminate() #22 {main}

[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Temporary failure in name resolution at /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70) [stacktrace] #0 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct() #1 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(100): Illuminate\Database\Connectors\Connector->createPdoConnection() #2 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(50): Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection() #3 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection() #4 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector->connect() #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}() #6 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1169): call_user_func() #7 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(538): Illuminate\Database\Connection->getPdo() #8 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(752): Illuminate\Database\Connection->Illuminate\Database\{closure}() #9 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(898): Illuminate\Database\Connection->runQueryCallback() #10 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(878): Illuminate\Database\Connection->tryAgainIfCausedByLostConnection() #11 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(722): Illuminate\Database\Connection->handleQueryException() #12 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Illuminate\Database\Connection->run() #13 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(497): Illuminate\Database\Connection->statement() #14 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3204): Illuminate\Database\Connection->insert() #15 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(148): Illuminate\Database\Query\Builder->insert() #16 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(262): Laravel\Telescope\Storage\DatabaseEntriesRepository->Laravel\Telescope\Storage\{closure}() #17 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(149): Illuminate\Support\Collection->each() #18 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(663): Laravel\Telescope\Storage\DatabaseEntriesRepository->store() #19 [internal function]: Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #20 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(284): call_user_func() #21 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(674): Laravel\Telescope\Telescope::withoutRecording() #22 /opt/laravel/src/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(65): Laravel\Telescope\Telescope::store() #23 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #24 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #25 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(81): Illuminate\Container\Util::unwrapIfClosure() #26 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #27 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call() #28 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1177): Illuminate\Container\Container->call() #29 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(170): Illuminate\Foundation\Application->terminate() #30 /opt/laravel/src/artisan(51): Illuminate\Foundation\Console\Kernel->terminate() #31 {main}

[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Temporary failure in name resolution at /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70) [stacktrace] #0 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct() #1 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(100): Illuminate\Database\Connectors\Connector->createPdoConnection() #2 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(50): Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection() #3 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection() #4 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector->connect() #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}() #6 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1169): call_user_func() #7 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(538): Illuminate\Database\Connection->getPdo() #8 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(752): Illuminate\Database\Connection->Illuminate\Database\{closure}() #9 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(898): Illuminate\Database\Connection->runQueryCallback() #10 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(878): Illuminate\Database\Connection->tryAgainIfCausedByLostConnection() #11 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(722): Illuminate\Database\Connection->handleQueryException() #12 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Illuminate\Database\Connection->run() #13 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(497): Illuminate\Database\Connection->statement() #14 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3204): Illuminate\Database\Connection->insert() #15 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(148): Illuminate\Database\Query\Builder->insert() #16 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(262): Laravel\Telescope\Storage\DatabaseEntriesRepository->Laravel\Telescope\Storage\{closure}() #17 /opt/laravel/src/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(149): Illuminate\Support\Collection->each() #18 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(663): Laravel\Telescope\Storage\DatabaseEntriesRepository->store() #19 [internal function]: Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #20 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(284): call_user_func() #21 /opt/laravel/src/vendor/laravel/telescope/src/Telescope.php(674): Laravel\Telescope\Telescope::withoutRecording() #22 /opt/laravel/src/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(65): Laravel\Telescope\Telescope::store() #23 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Telescope\Telescope::Laravel\Telescope\{closure}() #24 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #25 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(81): Illuminate\Container\Util::unwrapIfClosure() #26 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #27 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call() #28 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1177): Illuminate\Container\Container->call() #29 /opt/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(170): Illuminate\Foundation\Application->terminate() #30 /opt/laravel/src/artisan(51): Illuminate\Foundation\Console\Kernel->terminate() #31 {main} "}

0

There are 0 best solutions below