Application failed to respond This error appears to be caused by the application.

ednaodettaTRIAL

3 months ago

Please help. I've tried everything and I'm just stressed out. I've deployed my laravel app and created a new database from railway, I've changed the DB settings in my .env local. But the link just said 502 Bad gateway even before I've added the database and after. This is the error from the deploy log. PLEASE TELL ME WHAT TO DO.

[laravel:warn] Your app configuration references the MYSQL_ATTR_SSL_CA environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the DB_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the DB_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the REDIS_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the REDIS_USERNAME environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the REDIS_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the REDIS_USERNAME environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_ACCESS_KEY_ID environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_SECRET_ACCESS_KEY environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_BUCKET environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_ENDPOINT environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the LOG_SLACK_WEBHOOK_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the PAPERTRAIL_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the PAPERTRAIL_PORT environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the LOG_STDERR_FORMATTER environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the MAIL_SCHEME environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the MAIL_URL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the POSTMARK_MESSAGE_STREAM_ID environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the MAIL_LOG_CHANNEL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the DB_QUEUE_CONNECTION environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_ACCESS_KEY_ID environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_SECRET_ACCESS_KEY environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SQS_SUFFIX environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the POSTMARK_TOKEN environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_ACCESS_KEY_ID environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the AWS_SECRET_ACCESS_KEY environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the RESEND_KEY environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SLACK_BOT_USER_OAUTH_TOKEN environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SLACK_BOT_USER_DEFAULT_CHANNEL environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SESSION_CONNECTION environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SESSION_STORE environment variable, but it is not set.

Feb 23 15:21:27

[laravel:warn] Your app configuration references the SESSION_SECURE_COOKIE environment variable, but it is not set.

Awaiting User Response

3 Replies

unicodeveloperPRO

3 months ago

Please change your PORT to 8080 in your settings.


Status changed to Awaiting User Response railway[bot] 3 months ago


ednaodettaTRIAL

3 months ago

Thank you so much for your response. Okay now it has changed to this

Internal Server Error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'railway.sessions' doesn't exist (Connection: mysql, SQL: select * from sessions where id = YcNAPEgBayJzE4UTYLKbpK7eINgiDiAiCAjs3L1r limit 1)

when i created mysql db from railway and changed my .env in my local, i changed the

DB_CONNECTION=mysql
DB_HOST=mysql.railway.internal
DB_PORT=3306
DB_DATABASE=railway
DB_USERNAME=root
DB_PASSWORD=

and now when I php artisan serve in my local only, it shows 

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: No such host is known. (Connection: mysql, SQL: select * from `sessions` where `id` = h2k2gIWDKCAMIxP8esVuUFwNaMGxsJz6lz8W2Zgb limit 1)

what should i do next?

Status changed to Awaiting Railway Response railway[bot] 3 months ago


unicodeveloperPRO

3 months ago

Please follow our Laravel guide https://docs.railway.com/guides/laravel


Status changed to Awaiting User Response railway[bot] 3 months ago