db_host problem

cspo6HOBBY

9 months ago

I'm facing an error during the deployment; there is a problem with the DB_HOST as it cannot be recognized. You can see the logs below.

15 2.642 SQLSTATE[HY000] [2002] phpnetworkgetaddresses: getaddrinfo for mysql-b4vs.railway.internal failed: Name or service not known (SQL: select * from informationschema.tables where tableschema = railway and tablename = migrations and tabletype = 'BASE TABLE')

15 2.643

15 2.643 at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712

15 2.645 708▕ // If an exception occurs when attempting to run a query, we'll format the error

15 2.645 709▕ // message to include the bindings with SQL, which will make this exception a

15 2.645 710▕ // lot more helpful to the developer instead of just the database's errors.

15 2.645 711▕ catch (Exception $e) {

15 2.645 ➜ 712▕ throw new QueryException(

15 2.645 713▕ $query, $this->prepareBindings($bindings), $e

15 2.645 714▕ );

15 2.645 715▕ }

15 2.645 716▕ }

15 2.646

15 2.646 +33 vendor frames

15 2.646 34 artisan:35

15 2.646 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

15 ERROR: process "/bin/bash -ol pipefail -c composer install && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan db:seed --force" did not complete successfully: exit code: 1

[11/12] RUN composer install && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan db:seed --force:

2.645 711▕ catch (Exception $e) {

2.645 ➜ 712▕ throw new QueryException(

2.645 713▕ $query, $this->prepareBindings($bindings), $e

2.645 714▕ );

2.645 715▕ }

2.645 716▕ }

2.646

2.646 +33 vendor frames

2.646 34 artisan:35

2.646 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Dockerfile:25

23 | # build phase

24 | COPY . /app/.

25 | >>> RUN composer install && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan db:seed --force

26 |

27 |

ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan db:seed --force" did not complete successfully: exit code: 1

Error: Docker build failed

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

5 Replies

9 months ago

Are you getting this error during build or runtime?


cspo6HOBBY

9 months ago

during build


9 months ago

Try enabling the new builder in the service settings.


cspo6HOBBY

9 months ago

it works, thank you


9 months ago

No problem!


Status changed to Solved brody 9 months ago