Panel: Panel Database - unable to use docker container hostname as "host"

Created on 20 Oct 2019  路  4Comments  路  Source: pterodactyl/panel

Background (please complete the following information):

  • Panel or Daemon: Panel
  • Version of Panel/Daemon: 0.7.15
  • Server's OS: Ubuntu 18.04
  • Your Computer's OS & Browser: Chrome/android and Chrome/Windows

Describe the bug

  • I am unable to connect to a database using hostname as "ip". Pterodactyl does not allow. Pterodactyl is not running in a container, it is running on the host system under /var/www/pterodactyl

To Reproduce
Steps to reproduce the behavior:

  1. Go to the admin panel
  2. Click on Databases
  3. Enter in information. For host, use a container hostname.
  4. See error: You can only use IP's

See screenshot:
image

Expected behavior
I expect that hostnames should work and that pterodactyl could verify a connection instead of blindly rejecting everything not being an IP.

The connection works when I spin up a tool called _adminer_ and assign it to the same network, and connect by hostname.

I run my mysql database in docker, which I have attached to the pterodactyl_nw-network. Pterodactyl does not operate with static subnets, so a host restart may cause the ranges to change. In such cases, I also need to change the IP in the panel for the database, since it operates on the same range. If it operated by hostname, it would have kept the connection without any action from my side. Unsure why this is being limited..

Good First Issue bug

All 4 comments

So why not use the ip then? That's not even a valid fqdn, That's why it's complaining. Mysql.domain.com would be a valid fqdn

In the context of a docker container, it can be a valid FQDN.

Are there any variables among the files that could be changed to override this value whilst this is being tracked here?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vipesz picture vipesz  路  4Comments

Games4k picture Games4k  路  3Comments

schrej picture schrej  路  3Comments

Derkades picture Derkades  路  4Comments

TylerBurr picture TylerBurr  路  4Comments