dial tcp: connect: no route to host
Anonymous
TRIALOP

2 years ago

I am seeing a lot of these errors pop up randomly. sometimes my instance just can't reach a host for some reason. I tried to rebuild and disable some proxies the app was using. But things are still breaking intermittently.

Is there a way to check if this is a platform issue or something else?

122 Replies

Anonymous
TRIALOP

2 years ago

30eb2ca4-aa10-44f8-b252-96cf312185bd


Anonymous
TRIALOP

2 years ago

hosts the app is trying to reach

api.wotblitz.eu
api.wotblitz.com
api.wotblitz.asia

brody
EMPLOYEE

2 years ago

do you happen to have static IPs enabled?


Anonymous
TRIALOP

2 years ago

I am not sure, so I am assuming I do not. At least it's not something I ever looked into/needed


brody
EMPLOYEE

2 years ago

can you check in your service settings just to be sure please?


Anonymous
TRIALOP

2 years ago

Ah it's a Pro feature - I do not


brody
EMPLOYEE

2 years ago

thanks, discord says you have a Pro badge so I thought id ask


brody
EMPLOYEE

2 years ago

raising your thread directly to the team now


brody
EMPLOYEE

2 years ago

an incident was just called <#846875565357006878>


Anonymous
TRIALOP

2 years ago

Here is a full log as well

get "https://api.wotblitz.com/wotb/account/list/?application id=...": dial tcp 92.223.56.106:443: connect: no route to host

The IPs are different, but it has been randomly happening for around a week now


brody
EMPLOYEE

2 years ago

you may not have static IPs enabled but static IPs would still be shared, so you could have ended up with a service being given the same IP


Anonymous
TRIALOP

2 years ago

I don't think I have enough knowledge on networking :D
My setup is running 1 replica at a time that is trying to reach this, though some requests are made in parallel. The services I am trying to reach are from a 3rd party as well. Is there a way for static ip to cause an issue here?
Not sure how relevant this is, but same errors occured when I had an http proxy enabled for those request


brody
EMPLOYEE

2 years ago

well it doesn't explain why you have had issues for the past week, the incident description says it started today


brody
EMPLOYEE

2 years ago

but we can reassess this after the incident has been resolved


Anonymous
TRIALOP

2 years ago

Here is the first log I am able to find on my end

05/29/2024 11:34 PM
get "https://api.wotblitz.com/wotb/account/info/?account id=1058430648&application id=...": proxyconnect tcp: dial tcp 172.96.83.75:4444: connect: no route to host

brody
EMPLOYEE

2 years ago

interesting, that's from quite a while ago


Anonymous
TRIALOP

2 years ago

yeah, I though this is an issue with the 3rd party service as their servers sometimes error out, so I did not report and tried to debug on my own


brody
EMPLOYEE

2 years ago

gotcha, we will come back to this once the team has confirmed the incident has been resolved


brody
EMPLOYEE

2 years ago

the incident has been marked as resolved, let me know if you continue to see this issue


Anonymous
TRIALOP

2 years ago

— Today at 9:20 PM
dial tcp 92.223.17.55:443: connect: no route to host
 — Today at 9:38 PM
dial tcp 92.223.7.145:443: connect: no route to host
 — Today at 11:10 PM
dial tcp 92.223.17.55:443: connect: no route to host

Still happening for me <:sadge:1244710822752813098>


brody
EMPLOYEE

2 years ago

are these the only domains you're having issues calling?


Anonymous
TRIALOP

2 years ago

yeah, I am not calling anything else


Anonymous
TRIALOP

2 years ago

a lot more requests failed overnight as well


brody
EMPLOYEE

2 years ago

what region are you deployed to?


Anonymous
TRIALOP

2 years ago

US West, I downgraded from PRO, so I am not able to adjust that


Anonymous
TRIALOP

2 years ago

just noticed I am on Legacy runtime as well, gonna swap to V2 just in case it matters


Anonymous
TRIALOP

2 years ago

