MySQL server is not available during Dockerfile build?
zohar
TRIALOP

2 years ago

The docs state that if I reference DB variables in another service, then I can expect the DB to be available when I build my service.

However, in my (failed) build log I get the following error:

Failed to connect to your database server. The server reports the         
     following message: /SQLSTATE[HY000] [2002] php_network_getaddresses:      

     getaddrinfo for mysql-toge.railway.internal failed: Name or service not   
     known [Tip: This message normally means that there is no MySQL server     
     running on the system or that you are using an incorrect host name or port

The address is correct, so it means the DB service is indeed up, but it seem to be unavailable to my web service.

Important to note that if I build the app without trying to connect to the DB, then deployment is flawless, and the connection during run time works just fine.

What could it be?

Solved

4 Replies

zohar
TRIALOP

2 years ago

665700e5-7078-4a17-bd42-00e3b59c1a0f


2 years ago

the internal network is indeed not avaiable during build


2 years ago

sorry let me be clear, the database is available, just not via the private network, public network only


2 years ago

!s


Status changed to Solved brody • over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...