Forum

Monitor won't let me login...

Ahcor Werdna
28 September 2012, 07:00
I followed all the directions via the README file and for some werid reason, admin:monitor won't take. I visit my url and attempt to login and do not have success. All it seems to do is redirect back to the login screen with no errors or anything. When I run hiawatha -v this is my output. "Hiawatha v8.5, cache, chroot, IPv6, Monitor, reverse proxy, SSL, Tomahawk, URL toolkit, XSLT Copyright (C) by Hugo Leisink <hugo@leisink.net>"

Also, I have never ran into this issue before.


Hiawatha version: 8.5
Operating System: Debian 6
Hugo Leisink
29 September 2012, 12:49
What's in the table 'user' in the database?
Ahcor Werdna
1 October 2012, 05:24
admin 08b5411f848a2581a41672a759c87380 NULL 2 Administrator
Hugo Leisink
1 October 2012, 09:58
That's correct. The fact that you are redirected back to the login screen without any error is weird. What do the logfiles say. Does pressing the submit button give you a POST request in the access logfile?
Ahcor Werdna
1 October 2012, 11:24
I replaced my ip addres with 0.0.0.0. Here is the print out for *.log files

i@4:/hello/world/monitor/logfiles# cat access.log
0.0.0.0 - - [01/Oct/2012:02:12:54 -0700] "POST / HTTP/1.1" 200 1575 "https://monitor.projectphaze.us:80/" "Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 Iceweasel/11.0"
i@4:/hello/world/monitor/logfiles# cat actions.log
0.0.0.0 |Mon 01 Oct 2012 02:12:54|-|user logged-out
i@4:/hello/world/monitor/logfiles# cat error.log
i@4:/hello/world/monitor/logfiles#

As you can see it does accept the login, but it forces logs out.
Ahcor Werdna
1 October 2012, 11:31
At first i was thinking that it could be an issue with permissions. So here is the list of permissions.

i@4:/hello/world/monitor# ls -la *
-rw-r--r-- 1 root root 1367 Jun 7 11:20 ChangeLog
-rw-r--r-- 1 root root 400 Jun 7 2010 LICENSE
-rw-r--r-- 1 root root 2015 Mar 13 2012 README

controllers:
total 76
drwxr-xr-x 4 root root 4096 May 29 22:07 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
drwxr-xr-x 2 root root 4096 May 30 22:14 admin
-rw-r--r-- 1 root root 1779 Mar 13 2012 admin.php
-rw-r--r-- 1 root root 649 Jan 17 2010 alerts.php
-rw-r--r-- 1 root root 1038 Mar 1 2012 browser_with_os.php
-rw-r--r-- 1 root root 744 May 29 22:06 events.php
-rw-r--r-- 1 root root 2120 Mar 13 2012 homepage.php
-rw-r--r-- 1 root root 2655 Mar 12 2012 host_statistics.php
-rw-r--r-- 1 root root 596 Mar 4 2012 login.php
-rw-r--r-- 1 root root 331 May 20 2010 logout.php
-rw-r--r-- 1 root root 862 Jun 13 2011 operating_system.php
-rw-r--r-- 1 root root 867 Jun 13 2011 origins.php
-rw-r--r-- 1 root root 1346 Apr 5 2011 profile.php
-rw-r--r-- 1 root root 1047 Jun 13 2011 referers.php
-rw-r--r-- 1 root root 914 Mar 3 2012 server_statistics.php
-rw-r--r-- 1 root root 2056 Nov 21 2011 session.php
drwxr-xr-x 2 root root 4096 Mar 13 2012 system
-rw-r--r-- 1 root root 942 Feb 29 2012 web_browser.php

database:
total 768
drwxr-xr-x 2 root root 4096 Jul 22 00:40 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
-rwxr-xr-x 1 root root 481 Jan 16 2010 backup_database
-rwxr-xr-x 1 root root 646 May 30 21:59 clear_logs
-rwxr-xr-x 1 root root 3373 May 30 22:00 delete_old_logs
-rwxr-xr-x 1 root root 7536 May 31 07:19 fetch_webserver_logs
-rwxr-xr-x 1 root root 328 Dec 17 2010 flush_cache
-rw-r--r-- 1 root root 735249 Jul 22 00:40 mysql.sql
-rwxr-xr-x 1 root root 1887 Dec 19 2010 private_pages
-rwxr-xr-x 1 root root 988 Feb 20 2012 remove_website
-rwxr-xr-x 1 root root 1580 Dec 19 2010 setup_database

libraries:
total 152
drwxr-xr-x 3 root root 4096 Jun 9 01:19 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
-rw-r--r-- 1 root root 3228 Jun 9 01:19 configuration.php
-rw-r--r-- 1 root root 1124 Oct 28 2010 controller.php
drwxr-xr-x 2 root root 4096 Aug 22 2011 database
-rw-r--r-- 1 root root 9032 Mar 13 2012 email.php
-rw-r--r-- 1 root root 2530 Dec 17 2010 error.php
-rw-r--r-- 1 root root 3637 Feb 29 2012 filter.php
-rw-r--r-- 1 root root 2872 Mar 4 2012 general.php
-rw-r--r-- 1 root root 6301 May 29 22:19 http.php
-rw-r--r-- 1 root root 2572 May 26 2010 menu.php
-rw-r--r-- 1 root root 675 Oct 28 2010 model.php
-rw-r--r-- 1 root root 8733 Mar 4 2012 output.php
-rw-r--r-- 1 root root 6198 Mar 13 2012 page.php
-rw-r--r-- 1 root root 3947 Nov 1 2010 pagination.php
-rw-r--r-- 1 root root 6626 Mar 3 2012 security.php
-rw-r--r-- 1 root root 4758 Feb 26 2012 session.php
-rw-r--r-- 1 root root 3724 Mar 4 2012 settings.php
-rw-r--r-- 1 root root 7705 May 20 2010 tablemanager_controller.php
-rw-r--r-- 1 root root 7096 Oct 28 2010 tablemanager_model.php
-rw-r--r-- 1 root root 12251 Dec 23 2009 tablemanager.php
-rw-r--r-- 1 root root 2677 Jun 9 01:19 user_agent.php
-rw-r--r-- 1 root root 7516 Nov 22 2011 user.php
-rw-r--r-- 1 root root 6931 Mar 4 2012 xml.php

logfiles:
total 16
drwxr-xr-x 2 root root 4096 Jun 7 11:20 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
-rw-r--rw- 1 root root 954 Oct 1 02:25 access.log
-rw-r--rw- 1 root root 174 Oct 1 02:25 actions.log
-rw-r--rw- 1 root root 0 Jun 7 11:20 error.log

models:
total 72
drwxr-xr-x 4 root root 4096 May 29 22:05 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
drwxr-xr-x 2 root root 4096 Mar 3 2012 admin
-rw-r--r-- 1 root root 493 Jan 17 2010 alerts.php
-rw-r--r-- 1 root root 1774 Mar 1 2012 browser_with_os.php
-rw-r--r-- 1 root root 559 May 29 22:05 events.php
-rw-r--r-- 1 root root 1966 Oct 17 2010 homepage.php
-rw-r--r-- 1 root root 4178 Mar 12 2012 host_statistics.php
-rw-r--r-- 1 root root 1343 Apr 5 2011 login.php
-rw-r--r-- 1 root root 718 Feb 29 2012 operating_system.php
-rw-r--r-- 1 root root 644 Jun 13 2011 origins.php
-rw-r--r-- 1 root root 1218 Jun 11 2010 profile.php
-rw-r--r-- 1 root root 2284 Jun 13 2011 referers.php
-rw-r--r-- 1 root root 591 Mar 3 2012 server_statistics.php
-rw-r--r-- 1 root root 1033 Nov 21 2011 session.php
drwxr-xr-x 2 root root 4096 Dec 17 2010 system
-rw-r--r-- 1 root root 1644 Feb 29 2012 web_browser.php

public:
total 28
drwxr-xr-x 5 root root 4096 Mar 13 2012 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
drwxr-xr-x 6 root root 4096 May 29 21:58 css
drwxr-xr-x 4 root root 4096 Mar 13 2012 images
-rw-r--r-- 1 root root 3271 Mar 13 2012 index.php
drwxr-xr-x 4 root root 4096 Mar 13 2012 js
-rw-r--r-- 1 root root 26 Jun 7 2010 robots.txt

settings:
total 20
drwxr-xr-x 2 root root 4096 May 29 22:03 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
-rw-r--r-- 1 root root 538 May 29 22:03 private_pages.conf
-rw-r--r-- 1 root root 131 Dec 22 2009 public_pages.conf
-rw-r--r-- 1 root root 364 Sep 27 22:31 website.conf