logs are not loading fully now, but it's not a big deal for me


brody
EMPLOYEE

2 years ago

you're the second person I've seen report an issue with the logs, can I ask what logger you are using?


Anonymous
TRIALOP

2 years ago

https://github.com/rs/zerolog
default settings across the board


Anonymous
TRIALOP

2 years ago

I also have multiple services using the same logger, some of them seem to be logging fine-ish; the message is not being shown, but logs are there


brody
EMPLOYEE

2 years ago

what do you see if you expand the context of a blank log?


Anonymous
TRIALOP

2 years ago

expanded view is all good, but the logs are blank

1249002518004891600


brody
EMPLOYEE

2 years ago

I have an idea of what's happening, will test


Anonymous
TRIALOP

2 years ago

but sometimes it's fine

1249002636078747600


brody
EMPLOYEE

2 years ago

logs that aren't json are fine, but your json logs are blank


Anonymous
TRIALOP

2 years ago

yeah, but this log above should be around 5 lines and only 1 is visible


Anonymous
TRIALOP

2 years ago

It would looks like this on V1

1249002938249121800


brody
EMPLOYEE

2 years ago

okay ill see if i can reproduce with fiber


Anonymous
TRIALOP

2 years ago

it looks like there are now a lot of logs during startup, like container started and etc. seems like this prevents some of the service logs from being delivered right after container start


brody
EMPLOYEE

2 years ago

interesting


brody
EMPLOYEE

2 years ago

can you share your logger middleware config?


Anonymous
TRIALOP

2 years ago

import "github.com/gofiber/contrib/fiberzerolog"
...
fiber.New(fiber.Config{Network: opts.Network})
app.Use(fiberzerolog.New())

brody
EMPLOYEE

2 years ago

thanks!


brody
EMPLOYEE

2 years ago

can reproduce

1249007420550811600


Anonymous
TRIALOP

2 years ago

just updated a service and it looks like my guess was more or less correct - logs right after container start get lost. this would have logged a bunch of files loaded, but only the last one got captured

1249009449503424500


brody
EMPLOYEE

2 years ago

ill talk to the team about this monday


Anonymous
TRIALOP

2 years ago

Just got logs working, at least text ones on one replica e65c43cb-34b6-4519-8a01-6a13cdf03732


Anonymous
TRIALOP

2 years ago

json logs also worked there tho


brody
EMPLOYEE

2 years ago

is it using the v2 runtime?


Anonymous
TRIALOP

2 years ago

yes, just switched earlier as well


brody
EMPLOYEE

2 years ago

your logs are no longer blank?


Anonymous
TRIALOP

2 years ago

just in this one service, the first start after Legacy > V2 switch also logged correctly it seems 0e7a89a8-f577-4121-9a22-bc187fb0eeef


brody
EMPLOYEE

2 years ago

you can get the logs from the middeware back by doing this -

logger := zerolog.New(os.Stdout).Hook(zerolog.HookFunc(func(e *zerolog.Event, level zerolog.Level, message string) {
    e.Str("msg", message)
}))

app.Use(fiberzerolog.New(fiberzerolog.Config{
    Logger: &logger,
}))

zerolog used the message attribute, but it looks like the runtime v2 is only picking up msg


brody
EMPLOYEE

2 years ago

doesnt fix the fiber printout, but its progress

1249015046051205000


We can do now :0


brody
EMPLOYEE

2 years ago

was the message attribute not being picked up a known issue prior to this?


Anonymous
TRIALOP

2 years ago

but another service works with the same config


brody
EMPLOYEE

2 years ago

the other service is likely still on the legacy runtime


Anonymous
TRIALOP

2 years ago

    level, _ := zerolog.ParseLevel(os.Getenv("LOG_LEVEL"))
    zerolog.SetGlobalLevel(level)

    app := fiber.New(fiber.Config{
        Network: os.Getenv("NETWORK"),
    })
    app.Use(fiberzerolog.New())

1249015753651392500


Anonymous
TRIALOP

2 years ago

