Login fails, returns to login screen

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
Post Reply
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Login fails, returns to login screen

Post by wheelbarrow »

Hi Guys,

Zonemider from the latest live cd havs been running fine. for a few weeks now, but to day i can no longer login.

i've looked at the log files and don't see anything odd.

ZM is still running as i an getting e-mail i just cant login anymore.

Where should i be looking for errors.

Regards


Paul
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

your log files for mandrake are located under/var/log id check your messages log there first just after you have tried to login. Also check that you have cookies enabled on the browser you are trying to log in with
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Post by wheelbarrow »

If i tail -f messages i see events from zm, but no errors or message with reguard to the login.

looking in the http access log i get this.

192.168.1.115 - - [18/May/2006:15:54:16 -0700] "POST /zm/index.php HTTP/1.1" 200 1064 "http://192.168.1.27/zm/index.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3"
192.168.1.115 - - [18/May/2006:15:54:16 -0700] "GET /zm/zm_html_styles.css HTTP/1.1" 304 - "http://192.168.1.27/zm/index.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3"

using ethereal i captured this lot
POST /zm/index.php HTTP/1.1

Host: 192.168.1.27

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://192.168.1.27/zm/index.php

Cookie: format=html; cookies=1; ZMSESSID=50b05a8c414338678ba0fd0006f2af5f

Content-Type: application/x-www-form-urlencoded

Content-Length: 59



action=login&view=postlogin&username=admin&password=adminHTTP/1.1 200 OK

Date: Thu, 18 May 2006 22:55:44 GMT

Server: Apache-AdvancedExtranetServer/2.0.50 (Mandrakelinux/7.2.101mdk) PHP/4.3.8

X-Powered-By: PHP/4.3.8

Set-Cookie: ZMSESSID=50b05a8c414338678ba0fd0006f2af5f; path=/

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Content-Length: 1064

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Content-Type: text/html



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ZM - Login</title>
<link rel="stylesheet" href="zm_html_styles.css" type="text/css">
<script type="text/javascript">
window.resizeTo( 720, 480 );
</script>
</head>
<body>
<table align="center" border="0" cellspacing="2" cellpadding="2" width="96%">
<form name="login_form" method="post" action="/zm/index.php">
<input type="hidden" name="action" value="login">
<input type="hidden" name="view" value="postlogin">
<tr><td colspan="2" class="smallhead" align="center">ZoneMinder Login</td></tr>
<tr><td width="50%" class="text" align="right">Username</td><td width="50%" align="left" class="text"><input type="text" class="form" name="username" value="admin" size="12"></tr>
<tr><td width="50%" class="text" align="right">Password</td><td width="50%" align="left" class="text"><input type="password" class="form" name="password" value="" size="12"></tr>
<tr><td colspan="2" align="center"><input type="submit" value="Login" class="form"></td></tr>
</form>
</table>
</body>
</html>
GET /zm/zm_html_styles.css HTTP/1.1

Host: 192.168.1.27

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

