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
Percy
Percy2y ago
Project ID: N/A
Brody
Brody2y ago
bruh
agid6052
agid6052OP2y ago
do you know why this occurrs or did i configure my project just very badly? haha
Brody
Brody2y ago
my bruh is directed towards you sending your plaintext database url
agid6052
agid6052OP2y ago
fixed it my bad, didnt know that is a problem
Brody
Brody2y ago
its a public form lol
agid6052
agid6052OP2y ago
I am sorry
Brody
Brody2y ago
show me a screenshot of your service variables please
agid6052
agid6052OP2y ago
with the corresponding values of the variables?
Brody
Brody2y ago
we just went over this lol
agid6052
agid6052OP2y ago
Brody
Brody2y ago
where is your database hosted
agid6052
agid6052OP2y ago
on postgres on railway
Brody
Brody2y ago
okay redo that screenshot but no cropping
agid6052
agid6052OP2y ago
Brody
Brody2y ago
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
agid6052
agid6052OP2y ago
agid6052
agid6052OP2y ago
the error is still there
Brody
Brody2y ago
do you have private networking turned on in your service settings
agid6052
agid6052OP2y ago
i dont think so is this neccessary?
Brody
Brody2y ago
just check
agid6052
agid6052OP2y ago
its not enabled
Brody
Brody2y ago
@alex for your sins, you have to help
alex
alex2y ago
@agid6052 can you send the whole error
agid6052
agid6052OP2y ago
agid6052
agid6052OP2y ago
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
alex
alex2y ago
can you send me the connection code the code you're using to connect to it
agid6052
agid6052OP2y ago
you mean the code in my application.properties of my backend, right?
alex
alex2y ago
sure im like 65% sure i know what your problem is just need to confirm
agid6052
agid6052OP2y ago
alex
alex2y ago
line 1
- jbdc:{DATABASE_URL}
+ jbdc:postgresql://{PGHOST}:{PGPORT}/{PGDATABASE}
- jbdc:{DATABASE_URL}
+ jbdc:postgresql://{PGHOST}:{PGPORT}/{PGDATABASE}
sorry lemme edit a little more corrected the changes go do that
agid6052
agid6052OP2y ago
alright i give it a try
alex
alex2y ago
SORRY i missed something check the new changes
agid6052
agid6052OP2y ago
now i get the following error
alex
alex2y ago
welp thats all i can do for ya chief soz
agid6052
agid6052OP2y ago
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
alex
alex2y ago
check the configuration differences did you use my configurations? or did you use your old ones
agid6052
agid6052OP2y ago
i used your ones yours*
agid6052
agid6052OP2y ago
alex
alex2y ago
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
Want results from more Discord servers?
Add your server