ah, makes sense


brody
EMPLOYEE

2 years ago

yeah this is a bug in how logs are picked up from the v2 runtime


Anonymous
TRIALOP

2 years ago

got it. it's more or less a non-issue for me, so all good


brody
EMPLOYEE

2 years ago

you can switch back to the legacy runtime in the service settings, or used my proposed temporary solution above


Anonymous
TRIALOP

2 years ago

the tcp errors have not yet popped up since V2 upgrade, but they happen in small bursts every few hours


brody
EMPLOYEE

2 years ago

tbh I'm thinking it may be an issue with the service you are calling not railway, but we will wait and see what happens


Anonymous
TRIALOP

2 years ago

i'll just stay on V2, it's gotta be better in some ways right? at least the number is higher than V1 😂


brody
EMPLOYEE

2 years ago

so true 🤣


Anonymous
TRIALOP

2 years ago

yeah, I have a suspicion as well, but idk how to test that because it is so random


Anonymous
TRIALOP

2 years ago

I'll also ask someone who uses this api on another project, maybe they have some similar issues


brody
EMPLOYEE

2 years ago

is theirs hosted on railway?


Anonymous
TRIALOP

2 years ago

nope, on GitHub Actions 😂


brody
EMPLOYEE

2 years ago

ah gotcha


Anonymous
TRIALOP

2 years ago

it's also TS, so idk if I can even compare. but i'd imagine network issues like that would pop up anywhere


Anonymous
TRIALOP

2 years ago

they got back to me - no similar errors <:sadge:1244710822752813098>


brody
EMPLOYEE

2 years ago

you would hope, wouldn't be too good if this was a "only happens on railway" type of issue


brody
EMPLOYEE

2 years ago

but you said you still get this error connecting through a proxy, thus taking railways networking completely out of the question


Anonymous
TRIALOP

2 years ago

so far it is, but I am also working on a refactor that will move to fly.io. I should start using that api heavily next week, so I will be able to compare better


Anonymous
TRIALOP

2 years ago

yeah


brody
EMPLOYEE

2 years ago

oh that's not ideal, may I ask why you are moving to fly?


Anonymous
TRIALOP

2 years ago

  1. MongoDB is really hard to limit in memory when the container has a technical limit of 8GB, so it end up using a lot of RAM, even when I set limits through command args

  2. #1 led me to explore other options and I decided to try SQLite, but Railway has no way to make custom snapshots/recover the volume data. I think fly does snapshots automatically and I can restore a volume from it super quick

  3. 5GB volume size limit


Anonymous
TRIALOP

2 years ago

since my apps consume almost no CPU and only a couple hundred mbs of RAM, Pro plan is just not worth it


Anonymous
TRIALOP

2 years ago

but I gotta say, Railway CPUs are noticeably faster :D


brody
EMPLOYEE

2 years ago

  1. How does it work on fly? I'm not too familiar, can you choose your instance size? and what if mongo does need more memory, wouldn't it just crash on fly?

  2. that's fair

  3. also fair


Anonymous
TRIALOP

2 years ago

Mongo resizes their in-memory cache based on available system meory, I can pick a 1GB instance on fly and it will just work with what it has, no matter how big the collections get.
On Railway, I had to reduce the amount of data stored in order to keep Mongo around 1GB, cutting some features. It worked for now, but I am just really worried that it will still grow as the dataset gets bigger since I really have no control over it.


brody
EMPLOYEE

2 years ago

Okay gotcha, it works since mongo plays nicely with the available memory


brody
EMPLOYEE

2 years ago

all very good feedback, I will make sure the team sees this


Anonymous
TRIALOP

2 years ago

yeah, I never had any issues with limiting mongo to some specific size. I believe you can also go below 1GB, it's just not recommended. So I could get an even smaller instance on fly if it's still expensive for what the project is


Anonymous
TRIALOP

2 years ago

but yeah, it would be amazing if there was some way to get the files from the volume or at least make snapshots and copy/restore


