Unknown Host Exception
Hey guys! I'm currently facing a weird issue by trying to deploy my spring boot backend to railway. I always get the following error: Caused by: java.net.UnknownHostException
project-id: 21fe5f38-a6b5-4843-b296-a6dde62aaa19
github-repository: https://github.com/Aegid1/Webtech_Projekt
GitHub
GitHub - Aegid1/Webtech_Projekt
Contribute to Aegid1/Webtech_Projekt development by creating an account on GitHub.
40 Replies
Project ID:
N/A
bruh
do you know why this occurrs or did i configure my project just very badly? haha
my bruh is directed towards you sending your plaintext database url
fixed it
my bad, didnt know that is a problem
its a public form lol
I am sorry
show me a screenshot of your service variables please
with the corresponding values of the variables?
we just went over this lol
where is your database hosted
on postgres on railway
okay redo that screenshot but no cropping
delete the current database variables and setup variable references for all database variables
https://docs.railway.app/develop/variables#reference-variables
and then another screenshot when thats done please
the error is still there
do you have private networking turned on in your service settings
i dont think so
is this neccessary?
just check
its not enabled
@alex for your sins, you have to help
@agid6052 can you send the whole error
well i think i also have to mention there are also some more errors above, but they just say: org.postgresql.util.PSQLException: The connection attempt failed.
i dont know if that helps
can you send me the connection code
the code you're using to connect to it
you mean the code in my application.properties of my backend, right?
sure
im like 65% sure i know what your problem is
just need to confirm
line 1
sorry
lemme edit a little more
corrected the changes
go do that
alright i give it a try
SORRY
i missed something
check the new changes
now i get the following error
welp thats all i can do for ya chief soz
can this error occurr due to my software logic?
i also tried deploying a new SpringBoot app with the same configurations but no logic and for this case the deployment worked immediately
thank you for your patience with me
@Brody @alex thank you for your support guys, literally the fastest support ive ever seen haha. I just try to figure it out by myself now
check the configuration differences
did you use my configurations?
or did you use your old ones
i used your ones
yours*
welp, its probably a you problem then haha
keep trying you'll get it eventually
i've ocme across this problem befoer and changing the configuration fixed it