Can't login to management after saving FOG settings
-
I can still WebMin into the box so I could definitely back up everything. Plus I’ve got Samba running so I can easily grab the images. However, this is the second time this has happened. I’d rather find the root cause instead of re-installing (or going back to a snapshot if I virtualize) if this happens again.
-
First,
what’s in the error logs?
As you’re running 12.04 and Ubuntu, can you check if there’s a permissions error in the /var/lib/php5/sessions folder?
-
Not sure what I’m looking for but I’ve attached a screenshot.
[quote=“Tom Elliott, post: 43222, member: 7271”]First,
what’s in the error logs?
As you’re running 12.04 and Ubuntu, can you check if there’s a permissions error in the /var/lib/php5/sessions folder?[/quote]
[url=“/_imported_xf_attachments/1/1749_varlibphp5.png?:”]varlibphp5.png[/url]
-
[quote=“Mark Pickard, post: 43224, member: 609”]Not sure what I’m looking for but I’ve attached a screenshot.[/quote]
Look at Tom’s signature. It says where everything is.
-
I attached both my Apache error and access logs in a previous post. Do you see anything in them that would indicate a problem?
As you can see from the screen shot in my last post there isn’t a sessions folder in /var/lib/php5/, only a bunch of files (session files?). Is that a problem?
[quote=“Wayne Workman, post: 43228, member: 28155”]Look at Tom’s signature. It says where everything is.[/quote]
-
Session filenames look alright I’d say. But why are there three files owned by root I wonder AND why are all these files of zero size? Is that really the case? Please run ‘ls -al /var/lib/php5’ on the console on the FOG server. Check the permissions.
Can’t see any related error in the log files you posted (doesn’t mean much)!
-
Also,
Check the file space:
[code]df -h[/code]
-
Here’s the results of ‘ls -al /var/lib/php5’ from a copy of those files I made before cleaning out the /var/lib/php5 directory and restarting Apache.
-rw------- 1 www-data www-data 0 Mar 4 16:15 sess_0969m10k5egnck11q07jkb3uq5
-rw------- 1 root root 0 Feb 24 14:32 sess_e2i1ddhl3g3vppt4gv5kh5am16
-rw------- 1 root root 0 Feb 24 14:32 sess_e6pvp88q6vhdnide6b5f94gll3
-rw------- 1 root root 0 Feb 24 14:32 sess_gm47ulnsrhe19nr4q6petondv0
[quote=“Uncle Frank, post: 43260, member: 28116”]Session filenames look alright I’d say. But why are there three files owned by root I wonder AND why are all these files of zero size? Is that really the case? Please run ‘ls -al /var/lib/php5’ on the console on the FOG server. Check the permissions.Can’t see any related error in the log files you posted (doesn’t mean much)![/quote]
-
[code]
root@FOG:/var/lib/php5# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 145G 31G 107G 23% /
udev 991M 4.0K 991M 1% /dev
tmpfs 201M 1.4M 199M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1001M 148K 1001M 1% /run/shm
[/code]
[quote=“Tom Elliott, post: 43262, member: 7271”]Also,Check the file space:
[code]df -h[/code][/quote]
-
can you restart the apache services?
[code]sudo service apache2 restart[/code] -
Tried that once from Webmin; just did it again from the terminal. Still seeing the same behavior.
The restart command returned the following:
[code]
root@FOG:/var/lib/php5# sudo service apache2 restart- Restarting web server apache2 [Thu Mar 05 07:34:27 2015] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
… waiting [Thu Mar 05 07:34:28 2015] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
[/code]
Any issues with that?
[quote=“Tom Elliott, post: 43280, member: 7271”]can you restart the apache services?
[code]sudo service apache2 restart[/code][/quote]
- Restarting web server apache2 [Thu Mar 05 07:34:27 2015] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
-
What’s the alias you’ve got?
-
[quote=“Tom Elliott, post: 43284, member: 7271”]What’s the alias you’ve got?[/quote]
Line 3 of /etc/phpmyadmin/apache.conf is:
[COLOR=#000000][code]Alias /phpmyadmin /usr/share/phpmyadmin[/code][/COLOR]
-
Try this:
[code]sudo service apache2 stop;sudo rm -rf /var/lib/php5/sess_*; sudo service apache2 start;[/code]
-
[quote=“Tom Elliott, post: 43286, member: 7271”]Try this:
[code]sudo service apache2 stop;sudo rm -rf /var/lib/php5/sess_*; sudo service apache2 start;[/code][/quote]
It wiped the session files but I still see the same behavior.
/var/lib/php5 after a couple attempts to login after running the above command:
[code]
root@FOG:/var/lib/php5# ls -al
total 1476
drwx-wx-wt 3 root root 1499136 Mar 5 08:10 .
drwxr-xr-x 66 root root 4096 Feb 24 12:48 …
drwxr-xr-x 2 root root 4096 Mar 4 16:16 old
-rw------- 1 www-data www-data 0 Mar 5 08:10 sess_e60jnb59pcoqads486btknhsj4
-rw------- 1 www-data www-data 0 Mar 5 08:10 sess_mqhj79o0eiih24g25cp37t4is2
-rw------- 1 www-data www-data 0 Mar 5 08:10 sess_p1f43a9hrglme8diq0ptrmlu51
[/code] -
Don’t know if it’s just a coincidence but both times this has happened (on two separate installations) I was changing settings on the FOG configuration page at /fog/management/index.php?node=about&sub=settings. Once it was AD settings and the other it was TFTP settings. As soon as I hit the “Save Changes” button it booted me back to the sign in page and from that point I could never sign back in.
-
I’m going to assume you’ve tried logging in from a different computer, a different browser?
-
[quote=“Wayne Workman, post: 43327, member: 28155”]I’m going to assume you’ve tried logging in from a different computer, a different browser?[/quote]
Yes to both.
-
Additional info:
I’m able to login to phpMyadmin on this server and it appears to be generating PHP session files without a problem:
[code]
root@FOG:~# ls -al /var/lib/php5
total 1500
drwx-wx-wt 3 root root 1499136 Mar 6 11:54 .
drwxr-xr-x 66 root root 4096 Feb 24 12:48 …
drwxr-xr-x 2 root root 4096 Mar 4 16:16 old
-rw------- 1 www-data www-data 23934 Mar 6 11:55 sess_pd6cadbemdnt9m3ks2bn1gpbguk4c75c
root@FOG:~#
[/code] -
Hmmm, that’s interesting. So it’s FOG not being able to save session information properly. Not sure if this is related but someone had issues with wordpress writing zero size session files: [url]http://quirm.net/forum/topic.php?id=3950[/url]
So far I couldn’t really see what was fixing the issue for him. But maybe this can lead us to where we should have a closer look…