Application Failed to Respond Error
newuseryejin
FREEOP

10 months ago

It's done up to deployment, but it's still 502 Application failed to respond There's an error. I'm afraid the environmental variable value is discrete, so I can run it locally on .env. What's the problem? I've been doing it for 3 hours, but I'm not sure..

And as a result of looking into it, it's usually a port number mismatch problem, so I checked everything, but there seems to be no problem.

And please tell me how to post an additional picture. I want to share the situation but I don't know how to post a picture.

Solved$10 Bounty

Pinned Solution

10 months ago

What is the port shown in the deployment logs? When I had the exact same configuration as you, Tomcat insisted on binding to 8080. It was only when I put server.port=9000 in application.properties it worked.

You should see a line like the following in your deployment logs:

2025-05-21T13:52:43.717Z  INFO 1 --- [helloworld] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 9000 (http)

Can you confirm this says 9000 and not 8080?

5 Replies

10 months ago

How do you know it's not a port problem?


memamun
HOBBY

10 months ago

Your app might be crashing on start due to a missing .env variable. Locally .env exists, but in production, you must set them in Railway:

  • Go to your project on Railway

  • Click Settings > Variables

  • Add all the keys/values manually

    Just drag and drop the image into this chat box or

  • Click the paperclip paperclip emoji icon (if available) and upload it
    If you're on mobile, you may need to tap the chat box and find a file/image upload option.


memamun

Your app might be crashing on start due to a missing .env variable. Locally .env exists, but in production, you must set them in Railway:Go to your project on RailwayClick Settings > VariablesAdd all the keys/values manuallyJust drag and drop the image into this chat box orClick the paperclip icon (if available) and upload itIf you're on mobile, you may need to tap the chat box and find a file/image upload option.

newuseryejin
FREEOP

10 months ago

Thank you for telling me how to upload images!!!

I set variables like the image, but it's not working. Is there anything else I need to check??


dev

How do you know it's not a port problem?

newuseryejin
FREEOP

10 months ago

I'm uploading the settings I set in application.yml and the network settings of the project I posted on the railway! Isn't there no problem if it's like this? Is there anything else I need to check?


10 months ago

What is the port shown in the deployment logs? When I had the exact same configuration as you, Tomcat insisted on binding to 8080. It was only when I put server.port=9000 in application.properties it worked.

You should see a line like the following in your deployment logs:

2025-05-21T13:52:43.717Z  INFO 1 --- [helloworld] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 9000 (http)

Can you confirm this says 9000 and not 8080?


Status changed to Solved noahd 5 months ago


Loading...