ccarney16 / pterodactyl-containers

Pterodactyl Panel within a docker container
231 stars 79 forks source link

Daemon Connection Issue in custom network installation #75

Closed NaokiNXN closed 3 years ago

NaokiNXN commented 3 years ago

Hi feel free to decline and delete this if you cant provide support for this but was hoping for some help here as at my wits end and not sure where else to ask. Trying to run the new 1.0 panel alongside a cloudbox setup https://github.com/Cloudbox/Cloudbox.

I have the panel and daemon working and neither are kicking out any errors in the portainer logs with debug mode enabled on both.

The panel is telling me that their is an error connecting to the node but in the node about page it is able to see it and confirm the version and system information.

The daemon also seems to be confirming the requests and isnt throwing any errors:

DEBUG: [Oct 16 22:11:43.395] GET /api/system client_ip=172.18.0.26 latency=32.248µs status=200 DEBUG: [Oct 16 22:11:55.013] GET /api/system client_ip=172.18.0.26 latency=64.525µs status=200 DEBUG: [Oct 16 22:12:02.136] GET /api/servers/11bb40f2-f408-4c09-9a8b-939f4332b20c client_ip=172.18.0.26 latency=28.06µs status=200 DEBUG: [Oct 16 22:12:22.172] GET /api/servers/11bb40f2-f408-4c09-9a8b-939f4332b20c client_ip=172.18.0.26 latency=29.04µs status=200 DEBUG: [Oct 16 22:12:31.951] GET /api/system client_ip=172.18.0.26 latency=34.003µs status=200 DEBUG: [Oct 16 22:12:42.212] GET /api/system client_ip=172.18.0.26 latency=34.171µs status=200 DEBUG: [Oct 16 22:12:42.995] GET /api/servers/11bb40f2-f408-4c09-9a8b-939f4332b20c client_ip=172.18.0.26 latency=27.088µs status=200 DEBUG: [Oct 16 22:12:53.243] GET /api/system client_ip=172.18.0.26 latency=31.155µs status=200

Again sorry if this isnt the right place to ask for support but just wasnt sure where else to ask and again if because of my custom setup you cant help no worries just close/delete this.

ccarney16 commented 3 years ago

That is a really odd situation, I recommend testing the setup in another fresh installation and see if anything changes. I do not know if anything internally was changed when checking the daemon status, but can you confirm that the daemon port is open and can be accessed by your web browser?

NaokiNXN commented 3 years ago

I've tried a fresh installation alongside cloudbox but unfortunatly had the same issue.

If its any help i did manage to get 0.7 working before (with an odd bug where the servers would endlessly show as starting and wouldnt give any console output but it worked enough) using the same modifications ive made to the yml files as i have with 1.0.

I've attached txt documents of all the files i have modified (with ips, domains etc replaced), maybe i've done something stupid this time round.

daemon config copy.txt docker-compose copy.txt panel env copy.txt

ccarney16 commented 3 years ago

can you connect to the daemon using the ip address and port? such as http(s)://:8080. The Web browser needs to connect to the daemon. I also do not recommend going through a single network for everything.

NaokiNXN commented 3 years ago

Yes i can connect to it and to be honest with you only reason i was going through the cloudbox network for everything was so that i could take advantage of the nginx-proxy and letsencrypt containers that are setup during cloudbox's installation.

Do you think seperating it onto a different network would help?

ccarney16 commented 3 years ago

When it comes to using a proxy, I suggest making a seperate proxy network for services that need to be connected via a proxy. Beyond that, I do not really have a clue of what is going on, during my testing on a bare CentOS installation, it works fine.

NaokiNXN commented 3 years ago

So it looks like putting everything through the one network was part of the issue. After letting it setup on seperate networks its working fine under http but if i try to setup the nginx-proxy-letsencrypt i use on other containers i am running then it breaks down again (with the same error as before).

ccarney16 commented 3 years ago

Your issue now appears to be in regards to the reverse proxy setup. I do not use nginx-proxy and would recommend moving to traefik for your reverse proxy/load balancing needs.

NaokiNXN commented 3 years ago

Yeah your right unfortunatly its not really practical for me to switch since everything else running on the server works fine with the current setup. Will soldier on and try to get it working with nginx-proxy but thank you for all the help regarding the issue i was having.

NaokiNXN commented 3 years ago

Hey sorry to bug you about this again just looking for help at my wits end managed to get everything working with nginx-proxy but the daemon cant seem to see the panel but no idea why as i can access it fine heres the output:

Copyright © 2018 - 2020 Dane Everitt & Contributors

Website: https://pterodactyl.io

Source: https://github.com/pterodactyl/wings

License: https://github.com/pterodactyl/wings/blob/develop/LICENSE

This software is made available under the terms of the MIT license.

The above copyright notice and this permission notice shall be included

in all copies or substantial portions of the Software.

INFO: [Nov 13 22:52:58.523] writing log files to disk path=/var/log/pterodactyl/wings.log

INFO: [Nov 13 22:52:58.524] loading configuration from path path=/etc/pterodactyl/config.yml

DEBUG: [Nov 13 22:52:58.524] running in debug mode

WARN: [Nov 13 22:52:58.524] certificate checking is disabled

DEBUG: [Nov 13 22:52:58.524] ensuring root data directory exists path=/var/lib/pterodactyl

DEBUG: [Nov 13 22:52:58.524] ensuring server data directory exists path=/var/lib/pterodactyl/volumes

DEBUG: [Nov 13 22:52:58.524] ensuring archive data directory exists path=/var/lib/pterodactyl/archives

DEBUG: [Nov 13 22:52:58.525] ensuring backup data directory exists path=/var/lib/pterodactyl/backups

INFO: [Nov 13 22:52:58.525] checking for pterodactyl system user username=pterodactyl

INFO: [Nov 13 22:52:58.525] configured system user successfully gid=101 uid=100 username=pterodactyl

INFO: [Nov 13 22:52:58.525] fetching list of servers from API

DEBUG: [Nov 13 22:52:58.526] making request to external HTTP endpoint endpoint=https://panel.domain_name.club/api/remote/servers headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[Bearer NNyrcLrF(redacted)] Content-Type:[application/json]] method=GET

FATAL: [Nov 13 22:53:28.526] failed to load server configurations error=Get "https://panel.domain_name.club/api/remote/servers": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Stacktrace: github.com/pterodactyl/wings/server.LoadDirectory /wings/server/loader.go:37 github.com/pterodactyl/wings/cmd.rootCmdRun /wings/cmd/root.go:157 github.com/spf13/cobra.(Command).execute /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 github.com/spf13/cobra.(Command).ExecuteC /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 github.com/spf13/cobra.(*Command).Execute /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887

Looking at my NGINX logs i cant see any of the http requests either so its like they are being sent but never recieved but if i connect to https://panel.domain_name.club it will connect to the panel no issues