Web Admin Login Page Looping

Expected Behaviour:

Log into PiHole Web UI and be able to manage the PiHole

Actual Behaviour:

login page always loops right back to the login page. If an incorrect password is used it will fail, but correct password just loops. Used pihole -a -p to set no password and that works, but then I cannot make changes. Used pihole -r to repair with no change. Then used pihole -r to reconfigure and still no change.

  • Pi-hole [v5.18.2]
  • FTL [v5.25.1]
  • Web Interface [v5.21]

I suppose (but not sure) it started just after an apt-get upgrade.

Debug Token:
https://tricorder.pi-hole.net/8ubzIkVP/

Your disk is full.

*** [ DIAGNOSING ]: Disk usage
   Filesystem      Size  Used Avail Use% Mounted on
   /dev/root       3.7G  3.6G     0 100% /

When you login PHP is not able to save the session file (there is no space). Then, the next page tries to verify the login, but no session is found and the function redirects to the login page.

2024-04-01 07:45:06: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown on line 0
2024-04-01 07:45:06: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  fread(): Length parameter must be greater than 0 in /var/www/html/admin/scripts/pi-hole/php/persistentlogin_token.php on line 48
2024-04-01 07:45:06: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Unknown: write failed: No space left on device (28) in Unkn

You need to free up some disk space.

Dang knew it would be something I missed. I saw that error in the web admin, so I cleared up some logs and got it confirm the log size was 0, but it still has the same issue. Maybe I didn't fully clear them up or could the line you reference have been before I cleared them. Can you point me in the right direction to fully clear up space and prevent it from filling again if it is the issue?

This is difficult to guess.
I don't know what you have installed in your system.

You need to find out what is taking up space on your disk.

This command will show the 15 biggest log files (and directories) in /var/log, sorted by size:

 sudo du -ha --max-depth=2 /var/log | sort -hr | head -15

Note 1:
Pi-hole logs are very small in your system.
Maybe there are other services using huge logs, databases or files in your system.

You can adapt the command to search in other directories.

Note 2:
Your SD card is very small (3.7G). Maybe you will need a bigger one.

The SD card is actually a 32G card. My top couple logs are:
451M /var/log
382M /var/log/journal/3f1f577d86464a95a8ba216a90029a02
382M /var/log/journal
29M /var/log/syslog

I am thinking I may be better off with a fresh format of the drive or a different one. I let a coworker format the drive for me and install the OS, I am thinking he didn't use the full cards available space or something. Thank you for pointing me in the right direction!

Then you need to expand the filesystem.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.