For a couple of days, I've been trying hard to have Pterodactyl wings get a list of servers successfully. None of the attempts were successful. On my fourth attempt, I realized that traefik kept restarting after wings sent a request to retrieve a list of servers. Wings returned a 401 HTTP error regarding the Authorization header was missing
. I checked the traefik logs and traefik didn't send the debug logs of the incoming HTTP request, indicating that traefik must've restarted. To be sure that the header wasn't missing for other docker services proxied through traefik, I ran them (my rest API services) and the results did not appear them having issues with the Authentication header. These attempts were able to send the debug incoming HTTP request without a problem. So far I'm not sure if traefik randomly crashes with Pterodactyl wings or if traefik is overloaded with listening to too many docker services at once.
Here's my docker compose file:
services:
database:
image: mariadb:10.5
restart: always
command: --default-authentication-plugin=mysql_native_password
volumes:
- "/srv/pterodactyl/database:/var/lib/mysql"
environment:
<<: *db-environment
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"
cache:
image: redis:alpine
restart: always
panel:
image: ghcr.io/pterodactyl/panel:latest
restart: always
expose:
- 80
links:
- database
- cache
volumes:
- "/srv/pterodactyl/var/:/app/var/"
- "/srv/pterodactyl/nginx/:/etc/nginx/http.d/"
- "/srv/pterodactyl/certs/:/etc/letsencrypt/"
- "/srv/pterodactyl/logs/:/app/storage/logs"
networks:
- default
- traefik-network
environment:
<<: [*panel-environment, *mail-environment]
DB_PASSWORD: *db-password
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: "false"
CACHE_DRIVER: "redis"
SESSION_DRIVER: "redis"
QUEUE_DRIVER: "redis"
REDIS_HOST: "cache"
DB_HOST: "database"
DB_PORT: "3306"
labels:
traefik.enable: true
# traefik.http.middlewares.game_daemon-headers.headers.accesscontrolallowheaders: Authorization
# traefik.http.middlewares.game_daemon-headers.headers.accesscontrolalloworiginlist: "*"
# traefik.http.routers.game_daemon.entrypoints: websecure
# traefik.http.routers.game_daemon.middlewares: game_daemon-headers
traefik.http.middlewares.minecraftpanel-accesscontrol.headers.accesscontrolallowheaders: Authorization
traefik.http.middlewares.minecraftpanel-accesscontrol.headers.accesscontrolalloworiginlist: "*"
traefik.http.routers.minecraftpanel-web.rule: Host(`panel.minecraft.ee.lol`) # <== Your Domain Name goes here for the http rule
traefik.http.routers.minecraftpanel-web.entrypoints: web # <== Defining the entrypoint for http, **ref: line 30
traefik.http.routers.minecraftpanel-web.middlewares: redirect-to-https # <== This is a middleware to redirect to https
traefik.http.routers.minecraftpanel-secured.rule: Host(`panel.minecraft.ee.lol`) # <== Your Domain Name for the https rule
traefik.http.routers.minecraftpanel-secured.entrypoints: websecure # <== Defining entrypoint for https, **ref: line 31
traefik.http.routers.minecraftpanel-secured.middlewares: minecraftpanel-accesscontrol
traefik.http.routers.minecraftpanel-secured.tls.certresolver: letsencrypt # <== Defining certsresolvers for https
traefik.http.routers.minecraftpanel-secured.service: minecraftpanel-httpservice
traefik.http.services.minecraftpanel-httpservice.loadbalancer.server.port: 80
networks:
default:
ipam:
config:
- subnet: 172.20.0.0/16
traefik-network:
external: true
The log that came after wings sent a Http GET request:
{Status:die ID:361b04bf96b77d372a8013b1e054f72d8496ab7bef28d379467ff9cec83ae100 From:ghcr.io/pterodactyl/wings:latest Type:container Action:die Actor:{ID:361b04bf96b77d372a8013b1e054f72d8496ab7bef28d379467ff9cec83ae100 Attributes:map[com.docker.compose.config-hash:6273458a31fcbe5f7592aacfc033379afd5caa2f121999921180912a8b501d3b com.docker.compose.container-number:1 com.docker.compose.depends_on: com.docker.compose.image:sha256:6591782522dadd4cba5ebc208111fdc61c644bae4889f9ff87c65172de263321 com.docker.compose.oneoff:False com.docker.compose.project:wings com.docker.compose.project.config_files:/home/minecraft/minecraft-server/pterodactl/wings/docker-compose.yml com.docker.compose.project.working_dir:/home/minecraft/minecraft-server/pterodactl/wings com.docker.compose.service:wings com.docker.compose.version:2.14.1 exitCode:2 image:ghcr.io/pterodactyl/wings:latest name:wings-wings-1 org.opencontainers.image.created:2022-12-05T00:44:40.428Z org.opencontainers.image.description:The server control plane for Pterodactyl Panel. Written from the ground-up with security, speed, and stability in mind. org.opencontainers.image.licenses:MIT org.opencontainers.image.revision:e4d790ea40185c620049effeb9e4cf64f4c55e62 org.opencontainers.image.source:https://github.com/pterodactyl/wings org.opencontainers.image.title:wings org.opencontainers.image.url:https://github.com/pterodactyl/wings org.opencontainers.image.version:v1.11.0]} Scope:local Time:1673405138 TimeNano:1673405138093098968}" providerName=docker
- This log indicated the error encountered after the wings service failed to retrieve a list of servers through the Pterodactyl panel domain that is proxied through CloudFlare