Golang fiber template stops after successful deploy
I am using golang fiber template in go version 1.22.3. It is a standard fiber http server. After a successfull deploy, it starts to run and immediately container is stopping and returns 502.
10 Replies
Project ID:
0854d29d-7fb2-4708-91d5-771bf91d61e9
0854d29d-7fb2-4708-91d5-771bf91d61e9
please see this docs section -
https://docs.railway.app/guides/private-networking#known-configuration-requirements-for-ipv6
New reply sent from Help Station thread:
which docs sectionYou're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
The link is rendered in Discord.You're seeing this because this thread has been automatically linked to the Help Station thread.
thanks, the link does not be seen in the help station.
i found it
I have add this part httpServer := fiber.New(fiber.Config{
Network: "tcp",
ServerHeader: "Fiber"
AppName: "My App",
}) but still same, it says container stopping and returns 502
good, please see this docs page now - https://docs.railway.app/guides/fixing-common-errors#go--nethttp
i have added port checking but it is still same. Indeed it starts the fiber app. Shows count of handlers etc. But then it stops. deploy logs shows like it seems running, but when i go to logs tab at the left corner, it shows at the end "container stopping"
Solution
your domain is pointing to the wrong port
Thanks a lot, it works!
no problem!