Accept: text/css,*/*;q=0.1

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://192.168.1.27/zm/index.php

Cookie: format=html; cookies=1; ZMSESSID=50b05a8c414338678ba0fd0006f2af5f

If-Modified-Since: Fri, 15 Jul 2005 03:58:48 GMT

If-None-Match: "d44264-1237-445c0e00"

Cache-Control: max-age=0



HTTP/1.1 304 Not Modified

Date: Thu, 18 May 2006 22:55:45 GMT

Server: Apache-AdvancedExtranetServer/2.0.50 (Mandrakelinux/7.2.101mdk) PHP/4.3.8

Connection: Keep-Alive

Keep-Alive: timeout=15, max=99

ETag: "d44264-1237-445c0e00"


So does this shed any light on it.

Regards

Paul
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

nope not for me mate lol. I would have thought there would be an error somewhere!, Are you on the live cd as in 1.21.3/4 or the newer mandrive based install cd?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Post by wheelbarrow »

Hi James,

Now this is really odd, the admin password has gone back to admin, so i can now login, have i have had to reset each users password.

very strange.


Regards

Paul
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i noticed on your etherreal grab that you sent admin/admin as login details, has it chnaged all passwords or just the admin one?
Id check your db for consistency too but i would have hought youd get other issues first!
I cant see that it simply forgot it!!??
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Post by wheelbarrow »

Hi James, yes both users failed to login. Well spotted the ethereal trace did have the real password in, i changed it in the text to hide it.


Regards

Paul
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I assumed you had thats why i didnt comment before lol
So it had changed both passwords but not the user names?
Have you checked the db is ok?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Post by wheelbarrow »

:-)

not sure what i need todo to check the db is ok, events are still being generated and e-mails sent so i assume it is.

Regards

Paul
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

mysqlcheck --all-databases --auto-repair -ppassword -u user
should check the db
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
dima_the_chieff
Posts: 4
Joined: Thu Dec 02, 2010 5:03 pm

Re: Login fails, returns to login screen

Post by dima_the_chieff »

wheelbarrow wrote:Hi Guys,

Zonemider from the latest live cd havs been running fine. for a few weeks now, but to day i can no longer login.
+ 1 Here :evil:

I was lucky running ZM 1.24.2 @ Ubuntu server 10.10 x86 with 55Gb HDD on the old hardware for about 5 days.

An hour ago I was able to login via web console.
And a hour after I tried to login again, and it brings me back to login screen again.

Ok, investigating the problem gave the following:

Code: Select all

:/var/log$ tail syslog

Dec  5 16:31:39 MyHostNameHere zma_m2[4658]: ERR [Can't open events/2/10/12/05/16/14/12/16534-capture.jpg: No space left on device]
Dec  5 16:31:39 MyHostNameHere zma_m1[4654]: ERR [Can't open events/1/10/12/05/16/14/11/16564-capture.jpg: No space left on device]
Dec  5 16:31:40 MyHostNameHere zma_m2[4658]: ERR [Can't open events/2/10/12/05/16/14/12/16535-capture.jpg: No space left on device]

 . . . . 

:/var/log$ cat messages

Dec  5 16:14:15 MyHostNameHere zmaudit[4662]: INF [Database event '2/1484' does not exist in filesystem]
Dec  5 16:14:15 MyHostNameHere zmaudit[4662]: INF [deleting]
Dec  5 16:14:15 MyHostNameHere zmaudit[4662]: INF [Database event '2/1487' does not exist in filesystem]
Dec  5 16:14:15 MyHostNameHere zmaudit[4662]: INF [deleting]
 . . . . 

:/var/log/apache2$ cat  error.log | grep "No space left"

[Sun Dec 05 15:13:27 2010] [error] [client 192.168.1.3] socket_bind(  ) failed: No space left on device, referer: http://192.168.1.1/zm/index.php?view=watch&mid=1
[Sun Dec 05 15:13:27 2010] [error] [client 192.168.1.3] array (\n  0 => \n  array (\n    'file' => '/usr/share/zoneminder/ajax/stream.php',\n    'line' => 18,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_bind(  ) failed: No space left on device',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/usr/share/zoneminder/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/usr/share/zoneminder/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://192.168.1.1/zm/index.php?view=watch&mid=1
Am I'm really out of free space?

Code: Select all

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              55G   38G   14G  74% /
none                  748M  260K  748M   1% /dev
none                  754M     0  754M   0% /dev/shm
none                  754M   52K  754M   1% /var/run
none                  754M     0  754M   0% /var/lock
It stil shows me 14G available..
Anyway, I managed to free some space:

Code: Select all

sudo rm /tmp/*.log
sudo rm /var/log/*.gz
sudo apt-get clean
sudo apt-get autoremove	
It did some work, and after that I've got:

Code: Select all

$ df /var -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              55G   38G   14G  74% /
$ df /tmp -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              55G   38G   14G  74% /
Not looking that I've freed really big amount, but...

IT WORKED!!! :D :D :D

I was able to login to the console again!
Some recent event was missing with 'null/null' value.

May be, php errors about no disk space, were prevenitng the http session to start.

Ok, if it is the FREE SPACE issue, questions are:
1. How do I properly configure the partitions for the ZM prod installation?
2. How to set up debugging / logging level?
3. How to set up rotation and tell ZM to use defined amount of disk space?

Hope, this info help people, who stuck on logon screen.

Dear ALL, please help on remaining questions!

Thanks,
dima_the_chief
dima_the_chieff
Posts: 4
Joined: Thu Dec 02, 2010 5:03 pm

Re: Login fails, returns to login screen

Post by dima_the_chieff »

dima_the_chieff wrote:
wheelbarrow wrote:Hi Guys,

Zonemider from the latest live cd havs been running fine. for a few weeks now, but to day i can no longer login.
+ 1 Here :evil:

I was lucky running ZM 1.24.2 @ Ubuntu server 10.10 x86 with 55Gb HDD on the old hardware for about 5 days.

An hour ago I was able to login via web console.
And a hour after I tried to login again, and it brings me back to login screen again.


IT WORKED!!! :D :D :D

I was able to login to the console again!
Some recent event was missing with 'null/null' value.

May be, php errors about no disk space, were prevenitng the http session to start.
UPDATE:
Yes, It Worked but not for a long time :(
looking more deeply in log files:

Code: Select all

$ tail /var/log/apache2/error.log

[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77
[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0
[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0
[Sun Dec 05 18:42:33 2010] [error] [client 95.52.210.96] Invalid URI in request u\xc8g\x1a?;\xb8\x1e\xd6\xe1\xe5\xd4)\x17Z{\x11\xd8)D \xe6R\xe8\xbf\x1b\xaci\xd4H\x8b\x91\x19-\xec\xecD\xd2_\xda\xbc\xe4O\x907\x8d\xd2S
Ok, now, let's look at it:

Code: Select all

:/var/lib$ ls -l
drwx-wx-wt 2 root     root         4096 2010-12-05 17:09 php5
And, just to test:

Code: Select all

:/var/lib$ sudo chmod 777 php5
:/var/lib$ ls -l
drwxrwxrwx 2 root     root         4096 2010-12-05 17:09 php5
Now, trying to Login again.. And IT WORKED!!! :D Again :?

Is this yet another PHP5 problem?

dima_the_chief
savoy9020
Posts: 8
Joined: Fri Sep 24, 2010 2:40 pm
Location: Richardson Texas

Re: Login fails, returns to login screen

Post by savoy9020 »

Make sure your not out of inodes.. You can easily have plenty of free disk blocks and be out of inodes, and the result is the same.

check with "df -i"

Bill

dima_the_chieff wrote:
dima_the_chieff wrote:
wheelbarrow wrote:Hi Guys,

Zonemider from the latest live cd havs been running fine. for a few weeks now, but to day i can no longer login.


+ 1 Here :evil:

I was lucky running ZM 1.24.2 @ Ubuntu server 10.10 x86 with 55Gb HDD on the old hardware for about 5 days.

An hour ago I was able to login via web console.
And a hour after I tried to login again, and it brings me back to login screen again.


IT WORKED!!! :D :D :D

I was able to login to the console again!
Some recent event was missing with 'null/null' value.

May be, php errors about no disk space, were prevenitng the http session to start.
UPDATE:
Yes, It Worked but not for a long time :(
looking more deeply in log files:

Code: Select all

$ tail /var/log/apache2/error.log

[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77
[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0
[Sun Dec 05 18:42:01 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:10 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0, referer: http://192.168.1.1/zm/index.php
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  session_start(): open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in /usr/share/zoneminder/index.php on line 77
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: open(/var/lib/php5/sess_0qpsln2ut7otallbst4jbnnkf7, O_RDWR) failed: No space left on device (28) in Unknown on line 0
[Sun Dec 05 18:42:11 2010] [error] [client 192.168.1.5] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in Unknown on line 0
[Sun Dec 05 18:42:33 2010] [error] [client 95.52.210.96] Invalid URI in request u\xc8g\x1a?;\xb8\x1e\xd6\xe1\xe5\xd4)\x17Z{\x11\xd8)D \xe6R\xe8\xbf\x1b\xaci\xd4H\x8b\x91\x19-\xec\xecD\xd2_\xda\xbc\xe4O\x907\x8d\xd2S
Ok, now, let's look at it:

Code: Select all

:/var/lib$ ls -l
drwx-wx-wt 2 root     root         4096 2010-12-05 17:09 php5
And, just to test:

Code: Select all

:/var/lib$ sudo chmod 777 php5
:/var/lib$ ls -l
drwxrwxrwx 2 root     root         4096 2010-12-05 17:09 php5
Now, trying to Login again.. And IT WORKED!!! :D Again :?

Is this yet another PHP5 problem?

dima_the_chief
Post Reply