pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.81k stars 1.74k forks source link

Backup creation fails #2271

Closed Tresmos closed 4 years ago

Tresmos commented 4 years ago

Background:

Describe the bug Trying to create a backup from the panel gives an error and fails. It also makes the backup spinner on the panel spin infinitely. Error log: https://hastebin.com/raw/kidavigoca

Panel: PHP 7.4.9 (cli) (built: Aug 7 2020 14:30:01) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies Daemon: Linux {hostname} 5.4.0-42-generic

DEBUG: [Aug 26 18:26:44.951] POST /api/servers/be76260c-b323-47ca-ba63-b850c085aa6c/backup client_ip={server ip} latency=196.689µs status=202
DEBUG: [Aug 26 18:26:44.972] making request to external HTTP endpoint endpoint=https://panel.domain.com/api/remote/backups/2a5db1ed-ed70-4636-a3c5-f9d757885af3 headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[Bearer QHnVhfoN(redacted)] Content-Type:[application/json]] method=POST
 WARN: [Aug 26 18:26:45.050] string: The checksum type must be a string. (HTTP/) backup=2a5db1ed-ed70-4636-a3c5-f9d757885af3 server=be76260c-b323-47ca-ba63-b850c085aa6c
 WARN: [Aug 26 18:26:45.051] failed to notify panel of failed backup state backup=2a5db1ed-ed70-4636-a3c5-f9d757885af3 error=read /var/lib/pterodactyl/volumes/be76260c-b323-47ca-ba63-b850c085aa6c/commands: is a directory server=be76260c-b323-47ca-ba63-b850c085aa6c

Stacktrace:
github.com/apex/log.(*Entry).Warn
    /home/runner/go/pkg/mod/github.com/apex/log@v1.8.0/entry.go:91
github.com/pterodactyl/wings/server.(*Server).Backup
    /home/runner/work/wings/wings/server/backup.go:94
github.com/pterodactyl/wings/router.postServerBackup.func1
    /home/runner/work/wings/wings/router/router_server_backup.go:41
runtime.goexit
    /opt/hostedtoolcache/go/1.15.0/x64/src/runtime/asm_amd64.s:1374

ERROR: [Aug 26 18:26:45.054] failed to generate backup for server error=read /var/lib/pterodactyl/volumes/be76260c-b323-47ca-ba63-b850c085aa6c/commands: is a directory server=be76260c-b323-47ca-ba63-b850c085aa6c

Stacktrace:
github.com/pterodactyl/wings/server.(*Server).Backup
    /home/runner/work/wings/wings/server/backup.go:105
github.com/pterodactyl/wings/router.postServerBackup.func1
    /home/runner/work/wings/wings/router/router_server_backup.go:41
runtime.goexit
    /opt/hostedtoolcache/go/1.15.0/x64/src/runtime/asm_amd64.s:1374

Also running the daemon with pm2.

To Reproduce

  1. Create a backup from the panel.
  2. Watch it fail in the background and infinite spinner on the panel

Expected behavior A successful backup of the server and download link for it on the panel.

DaneEveritt commented 4 years ago

Your logs are truncated (end with >), can you please grab the entire log output for those errors and provide them again.

Tresmos commented 4 years ago

sorry my bad. here is the full log https://hastebin.com/raw/utetoqisen

DaneEveritt commented 4 years ago

ref https://github.com/pterodactyl/panel/commit/4b919cabd2cddd73662e2304f0c3ac7b95539e5c

DaneEveritt commented 4 years ago

closed in https://github.com/pterodactyl/wings/commit/68ab705aacc70649612b0fbcd9d8fab11d6fab36