pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.4k stars 1.57k forks source link

Sometimes servers don't work, due to a domain resolution error #3447

Closed DrakMC closed 3 years ago

DrakMC commented 3 years ago

Background (please complete the following information):

Describe the bug My servers in Pterodactyl stopped working a while ago, probably due to a domain resolution. I can't even reinstall the server. It happened to me yesterday too, today again. After a while, the server always starts working. I don't know what it is. It's possible that this happens on all the nodes that I have connected to the panel, but I'm not 100% sure.

Please provide additional information too, depending on what you have issues with: PHP version: 8.0.7 Wings:

To Reproduce Steps to reproduce this behavior: It happens randomly. It happened twice. Yesterday and today. I've never had a problem with this before. I don't know what could be causing it.

Software-Noob commented 3 years ago

Your providers firewall might get triggered which blocks the default wings dns nameservers. OVH for example would do this forcing to change Wings to use their DNS.

There is also the fastly bug that requires a docker restart to resolve, but your issue sounds a lot like a firewall.

DrakMC commented 3 years ago

At the time of the problem, I was trying to ping a domain from SSH and it worked there. Only in servers (containers) it didn't worked. Do you still think it can be caused by firewall?

Software-Noob commented 3 years ago

At the time of the problem, I was trying to ping a domain from SSH and it worked there. Only in servers (containers) it didn't worked. Do you still think it can be caused by firewall?

Your machine and wings dns nameservers are different. Wings would be using 1.1.1.1 and 8.8.8.8 by default. You can change it in the wings config to use your providers DNS instead.

If you are using OVH then that's definitely the issue and is something that has been reported many times on the Discord server.

DrakMC commented 3 years ago

I don't use OVH, but if the situation repeats itself, I'll definitely try it. Thank you for your help.

DaneEveritt commented 3 years ago

This software bears no responsibility for domain resolution.

NicolasHaas commented 1 year ago

I've encountered the same issue on Hetzner.

It appears that the problem stems from the hardcoded DNS entries for pterodactyl_nw:

type DockerNetworkConfiguration struct {
    ...
    Dns []string `default:"[\"1.1.1.1\", \"1.0.0.1\"]"`
    ...

https://github.com/pterodactyl/wings/blob/33373629558700956700d455c533ae6a7d4af8f8/config/config_docker.go#L29

I would propose using the configurations already set in /etc/resolv.conf on the host.

If you have no objections, I could submit a pull request.

parkervcp commented 1 year ago

@NicolasHaas The dns values are only a default and not a hard coded value. They are in the wings config and you can change them.

Some hosts block 1.1.1.1 and 1.0.0.1 for some reason that makes no sense.