Temporary failure in name resolution

2 years ago

I'm trying to deploy a PHP container using MySQL, and it is crashing like

PHP Warning:  mysqli_connect(): php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Temporary failure in name resolution in /wait-for-db.php on line 12

PHP Fatal error:  Uncaught mysqli_sql_exception: php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Temporary failure in name resolution in /wait-for-db.php:12

ENABLE_ALPINE_PRIVATE_NETWORKING is set to true and

77 Replies

2 years ago

8f297c52-c464-41f8-be1a-748322966bed


2 years ago

I tried removing the alpine part and ```
PHP Warning: mysqliconnect(): phpnetwork_getaddresses: getaddrinfo for mysql.railway.internal failed: Name or service not known in /wait-for-db.php on line 12

PHP Fatal error: Uncaught mysqlisqlexception: phpnetworkgetaddresses: getaddrinfo for mysql.railway.internal failed: Name or service not known in /wait-for-db.php:12
```


2 years ago

Maybe if I insert a sleep into the start command


2 years ago

even though wait for db shouldn't be doing that


2 years ago

nice that went even better

1236825098996940800


2 years ago

yeah wait it shouldn't be doing this because

1236828320239194000


2 years ago

hmm Uncaught mysqli_sql_exception: Connection refused in /wait-for-db.php:12


2 years ago

alright well this was incredibly cursed but we chillin now

1236830249119912000


2 years ago

Brody you are going to love this template let me tell you


2 years ago

will I though?


2 years ago

I have insanely high standards


2 years ago

yes you will love it

1236833583772078000


2 years ago

47 service variables that are set incorrectly 🙂


2 years ago

currently fighting apache


2 years ago

I think I will livepatch the apache configuration inside of the start command


2 years ago

because i'm just scrappy like that


2 years ago

you wouldn't be the first


2 years ago

this is gonna work /bin/sh -c "echo \"ServerName 0.0.0.0\" >> /etc/apache2/apache2.conf && sleep 3 && /entrypoint.sh"


2 years ago

well, it worked more than it did last time


2 years ago

why does the server name matter?


2 years ago

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.2.124. Set the 'ServerName' directive globally to suppress this message

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.2.124. Set the 'ServerName' directive globally to suppress this message

[Mon May 06 00:11:12.371710 2024] [mpm_prefork:notice] [pid 88] AH00163: Apache/2.4.59 (Debian) PHP/8.2.18 configured -- resuming normal operations

[Mon May 06 00:11:12.371779 2024] [core:notice] [pid 88] AH00094: Command line: 'apache2 -D FOREGROUND'

2 years ago

with this, it still doesn't work, but at least it doesn't show this error


2 years ago

it's just a warning, it shouldn't actually matter


2 years ago

but the 3 second sleep is needed


2 years ago

maybe, but I'm still trying to get it to show up. Does railway support port 80?


2 years ago

BASED

1236842706253123600


2 years ago

bruv

1236842818404749300


2 years ago

mf be telling me theres a 500 error but then it not given me the 500 error


2 years ago

ic

1236844298000142300


2 years ago

what is railway doing

1236844481144422400


2 years ago

how didn't this get transformed


2 years ago

the question is what are you doing, that doesn't generate a valid base64 string on its own


2 years ago

you also need to use double quotes


2 years ago

o i shoulda used lower


2 years ago

I'm doing this because you can't do multiple mounts


2 years ago

POG

1236850508476711000


2 years ago

@Brody any idea why the secret generator in the template isn't working?


2 years ago

1236859802030964700


2 years ago

comes in like this

1236859932163444700


2 years ago

is that a screenshot from the service in your project or the template?


2 years ago

the first one is the template, the second is the service



2 years ago

in that case, I think I've already answered that question 😉


2 years ago

you can't generate screenshots from the template?


2 years ago

oh


2 years ago

double quotes?


2 years ago

I swear singles worked before


2 years ago

lol what


2 years ago

i meant secrets


2 years ago

sorry


2 years ago

the docs show single quotes

1236860789357543400


2 years ago

docs aren't always a single source of truth, but I am


2 years ago

fat ah ego :P
you oughta pass this one along probably


2 years ago

I should


2 years ago

another thing that should be fixed is


2 years ago

there is a slight delay between when a template is saved


2 years ago

and when the "create project" screen reflects that change


2 years ago

i think? a reload fixes that


2 years ago

that's just cache haha, hard refresh fixes it


2 years ago

yeah but its lowkey hard to get used to, if they use react they could hook into the context provider


2 years ago

they do use react lol, it's not as simple as you think


2 years ago

either way, your template doesn't use the private host and port for either mysql or redis


2 years ago

oh yeah thats because I was having issues with netowrking ^^^ and i forgot to change, I'll do that now


2 years ago

I mean I've done this sort of thing before


2 years ago

little more complex with what railway is doing


2 years ago

What is railway doing? There's not much going on with the frontend at least


2 years ago

not saying it couldn't be done, but it's likely just not worth it at this time


2 years ago

you're funny


2 years ago

Yeah, I'm sure they have bigger priorities


2 years ago

It's literally just a bog standard frontend application?


2 years ago

The only unique thing about it is the canvas


2 years ago

you're real funny


2 years ago

What am I missing


2 years ago

a whole lot


2 years ago

like?


2 years ago

far outside the scope of this thread


2 years ago

alright lol


Loading...