Temporary failure in name resolution

a year 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

0 Replies

a year ago

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


a year 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
```


a year ago

Maybe if I insert a sleep into the start command


a year ago

even though wait for db shouldn't be doing that


a year ago

nice that went even better

1236825098996940800


a year ago

yeah wait it shouldn't be doing this because

1236828320239194000


a year ago

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


a year ago

alright well this was incredibly cursed but we chillin now

1236830249119912000


a year ago

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


a year ago

will I though?


a year ago

I have insanely high standards


a year ago

yes you will love it

1236833583772078000


a year ago

47 service variables that are set incorrectly 🙂


a year ago

currently fighting apache


a year ago

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


a year ago

because i'm just scrappy like that


a year ago

you wouldn't be the first


a year ago

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


a year ago

well, it worked more than it did last time


a year ago

why does the server name matter?


a year 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'

a year ago

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


a year ago

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


a year ago

but the 3 second sleep is needed


a year ago

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


a year ago

BASED

1236842706253123600


a year ago

bruv

1236842818404749300


a year ago

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


a year ago

ic

1236844298000142300


a year ago

what is railway doing

1236844481144422400


a year ago

how didn't this get transformed


a year ago

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


a year ago

you also need to use double quotes


a year ago

o i shoulda used lower


a year ago

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


a year ago

POG

1236850508476711000


a year ago

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


a year ago

1236859802030964700


a year ago

comes in like this

1236859932163444700


a year ago

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


a year ago

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



a year ago

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


a year ago

you can't generate screenshots from the template?


a year ago

oh


a year ago

double quotes?


a year ago

I swear singles worked before


a year ago

lol what


a year ago

i meant secrets


a year ago

sorry


a year ago

the docs show single quotes

1236860789357543400


a year ago

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


a year ago

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


a year ago

I should


a year ago

another thing that should be fixed is


a year ago

there is a slight delay between when a template is saved


a year ago

and when the "create project" screen reflects that change


a year ago

i think? a reload fixes that


a year ago

that's just cache haha, hard refresh fixes it


a year ago

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


a year ago

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


a year ago

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


a year ago

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


a year ago

I mean I've done this sort of thing before


a year ago

little more complex with what railway is doing


a year ago

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


a year ago

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


a year ago

you're funny


a year ago

Yeah, I'm sure they have bigger priorities


a year ago

It's literally just a bog standard frontend application?


a year ago

The only unique thing about it is the canvas


a year ago

you're real funny


a year ago

What am I missing


a year ago

a whole lot


a year ago

like?


a year ago

far outside the scope of this thread


a year ago

alright lol


Temporary failure in name resolution - Railway Help Station