ccarney16 / pterodactyl-containers

Pterodactyl Panel within a docker container
230 stars 78 forks source link

driver failed programming external connectivity on endpoint #64

Closed JamesDAdams closed 4 years ago

JamesDAdams commented 4 years ago

Hi,

I installed Pterodactyl normally with docker and everything worked but for my final installation I placed the daemon and the panel in a network docker that I created which is directly connected to my router

image

The problem is that when I start a minecraft server I get an error:

image

I can't figure out where the error came from :(

Thanks for your help :D

ccarney16 commented 4 years ago

cannot bind requested address, something is already using 25565

JamesDAdams commented 4 years ago

no the problem is that minecraft servers connect to the pterodactyl_nw network while I want it to connect to my network docker docker-lab1

image

JamesDAdams commented 4 years ago

i found i edit the pterodactyl_nw and it's work !

Anulo2 commented 3 years ago

i found i edit the pterodactyl_nw and it's work !

Could you describe in details what you did? I'm having the same error when starting a minecraft server

The error:

[Pterodactyl Daemon]: Checking server disk space usage, this could take a few seconds... [Pterodactyl Daemon]: Updating process configuration files... [Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... container@pterodactyl~ Server marked as starting... [Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete... Pulling from pterodactyl/core Digest: sha256:c0139c52f8ae3581e64c5d598b1d4da7328599a7abb41b76d66487900a3396f7 Status: Image is up to date for quay.io/pterodactyl/core:java [Pterodactyl Daemon]: Finished pulling Docker container image container@pterodactyl~ Server marked as offline... container@pterodactyl~ Error Event [5db18463-21f6-4beb-a6fd-7f408182ebaf]: environment/docker: failed to start container: Error response from daemon: driver failed programming external connectivity on endpoint 799ee0fd-596b-47c1-a6b8-3b9b79003464 (24e67f7b7316b0e64c50d8ac44b7f32b9fd912118b2ae5178eff61101d49414b): Error starting userland proxy: listen tcp4 172.26.0.6:25565: bind: cannot assign requested address [Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ---------- [Pterodactyl Daemon]: Exit code: 128 [Pterodactyl Daemon]: Out of memory: false [Pterodactyl Daemon]: Checking server disk space usage, this could take a few seconds... [Pterodactyl Daemon]: Updating process configuration files... [Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... container@pterodactyl~ Server marked as starting... [Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete... Pulling from pterodactyl/core Digest: sha256:c0139c52f8ae3581e64c5d598b1d4da7328599a7abb41b76d66487900a3396f7 Status: Image is up to date for quay.io/pterodactyl/core:java [Pterodactyl Daemon]: Finished pulling Docker container image [Pterodactyl Daemon]: Server crash was detected but an error occurred while handling it. container@pterodactyl~ Server marked as offline... [Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ---------- [Pterodactyl Daemon]: Exit code: 128 [Pterodactyl Daemon]: Out of memory: false [Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.

My docker containers:

image

The network:

image

There isn't a pterodactyl_nw network and there aren't other networks using the 172.18.0.0/16 subnet

The daemon config:

debug: false app_name: Pterodactyl uuid: token_id: token: api: host: 0.0.0.0 port: 8080 ssl: enabled: false cert: /etc/letsencrypt/live/172.26.0.3/fullchain.pem key: /etc/letsencrypt/live/172.26.0.3/privkey.pem disable_remote_download: false upload_limit: 100 system: root_directory: /var/lib/pterodactyl log_directory: /var/log/pterodactyl data: /var/lib/pterodactyl/volumes archive_directory: /var/lib/pterodactyl/archives backup_directory: /var/lib/pterodactyl/backups username: pterodactyl timezone: UTC user: uid: 100 gid: 101 disk_check_interval: 150 check_permissions_on_boot: true enable_log_rotate: true websocket_log_count: 150 sftp: bind_address: 0.0.0.0 bind_port: 2022 read_only: false crash_detection: detect_clean_exit_as_crash: true timeout: 60 backups: write_limit: 0 transfers: download_limit: 0 docker: network: interface: 172.26.0.3 dns:

The node settings:

image

The node allocations:

image

The server build configuration:

image

As said, everything is working fine except the server startup, the egg gets installed correctly, does its things in a debian container and then when it finish if I try to start it, I receveive the error previously mentioned.

ccarney16 commented 3 years ago

This is not due to the network not being created, your daemon would be crash-starting every few seconds if that was the case. The problem stems from that your attempting to assign to ip addresses that the host itself doesnt really have control over. 172.26.0.0/16 is a private network created by docker-compose/daemon to be private. My suggestion when assigning port allocations is to use what you currently have assigned to the host, not the containers, such as your main ethernet port or a loopback address. I would suggest next time to create a new issue rather than reopen an old one.

Anulo2 commented 3 years ago

This is not due to the network not being created, your daemon would be crash-starting every few seconds if that was the case. The problem stems from that your attempting to assign to ip addresses that the host itself doesnt really have control over. 172.26.0.0/16 is a private network created by docker-compose/daemon to be private. My suggestion when assigning port allocations is to use what you currently have assigned to the host, not the containers, such as your main ethernet port or a loopback address. I would suggest next time to create a new issue rather than reopen an old one.

That worked! I've set the allocation to be my lan ip and now it's working. Thank you so much, this project is amazing

If I have other issues in the future I will create new issues instead of reopening old ones, thank you for the tip