brody
EMPLOYEE

2 years ago

I think the main reason railway hasn't allowed for custom lower instance sizing would be because the majority of services will crash


brody
EMPLOYEE

2 years ago

volume snapshots are something they would like to do and will do at some point


Anonymous
TRIALOP

2 years ago

well, railway dynamic pricing based on usage is amazing for Go, it is practically free to run most of my projects :D while on other providers I would have to pay for some minimum sized instance, like 256mb. but it is also quite scary to know that something can happen or I can get spammed and there is no way to limit the damage, like set a RAM/CPU limit


brody
EMPLOYEE

2 years ago

I've seen thousands of help threads for crashed services that people tried to run on the trial plan with 500mb of memory


Anonymous
TRIALOP

2 years ago

yeah, cannot relate 😂

1249021177662279700


brody
EMPLOYEE

2 years ago

you can set a usage limit but it's not quite the same


brody
EMPLOYEE

2 years ago

haha I know I'm a go dev too


Anonymous
TRIALOP

2 years ago

yeah, service/container limits would be awesome. and a way to run migrations :D I had to bloat my final image size quite a bit to run migrations on SQLite, would be nice to have the ability to interact with the volume before the main container starts up


brody
EMPLOYEE

2 years ago

i wonder if the v2 builder (different from the v2 runtime) allows for interacting with the service's volume during build


brody
EMPLOYEE

2 years ago

side note, you could also use libsql in place of sqlite?


Anonymous
TRIALOP

2 years ago

yeah, but that would not solve migrations


Anonymous
TRIALOP

2 years ago

plus I am kinda moving away from sharding everything into microservices 😂 so it's nice to just deploy a single binary


brody
EMPLOYEE

2 years ago

if you used libsql daemon you could run your migrations during build


brody
EMPLOYEE

2 years ago

thats also fair


Anonymous
TRIALOP

2 years ago

ah that's a good point


Anonymous
TRIALOP

2 years ago

but then it might break prod 😂


brody
EMPLOYEE

2 years ago

ah good point


Anonymous
TRIALOP

2 years ago

well, I guess it's not too different from how I do it now. so it might be a solid option actually


Anonymous
TRIALOP

2 years ago

I'll give it a try when some volume features get through the pipeline, rn I don't need anything more than sqlite, and I want to make the project super friendly to self host


brody
EMPLOYEE

2 years ago

sounds good!


Anonymous
TRIALOP

2 years ago

So far not a single error since I switched to V2 around 7 hours ago, so it might be solved 🤞


brody
EMPLOYEE

2 years ago

how do you know if there are errors if you can't see the logs lol


Anonymous
TRIALOP

2 years ago

it pings me on Discord :D


Anonymous
TRIALOP

2 years ago

I can also see the logs if I expand them


brody
EMPLOYEE

2 years ago

well that's good news


brody
EMPLOYEE

2 years ago

you would have gotten errors within 7 hours on the legacy runtime?


Anonymous
TRIALOP

2 years ago

yeah, they popped up every 2-5 hours it seems


brody
EMPLOYEE

2 years ago

awesome, the logs are easy to fix but the networking problem likely isn't so I'm happy runtime V2 fixed it


Anonymous
TRIALOP

2 years ago

0 errors overnight, so this is definitely fixed now. weird that V1 had some obscure networking issue, time to move to V2 everywhere just in case :D goodbye logs 🫡


brody
EMPLOYEE

2 years ago

I'm sure the team will fix the logs fast


brody
EMPLOYEE

2 years ago

the team is hands on keyboard to fix the logging issue


brody
EMPLOYEE

2 years ago

update: one half of this problem has been fixed, structured logs with a message attribute will not be blank anymore, the missing logs are still being worked on


brody
EMPLOYEE

2 years ago

update: the missing logs are fixed, but theres a new issue that arose with the possibility of them being not shown in the correct order


brody
EMPLOYEE

a year ago

sorry for the late reply, but all known logging issues on the v2 runtime have been fixed


Loading...