Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating to 5.1, teleporter backup gives me '500 Internal Server Error' #1503

Closed
3 tasks done
idunno101 opened this issue Jul 17, 2020 · 3 comments · Fixed by #1517
Closed
3 tasks done

After updating to 5.1, teleporter backup gives me '500 Internal Server Error' #1503

idunno101 opened this issue Jul 17, 2020 · 3 comments · Fixed by #1517

Comments

@idunno101
Copy link

In raising this issue, I confirm the following:

How familiar are you with the the source code relevant to this issue?:

3


Expected behavior:

Expected to have the teleporter archive downloaded

Actual behavior:

Web console gives me "500 Internal Server Error"

Steps to reproduce:

-Login to the pi-hole web interface
-Go to Settings -> Teleporter
-Click Backup
-A new tab opens for "admin/scripts/pi-hole/php/teleporter.php" but nothing else happens
-The web console in the browser shows me the error code 500 and an error is written to the pihole's error.log
(see error.log at the end of the issue)
I also get the same output in error.log when trying to run pihole -a -t on the system

Debug token provided by uploading pihole -d log:

u1oxkxonx8

Troubleshooting undertaken, and/or other relevant information:

To troubleshoot I
-Attempted to use different browsers (Firefox and Safari)
-Restarted the pi

I used the backup feature in 5.0 with no problems and only started getting these errors after updating to 5.1

Going into /var/log/lighttpd/error.log shows me there's something wrong creating the archive

(mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error: Uncaught BadMethodCallException: data phar "/tmp/pi-hole-localhost.localdomain-teleporter_2020-07-16_22-57-32.tar.gz" has invalid extension tar.gz in /var/www/html/admin/scripts/pi-hole/php/teleporter.php:574

(mod_fastcgi.c.421) FastCGI-stderr: Stack trace:

(mod_fastcgi.c.421) FastCGI-stderr: #0 /var/www/html/admin/scripts/pi-hole/php/teleporter.php(574): PharData->compress()

(mod_fastcgi.c.421) FastCGI-stderr: #1 {main}

(mod_fastcgi.c.421) FastCGI-stderr: thrown in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 574

@DL6ER
Copy link
Member

DL6ER commented Jul 17, 2020

Support for gzipped containers has been added 2017 and never changed since then: #595
It first glance, it doesn't seem any change was made to teleporter that could have caused this. Maybe your local PHP updated/upgraded and this brought up such this error?

Also, it says

"/tmp/pi-hole-localhost.localdomain-teleporter_2020-07-16_22-57-32.tar.gz"

for you, however, it is unclear to me where the trailing .gz comes from. The cde reads:

	$hostname = gethostname() ? gethostname()."-" : "";
	$tarname = "pi-hole-".$hostname."teleporter_".date("Y-m-d_H-i-s").".tar";
	$filename = $tarname.".gz";
	$archive_file_name = sys_get_temp_dir() ."/". $tarname;
	$archive = new PharData($archive_file_name);

(ignore $filename, it's not used here). To me, this looks like there should be no .gz here, right? Or am I missing something?

@DL6ER
Copy link
Member

DL6ER commented Jul 17, 2020

Ah, I see this is a duplicate of #1497

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/teleporter-backup-error-500/35883/18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants