ccarney16 / pterodactyl-containers

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

Daemon Config not working #128

Closed ryu777mtg closed 2 years ago

ryu777mtg commented 2 years ago

Trying to set up on Radxa-Zero

uname -a Linux radxa-zero 5.10.69-9-amlogic-g7c418f844e4b #amlogic SMP PREEMPT Sun Dec 12 14:29:18 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Followed steps to clone repo then executed this command to replace the yq

wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_arm64 -O /srv/app/pterodactyl-containers/bin/yq &&\
    chmod +x /srv/app/pterodactyl-containers/bin/yq

This replaces the x86 with an Arm64 version then I'm able to use the bin/deploy commands without errors the only issue I have now is trying to get the Daemon working

I configure the config.d panel.env and mariadb.env

Run this command bin/deploy --panel --database --daemon

Create the first user then log into the panel set up the Location Node and then get to configuration copy it to /srv/app/pterodactyl/conf.d/daemon/config.yml as root user

I then issue the docker-compose up -d again to update the change reload and the daemon never comes live

Any idea what I could be doing wrong here

Do I need to run the bin/deploy for each option separately or can they all be ran together?

It's as if the the config.yml for the daemon never gets read during the second docker-compose up -d

Thanks for any help

ryu777mtg commented 2 years ago

Think this is the same as #100 and #104

Just not sure where to make the change is it in the docker-compose.yml or the /srv/app/pterodactyl/conf.d/daemon/config.yml

Also would be nice to know the syntax to include if it's the docker-compose.yml I'd assume It needs a new network to be created but if it does it will move all to the new network causing same issue correct?

ryu777mtg commented 2 years ago

Those that are having the same issue I think I figured out how to resolve the issue

After generating the bin/deploy Edit the generated docker-compose.yml

In the daemon section define a network using

networks:
  -<name of network>

Then define the network at end of file using

networks:
  <name of network>:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.30.0.0/16
          gateway: 172.30.0.1

For my name of network I just used daemon so the generated network will look like pterodactyl-containers_daemon for me

In the defined network I used all generic settings I'm sure it could be shortened out for options not needed but this is what worked for me.

I'm sure you can change the subnet and gateway to what suites your needs just make sure it's not on the same as the pterodactyl-containers_default network which after my fresh install was 172.18.0.0/16 and 172.18.0.1

After that if you have already attempted to make a node you will need to go to the node setting and check the box for reset daemon master key and save changes then go to the config and copy and paste it to the /srv/app/pterodacty-containers/conf.d/daemon/config.php. Or just rm the old config and create a new one with your text editor of choice.

As far as I can tell one of two things happen after that the Node will immediately become healthy and you can use it as normal or you will have to do a docker-compose stop and stop all of pterodactyl then re run the docker-compose up -d to bring it up and it should start working

benjaminrobinet commented 2 years ago

@ryu777mtg doing this, the daemon can't reach the panel anymore ? as they are not on the same network anymore ?

daemon_1   | Copyright © 2018 - 2022 Dane Everitt & Contributors
daemon_1   |
daemon_1   | Website:  https://pterodactyl.io
daemon_1   |  Source:  https://github.com/pterodactyl/wings
daemon_1   | License:  https://github.com/pterodactyl/wings/blob/develop/LICENSE
daemon_1   |
daemon_1   | This software is made available under the terms of the MIT license.
daemon_1   | The above copyright notice and this permission notice shall be included
daemon_1   | in all copies or substantial portions of the Software.
daemon_1   |
daemon_1   |  INFO: [Jan 23 13:50:21.900] configured wings with system timezone timezone=UTC
daemon_1   |  INFO: [Jan 23 13:50:21.900] checking for pterodactyl system user username={0 0}
daemon_1   |  INFO: [Jan 23 13:50:21.901] configured system user successfully gid=101 uid=100 username=pterodactyl
daemon_1   |  INFO: [Jan 23 13:50:21.902] fetching list of servers from API
daemon_1   | FATAL: [Jan 23 13:50:51.460] failed to load server configurations error=http: request creation failed: Get "http://panel/api/remote/servers?page=0&per_page=50": dial tcp: lookup panel: Try again
daemon_1   |
daemon_1   | Stacktrace:
daemon_1   | Get "http://panel/api/remote/servers?page=0&per_page=50": dial tcp: lookup panel: Try again
daemon_1   | http: request creation failed
daemon_1   | github.com/pterodactyl/wings/remote.(*client).request.func1
daemon_1   |    /wings/remote/http.go:139
daemon_1   | github.com/cenkalti/backoff/v4.RetryNotifyWithTimer
daemon_1   |    /go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55
daemon_1   | github.com/cenkalti/backoff/v4.RetryNotify
daemon_1   |    /go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34
daemon_1   | github.com/cenkalti/backoff/v4.Retry
daemon_1   |    /go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:28
daemon_1   | github.com/pterodactyl/wings/remote.(*client).request
daemon_1   |    /wings/remote/http.go:133
daemon_1   | github.com/pterodactyl/wings/remote.(*client).Get
daemon_1   |    /wings/remote/http.go:78
daemon_1   | github.com/pterodactyl/wings/remote.(*client).getServersPaged
daemon_1   |    /wings/remote/servers.go:189
daemon_1   | github.com/pterodactyl/wings/remote.(*client).GetServers
daemon_1   |    /wings/remote/servers.go:24
daemon_1   | github.com/pterodactyl/wings/server.(*Manager).init
daemon_1   |    /wings/server/manager.go:217
daemon_1   | github.com/pterodactyl/wings/server.NewManager
daemon_1   |    /wings/server/manager.go:36
daemon_1   | github.com/pterodactyl/wings/cmd.rootCmdRun
daemon_1   |    /wings/cmd/root.go:149
daemon_1   | github.com/spf13/cobra.(*Command).execute
daemon_1   |    /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860
daemon_1   | github.com/spf13/cobra.(*Command).ExecuteC
daemon_1   |    /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974
daemon_1   | github.com/spf13/cobra.(*Command).Execute
daemon_1   |    /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
daemon_1   | github.com/pterodactyl/wings/cmd.Execute
daemon_1   |    /wings/cmd/root.go:68
daemon_1   | main.main
daemon_1   |    /wings/wings.go:8
daemon_1   | runtime.main
daemon_1   |    /usr/local/go/src/runtime/proc.go:255
daemon_1   | runtime.goexit
daemon_1   |    /usr/local/go/src/runtime/asm_amd64.s:1581