db_host problem
cspo6
HOBBYOP

2 years 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] php_network_getaddresses: getaddrinfo for mysql-b4vs.railway.internal failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = railway and table_name = migrations and table_type = '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.

6 Replies

2 years ago

Are you getting this error during build or runtime?


cspo6
HOBBYOP

2 years ago

during build


2 years ago

Try enabling the new builder in the service settings.


cspo6
HOBBYOP

2 years ago

it works, thank you


2 years ago

No problem!


Status changed to Solved brody almost 2 years ago


brody

Try enabling the new builder in the service settings.

muadz-mr
FREE

a year ago

How to enable the new builder in the service setting?


Status changed to Open Railway about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...