4 days ago
Project
My Java Spring Boot Maven application:GitHub: https://github.com/Pepin4/NaturoApp
Hosted on Railway: naturoapp.up.railway.app
Issue
My app builds and deploys successfully — no errors in the build or deploy logs.
However, when I open the main page, I get this error:
Application failed to respond
Request ID:iJUa4xtKRfeZWcYIg5js2Q
These are the logs I see from the Railway proxy:
Railway log examples (2 entries)
Log 1:
/favicon.ico
— Status: 499
{
"method": "GET",
"path": "/favicon.ico",
"httpStatus": 499,
"responseDetails": "client has closed the request before the server could send a response"
}
Log 2:
/
— Status: 502
{
"method": "GET",
"path": "/",
"httpStatus": 502,
"responseDetails": "failed to forward request to upstream: connection refused"
}
What I’ve checked so far
The app builds with
mvn clean package
Port 8080 is used (default in Spring Boot)
My
pom.xml
includesspring-boot-maven-plugin
No
Procfile
yet (Railway auto-detects Maven projects)
Possible causes
Maybe Railway is not correctly detecting the
.jar
file?Should I add a Procfile like:
web: java -jar target/NaturoApp-0.0.1-SNAPSHOT.jar
?Could there be a misconfiguration in my
application.properties
or port setup?
Asking for help
I’ve been stuck on this issue for over a week now.
Any help or guidance to diagnose why Railway can’t seem to detect and launch my Spring Boot app would be greatly appreciated
System info
Java 17
Spring Boot 3.2.5
Maven
No database yet (simple REST API)
Railway free plan
Thanks in advance to anyone who takes the time to help
— Pepin4
22 Replies
4 days ago
The github repo you provided is private so i cannot review the code.
To me this looks like a networking issue where the application is listening on a different host/interface. Spring by default listens on localhost:8080
so this means it's only accepting connections from within that same container on the localhost
interface.
When railway tries to connect to it, it can't and that's why you get a connection refused 502 response.
Change the server address/host in your code to 0.0.0.0
4 days ago
in your application.properties
set server.address=0.0.0.0
then do mvn clean package
4 days ago
its public
For the following solution, I had already tried it, but it didn't change anything.
Still, I’ve added the line again based on your suggestion.
in your application.properties
set server.address=0.0.0.0
then do mvn clean package
Attachments
pepin4
its public For the following solution, I had already tried it, but it didn't change anything.Still, I’ve added the line again based on your suggestion. in your application.propertiesset server.address=0.0.0.0then do mvn clean package
4 days ago
The actual clickable link is different in your original post. try it
The way you're trying to access the environment variable for the port is nodejs syntax. For spring boot application.properties
do server.port=${PORT:8080}
4 days ago
It wasn’t using process.env
this morning — I had just forgotten to remove it after a test.
So no, unfortunately, that’s not the solution.
4 days ago
Is the deployment failing after successful build or simply not responding ?
Can you post your full deploy logs ?
smolpaw
Is the deployment failing after successful build or simply not responding ?Can you post your full deploy logs ?
4 days ago
Deploy Logs : ok
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
07:50:23,046 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.catalina.util.LifecycleBase] to ERROR
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
07:50:23,046 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating ERROR level on Logger[org.apache.catalina.util.LifecycleBase] onto the JUL framework
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
07:50:23,046 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.coyote.http11.Http11NioProtocol] to WARN
07:50:23,046 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating WARN level on Logger[org.apache.coyote.http11.Http11NioProtocol] onto the JUL framework
07:50:23,046 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.sshd.common.util.SecurityUtils] to WARN
07:50:23,046 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating WARN level on Logger[org.apache.sshd.common.util.SecurityUtils] onto the JUL framework
07:50:23,068 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.tomcat.util.net.NioSelectorPool] to WARN
07:50:23,068 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating WARN level on Logger[org.apache.tomcat.util.net.NioSelectorPool] onto the JUL framework
07:50:23,068 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.eclipse.jetty.util.component.AbstractLifeCycle] to ERROR
07:50:23,068 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating ERROR level on Logger[org.eclipse.jetty.util.component.AbstractLifeCycle] onto the JUL framework
07:50:23,068 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.hibernate.validator.internal.util.Version] to WARN
07:50:23,068 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@41d426b5 - Propagating WARN level on Logger[org.hibernate.validator.internal.util.Version] onto the JUL framework
07:50:23,068 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.springframework.boot.actuate.endpoint.jmx] to WARN
:: Spring Boot :: (v3.2.2)
2025-06-02T07:50:23.418Z INFO 1 --- [NaturoApp] [ main] b.g.n.dimitri.NaturopathieApplication : Starting NaturopathieApplication v0.0.1-SNAPSHOT using Java 17.0.7 with PID 1 (/app/target/NaturoApp-0.0.1-SNAPSHOT.jar started by root in /app)
2025-06-02T07:50:23.423Z INFO 1 --- [NaturoApp] [ main] b.g.n.dimitri.NaturopathieApplication : No active profile set, falling back to 1 default profile: "default"
2025-06-02T07:50:25.527Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2025-06-02T07:50:25.528Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2025-06-02T07:50:25.772Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 197 ms. Found 13 JPA repository interfaces.
2025-06-02T07:50:25.811Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.PatientRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.793Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2025-06-02T07:50:25.795Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2025-06-02T07:50:25.811Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.CountryRepository; If you want this repository to be a Redis repository, consider annotating your
4 days ago
2025-06-02T07:50:25.812Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9 ms. Found 0 Redis repository interfaces.
2025-06-02T07:50:25.808Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.CityRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.808Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.AppointmentRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.808Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.IssueRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.809Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.SolutionRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.809Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.AddressRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
4 days ago
2025-06-02T07:50:25.810Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.SupplierRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.810Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.AppointmentIssueSolutionRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.810Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.UserRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.811Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.ContactRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
4 days ago
2025-06-02T07:50:25.811Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.MedicalInfoRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:25.811Z INFO 1 --- [NaturoApp] [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface be.gestion.naturopathie.dimitri.repository.IssueSolutionRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2025-06-02T07:50:27.312Z INFO 1 --- [NaturoApp] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-06-02T07:50:27.323Z INFO 1 --- [NaturoApp] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-06-02T07:50:27.323Z INFO 1 --- [NaturoApp] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.18]
2025-06-02T07:50:27.571Z INFO 1 --- [NaturoApp] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-06-02T07:50:27.571Z INFO 1 --- [NaturoApp] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3599 ms
2025-06-02T07:50:28.212Z INFO 1 --- [NaturoApp] [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2025-06-02T07:50:28.470Z INFO 1 --- [NaturoApp] [ main] org.hibernate.Version
4 days ago
2025-06-02T07:50:28.470Z INFO 1 --- [NaturoApp] [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.4.1.Final
2025-06-02T07:50:28.581Z INFO 1 --- [NaturoApp] [ main] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled
2025-06-02T07:50:29.013Z INFO 1 --- [NaturoApp] [ main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer
2025-06-02T07:50:29.038Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2025-06-02T07:50:29.410Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@7544260a
2025-06-02T07:50:29.413Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2025-06-02T07:50:30.557Z INFO 1 --- [NaturoApp] [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2025-06-02T07:50:31.192Z INFO 1 --- [NaturoApp] [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
4 days ago
I see that you have redis as a dependency in pom.xml but you are not actively using it.
As a result logs show that spring's auto-configuration for Redis is triggering.
Could you comment out the redis dependency part ?<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
rebuild your project: mvn clean package
redeploy
4 days ago
Done, no difference — still getting the same errors.
pepin4
Done, no difference — still getting the same errors.
4 days ago
If there are errors in the logs then please post it here
4 days ago
Can you show me a screenshot of your settings -> public networking section of this service ?
4 days ago
. ____ _ __ _ _
/\\ / ___'_ __ _ ()_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.2.2)
2025-06-02T08:31:28.866Z INFO 1 --- [NaturoApp] [ main] b.g.n.dimitri.NaturopathieApplication : Starting NaturopathieApplication v0.0.1-SNAPSHOT using Java 17.0.7 with PID 1 (/app/target/NaturoApp-0.0.1-SNAPSHOT.jar started by root in /app)
2025-06-02T08:31:28.869Z INFO 1 --- [NaturoApp] [ main] b.g.n.dimitri.NaturopathieApplication : No active profile set, falling back to 1 default profile: "default"
2025-06-02T08:31:30.548Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2025-06-02T08:31:30.667Z INFO 1 --- [NaturoApp] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 70 ms. Found 13 JPA repository interfaces.
2025-06-02T08:31:32.131Z INFO 1 --- [NaturoApp] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-06-02T08:31:32.216Z INFO 1 --- [NaturoApp] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-06-02T08:31:32.216Z INFO 1 --- [NaturoApp] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.18]
2025-06-02T08:31:32.388Z INFO 1 --- [NaturoApp] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-06-02T08:31:32.389Z INFO 1 --- [NaturoApp] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3052 ms
2025-06-02T08:31:33.127Z INFO 1 --- [NaturoApp] [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2025-06-02T08:31:33.526Z INFO 1 --- [NaturoApp] [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.4.1.Final
2025-06-02T08:31:33.691Z INFO 1 --- [NaturoApp] [ main] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled
2025-06-02T08:31:34.334Z INFO 1 --- [NaturoApp] [ main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer
2025-06-02T08:31:34.428Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2025-06-02T08:31:35.122Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@579f3c8e
2025-06-02T08:31:35.124Z INFO 1 --- [NaturoApp] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
4 days ago
no its ok juste bad request
requestId:"GZaZehhMRhetU8LpnD36RA"
timestamp:"2025-06-02T08:29:58.040618428Z"
method:"GET"
path:"/favicon.ico"
host:"naturoapp.up.railway.app"
httpStatus:499
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/2.0"
responseDetails:"client has closed the request before the server could send a response"
totalDuration:1
upstreamAddress:"http://[fd12:dfc1:c9b0:0:1000:6:ae8:30c3]:8080"
clientUa:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0"
upstreamRqDuration:1
txBytes:0
rxBytes:555
srcIp:"81.241.181.18"
edgeRegion:"europe-west4"
requestId:"myAC7_-7QFCFeCaQvVzGSw"
timestamp:"2025-06-02T08:31:19.196769654Z"
method:"GET"
path:"/"
host:"naturoapp.up.railway.app"
httpStatus:502
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/2.0"
responseDetails:"failed to forward request to upstream: connection refused"
totalDuration:10994
upstreamAddress:"http://[fd12:dfc1:c9b0:0:1000:6:ae8:30c3]:8080"
clientUa:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
upstreamRqDuration:10836
txBytes:4682
rxBytes:1360
srcIp:"104.28.196.83"
edgeRegion:"asia-southeast1"
4 days ago
look screen ;)
Attachments
2 days ago
One solution would be to try, if possible, to change the Spring version, as it no longer offers support at the current date.
I've had problems with this here.
Attachments
17 hours ago
Unfortunately, this did not resolve the issue. Given the urgency, I decided to switch to another platform that also allows free hosting of this project.
Although the page loading speed is significantly limited, it remains sufficient for the immediate needs of my application.
Thank you nonetheless for your assistance.
pepin4
Unfortunately, this did not resolve the issue. Given the urgency, I decided to switch to another platform that also allows free hosting of this project.Although the page loading speed is significantly limited, it remains sufficient for the immediate needs of my application.Thank you nonetheless for your assistance.
17 hours ago
So it works on koyeb but not on railway with the same code ?
Would you like to try dockerfile deployment ? I can open up a pull request with the file.
pepin4
Unfortunately, this did not resolve the issue. Given the urgency, I decided to switch to another platform that also allows free hosting of this project.Although the page loading speed is significantly limited, it remains sufficient for the immediate needs of my application.Thank you nonetheless for your assistance.
16 hours ago
I went ahead and created a Dockerfile
Then created a docker container for the app and mysql locally and it ran successfully.
Could you review the pull request and give railway deployment another try ?