0

In my Linux server, I can't login to my PHP application having an issue related to PHP sessions:

PHP Error Logs:

[Sat May 21 21:27:50 2011] [error] [client ] PHP Warning:  Unknown: open(/tmp/sess_8lh0d15nu33p5r659ge35spn13, O_RDWR) failed: Invalid argument (22) in Unknown on line 0
[Sat May 21 21:27:50 2011] [error] [client ] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0

Kernel Logs:

May 21 03:55:35 server1 kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 32: 6059 blocks in bitmap, 6057 in gd
May 21 03:55:40 server1 kernel: JBD: Spotted dirty metadata buffer (dev = dm-0, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
May 21 03:55:40 server1 kernel: JBD: Spotted dirty metadata buffer (dev = dm-0, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
May 21 04:15:01 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 04:15:01 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 04:15:01 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 04:15:01 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 05:15:02 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 05:15:02 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 05:15:02 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 05:15:02 server1 pcscd: winscard.c:309:SCardConnect() Reader E-Gate 0 0 Not Found
May 21 08:56:14 server1 auditd[1114]: Audit daemon rotating log files
May 21 09:00:30 server1 kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 420: 7487 blocks in bitmap, 3391 in gd
May 21 09:00:30 server1 kernel: JBD: Spotted dirty metadata buffer (dev = dm-0, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
May 21 09:01:50 server1 kernel: pa dbc9d240: logic 16384, phys. 19312640, len 2048

May 21 09:01:58 server1 kernel: EXT4-fs error (device dm-0): mb_free_blocks: double-free of inode 0's block 19313904(bit 13552 in group 589)
May 21 20:28:02 server1 kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 390: 5661 blocks in bitmap, 3613 in gd
May 21 20:28:02 server1 kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 586: 3179 blocks in bitmap, 1131 in gd
May 21 20:37:30 server1 kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 345: 10181 blocks in bitmap, 7621 in gd

Everything was fine, no changes done in the server or application lately. I thought the tmp folder is corrupted and tried to change php session.save_path to other writable dir, but it did not help.

Thanks in advance for any help or direction.

splattne
  • 28,348
  • 19
  • 97
  • 147
taras
  • 259
  • 2
  • 9
  • 20

1 Answers1

2

If you believe the filesystem is at fault, consider running fsck. You will probably have to run it from a LiveCD.

If running from a LiveCD isn't an easy option, you can do:

sudo touch /forcefsck
reboot
Bandit
  • 201
  • 1
  • 3
  • thanks for advice. my server is in data center so is it safe executing those commands remotely ? is there any risk ? – taras May 21 '11 at 14:12
  • Yes, there is a risk the disk corruption will make your computer unbootable. But if your disk is that bad, you don't want it to boot. Hope your backups are up to date. – Paul Tomblin May 21 '11 at 14:16
  • 1
    Find out if you can get a remote console login to your server. Sometimes, if fsck is unable to fix the problems automatically, it will fall back on manual intervention. Alternatively, you could ask someone at the data-centre to help. – sybreon May 21 '11 at 14:16
  • better i will go to the data-center and fix the issue right there. thanks for the comments. – taras May 21 '11 at 14:38
  • Bring replacement disks. – Paul Tomblin May 21 '11 at 14:41