templates:
total 32
drwxr-xr-x 2 root root 4096 Mar 13 2012 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
-rw-r--r-- 1 root root 89 Dec 17 2010 page_controller.php
-rw-r--r-- 1 root root 45 Dec 17 2010 page_model.php
-rw-r--r-- 1 root root 618 Dec 17 2010 page_view.xslt
-rw-r--r-- 1 root root 316 Dec 17 2010 tablemanager_controller.php
-rw-r--r-- 1 root root 1074 Dec 17 2010 tablemanager_model.php
-rw-r--r-- 1 root root 311 Dec 17 2010 tablemanager_view.xslt

views:
total 84
drwxr-xr-x 5 root root 4096 May 29 22:07 .
drwxr-xr-x 11 root root 4096 Jun 7 11:20 ..
drwxr-xr-x 2 root root 4096 Mar 13 2012 admin
-rw-r--r-- 1 root root 692 Dec 17 2010 admin.xslt
-rw-r--r-- 1 root root 593 May 16 2010 alerts.xslt
-rw-r--r-- 1 root root 761 May 16 2010 browser_with_os.xslt
-rw-r--r-- 1 root root 850 May 29 22:07 events.xslt
-rw-r--r-- 1 root root 1433 Mar 2 2012 homepage.xslt
-rw-r--r-- 1 root root 1935 Mar 3 2012 host_statistics.xslt
drwxr-xr-x 2 root root 4096 Mar 13 2012 includes
-rw-r--r-- 1 root root 1179 May 16 2010 login.xslt
-rw-r--r-- 1 root root 364 Dec 16 2009 logout.xslt
-rw-r--r-- 1 root root 284 Dec 16 2009 offline.xslt
-rw-r--r-- 1 root root 745 May 16 2010 operating_system.xslt
-rw-r--r-- 1 root root 751 May 16 2010 origins.xslt
-rw-r--r-- 1 root root 1523 May 16 2010 profile.xslt
-rw-r--r-- 1 root root 1067 Jun 13 2011 referers.xslt
-rw-r--r-- 1 root root 939 Mar 3 2012 server_statistics.xslt
-rw-r--r-- 1 root root 1816 Nov 21 2011 session.xslt
drwxr-xr-x 2 root root 4096 Mar 13 2012 system
-rw-r--r-- 1 root root 740 May 16 2010 web_browser.xslt
Hugo Leisink
1 October 2012, 11:50
From your logfile: https://monitor.projectphaze.us:80/

HTTPS at port 80? Is that correct?
Ahcor Werdna
1 October 2012, 11:52
Yes that is correct. I use port 443 for a different service.
Ahcor Werdna
1 October 2012, 12:10
Could that be the reason as to why it force logs off and then does a redirect to the login page?
Hugo Leisink
1 October 2012, 12:12
I don't think so. I tried visiting https://monitor.projectphaze.us:80/, but I don't see the Monitor website at that URL. Is that possible? I'd like to see for myself what goes wrong.
Ahcor Werdna
1 October 2012, 12:14
I renamed the url, that is my fault. Here is the address https://monitor.b0x4.net:80

Ahcor Werdna
1 October 2012, 12:24
I have the monitor in a jail. I did try to use FastCGI. But it had the same outcome.
dario
1 October 2012, 23:25
Hi all,
I had a similar issue installing monitor website on an already running hiawatha server (8.4 --> 8.5beta --> 8.5).
Every time I had to login twice to enter and view a page, asked again for password at every next request.
Fortunatelly I have another hiawatha webserver with monitor running properly so I checked/compared everything, endind up installing
missing package php5-mcrypt and now it works like a charm. I'm running hiawatha 8.5 with php5-fpm.
Hope this helps somehow.
Kudos to Hugo for this great product!!!
Cheers,
Dario
Ahcor Werdna
2 October 2012, 00:39
i@4:~# apt-get install php5-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-mcrypt is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hugo Leisink
2 October 2012, 19:46
I'm afraid I have no clue what goes wrong. Can you do some debugging in models/login.php? Try with some print statements to see what code is executed.
Ahcor Werdna
3 October 2012, 02:37
I will try that Hugo and get back to you.

Here is what I did so far. I installed Hiawatha monitor on my other server. URL https://monitor.projectphaze.us and the install went perfect. I would like to add that both servers are almost the same. Except for iptables! So I guess it's time do what Dario did and compare to see what my isolated issues is.
Ahcor Werdna
3 October 2012, 03:36
Okay so i figured out the issue. The Hiawatha Monitor does not accept authentication via port 80 over https. I am not sure as to why, would you have an idea Hugo? i guess my next step is to see if i can get it to accept authentication via https over port 80.
This topic has been closed.