Temporary failure in name resolution
evan
HOBBYOP

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

evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

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


evan
HOBBYOP

2 years ago

Maybe if I insert a sleep into the start command


evan
HOBBYOP

2 years ago

even though wait for db shouldn't be doing that


evan
HOBBYOP

2 years ago

nice that went even better

1236825098996940800


evan
HOBBYOP

2 years ago

yeah wait it shouldn't be doing this because

1236828320239194000


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

alright well this was incredibly cursed but we chillin now

1236830249119912000


evan
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

will I though?


brody
EMPLOYEE

2 years ago

I have insanely high standards


evan
HOBBYOP

2 years ago

yes you will love it

1236833583772078000


brody
EMPLOYEE

2 years ago

47 service variables that are set incorrectly 🙂


evan
HOBBYOP

2 years ago

currently fighting apache


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

because i'm just scrappy like that


brody
EMPLOYEE

2 years ago

you wouldn't be the first


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

well, it worked more than it did last time


brody
EMPLOYEE

2 years ago

why does the server name matter?


evan
HOBBYOP

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'

evan
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

but the 3 second sleep is needed


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

BASED

1236842706253123600


evan
HOBBYOP

2 years ago

bruv

1236842818404749300


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

ic

1236844298000142300


evan
HOBBYOP

2 years ago

what is railway doing

1236844481144422400


evan
HOBBYOP

2 years ago

how didn't this get transformed


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

you also need to use double quotes


evan
HOBBYOP

2 years ago

o i shoulda used lower


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

POG

1236850508476711000


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

1236859802030964700


evan
HOBBYOP

2 years ago

comes in like this

1236859932163444700


brody
EMPLOYEE

2 years ago

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


evan
HOBBYOP

2 years ago

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



brody
EMPLOYEE

2 years ago

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


evan
HOBBYOP

2 years ago

you can't generate screenshots from the template?


evan
HOBBYOP

2 years ago

oh


evan
HOBBYOP

2 years ago

double quotes?


evan
HOBBYOP

2 years ago

I swear singles worked before


brody
EMPLOYEE

2 years ago

lol what


evan
HOBBYOP

2 years ago

i meant secrets


evan
HOBBYOP

2 years ago

sorry


evan
HOBBYOP

2 years ago

the docs show single quotes

1236860789357543400


brody
EMPLOYEE

2 years ago

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


evan
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

I should


evan
HOBBYOP

2 years ago

another thing that should be fixed is


evan
HOBBYOP

2 years ago

there is a slight delay between when a template is saved


evan
HOBBYOP

2 years ago

and when the "create project" screen reflects that change


evan
HOBBYOP

2 years ago

i think? a reload fixes that


brody
EMPLOYEE

2 years ago

that's just cache haha, hard refresh fixes it


evan
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

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


evan
HOBBYOP

2 years ago

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


evan
HOBBYOP

2 years ago

I mean I've done this sort of thing before


brody
EMPLOYEE

2 years ago

little more complex with what railway is doing


evan
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

you're funny


evan
HOBBYOP

2 years ago

Yeah, I'm sure they have bigger priorities


evan
HOBBYOP

2 years ago

It's literally just a bog standard frontend application?


evan
HOBBYOP

2 years ago

The only unique thing about it is the canvas


brody
EMPLOYEE

2 years ago

you're real funny


evan
HOBBYOP

2 years ago

What am I missing


brody
EMPLOYEE

2 years ago

a whole lot


evan
HOBBYOP

2 years ago

like?


brody
EMPLOYEE

2 years ago

far outside the scope of this thread


evan
HOBBYOP

2 years ago

alright lol


Loading...