Update from 1.29 to 1.30 but blank ZM webpage

Forum for questions and support relating to the 1.30.x releases only.
myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Fri Aug 05, 2016 7:06 pm

Hello all,

I have been using 1.29.0 happily since it was released with no issues (as well as versions before that!). I have been on Ubuntu Server 14.04 LTS and all has been well until now.

Just the other day I noticed that ZM 1.30 was released and was eager to try it out. I quickly learned that 1.30 had a dependency on libsys-meminfo-perl that trusty(14.04) could not offer at present. This is not a problem as I have been wanting to jump to 16.04.1 for a while. So i did a release upgrade to bump everything up and this went off without a hitch. Everything else that this machine serves up is better than ever now.

I am now running 16.04.1 but am struggling to debug a zoneminder issue at this point. I have followed the install instructions to the letter. The ones followed are located here:
http://zoneminder.readthedocs.io/en/sta ... untu-16-04

What I am seeing is a completely blank webpage for ZM (not a 404, but a white page). Here is what I know:
  • Apache2 claims no issues when reviewing its error.log file. I am happy to append though!
  • the zoneminder.service claims no issues either when a "systemctl status zoneminder.service" is run. It says its currently running fine.
  • There is no zm log file in /tmp/zm/. The directory is completely empty.
  • I have confirmed that the php.ini files have the date.timezone line uncommented and correctly defined.
  • web browsing to the <ip Address>/zm/ yields a blank page, and when I inspect page source I see "//ZoneMinder main web interface file, $Date$, $Revision$" so Apache is trying to serve up something.
  • I updated my release from 14.04LTS, where everything worked before, using do-release-upgrade, and am presently at 16.04.1LTS
  • I updated my ZM release to 1.30.0 using the prescribed PPA from iconnor. Confirmed that 1.30 is installed.
  • I have tried purging my LAMP framework AND ZoneMinder to create a clean-ish install, again using the instructions listed in the above readthedocs link. this was unsuccessful with the exact same "blank page" results.
Normally I would just wipe everything and start over, but I learn so little about how things work when I do that, that I'd prefer to debug and repair this issue if possible, to "teach a man to fish" so to speak.

I'm not a linux infrastructure guru, but I've ran simple linux servers and machines for 12 years so I take orders well! In the absence of ZM log files, does anyone know where I should look for the root cause? I really like ZM and have suggested it to my employer as well as many friends. It'd be silly if I couldn't make it work myself!

User avatar
iconnor
Posts: 1201
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by iconnor » Fri Aug 05, 2016 9:59 pm

I find it interesting that your apache error log is empty. Normally when the white page thing happens it is due to a php error, which gets logged.

Typically zm log files go into /var/log/zm/*, although depending on setup, they could be getting logged to syslog or db or whatever.

myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Fri Aug 05, 2016 11:20 pm

If there is a log for apache other than /var/log/apache2/ then maybe it has new content? When I restart Apache2 the following is viewed via tail -f:

Code: Select all

[Fri Aug 05 11:21:42.339765 2016] [mpm_event:notice] [pid 22225:tid 139628007040896] AH00493: SIGUSR1 received.  Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Nothing else is mentioned.

/var/log/syslog contains nothing related to ZM, php, or apache.

Is there a way to get ZM logging going, or enable it in the conf file and reboot? Without a webpage I'm not sure how to proceed with diagnostics.

mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm
Contact:

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by mattionline » Sat Aug 06, 2016 5:39 pm

This must be an issue with apache.
If you installed zm correctly and activated the zoneminder config file it must work.

Is apache working correctly? Can you view php files? Is there an issue with php7.0 fpm hhvm or something like this?
Even if zm isn't running because you shut it down you are able to view the webinterface.
My Personal Blog: https://mattionline.de

bbunge
Posts: 2668
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by bbunge » Sun Aug 07, 2016 1:27 am

I did an install of 1.30 16.04 a couple weeks ago. Posted here:

viewtopic.php?f=36&t=25089

Keep in mind that the WIKI instructions are usually more up to date than the read the docs. As far as I know 1.30 is still in development so I've held off doing updated install instructions.

bb

SteveGilvarry
Posts: 430
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by SteveGilvarry » Sun Aug 07, 2016 7:49 am

bbunge,
Was released a week ago.
viewtopic.php?f=1&t=25098
Production Zoneminder 1.35.x
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Sun Aug 07, 2016 5:33 pm

mattionline wrote:This must be an issue with apache.
If you installed zm correctly and activated the zoneminder config file it must work.

Is apache working correctly? Can you view php files? Is there an issue with php7.0 fpm hhvm or something like this?
Even if zm isn't running because you shut it down you are able to view the webinterface.
Oh, that's interesting. So even if ZM is shut down completely i should still see a webpage then? Well, the main apache page you get when you browse to the IP address without the /zm suffix is working fine. Apache error logs don't show any complaints. Im not familiar with the php interaction with apache so I'll need to do some sleuthing to see how to debug that interface.

I also milled around in the mysql error logs and found this:

Code: Select all

zcat error.log.1.gz

2016-08-07T00:25:40.429898Z 100 [Note] Aborted connection 100 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
2016-08-07T00:25:40.429901Z 99 [Note] Aborted connection 99 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
2016-08-07T00:25:40.466922Z 91 [Note] Aborted connection 91 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
2016-08-07T00:25:40.503223Z 73 [Note] Aborted connection 73 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
2016-08-07T00:25:40.612081Z 78 [Note] Aborted connection 78 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
2016-08-07T00:32:00.672219Z 126 [Note] Aborted connection 126 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
Haven't had much time to look into it but I will push on it more this afternoon. Tailing the error.log files and restarting ZM results in a handful of new errors being generated with each restart. Visiting the webpage does not cause any new errors to be generated.

bbunge
Posts: 2668
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by bbunge » Sun Aug 07, 2016 11:41 pm

Ah, I missed that post! Just did an upgrade instruction for the WIKI:
https://wiki.zoneminder.com/Common_Issu ... .0_Upgrade

One step that is missing from the http://zoneminder.readthedocs.io/en/sta ... untu-16-04 is an Apache fix that is documented in the WIKI: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Let us know if this fixes your issue.

Fix to allow API to work

nano /etc/apache2/apache2.conf

Change None to All two places as shown below

<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Ctrl+o Enter to save

CTRL+x to exit

myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Mon Aug 08, 2016 1:12 am

Bbunge,

Thank you for the reply. Sadly, I had already applied these changes a couple of days ago with no success.

I have done a little more sniffing around though, and here's the sum total of the seemingly important diagnostic info that I've learned:
  • The default index.html for Apache is working, so when I goto the ip addr without the "/zm" suffix I see it no problem
  • The ZM page shows up completely white/blank, but right clicking and viewing source shows the code in the index.php file located at /usr/share/zoneminder/www/, so this link appears to be intact.
  • The apache error log is totally boring, only mentioning every time I've rebooted it and nothing more
  • Using ZMNinja, I can connect and authenticate, but any attempt to navigate around the app is unsuccessful, just hanging when I try. It also runs slowly. At least I can connect though, it shows something under the hood is running, like part of the API. The "System Status" tab says the state is "Undetermined" though.
  • maddionline's comment seems really reasonable, so I cranked up the reporting level in php.ini to see if I could see more, but nothing so far.
So right now I just want to turn up the diagnostics, but like I mentioned earlier, the ZM log is not present, with the /var/log/zm/ directory completely empty. I bumped up the php error reporting but so far nothing. I feel like Im missing out on an important diagnostic tool or log somewhere, but trying to fix problems in Linux is still rather new to me so it wouldnt surprise me if the bug was right under my nose.

bbunge
Posts: 2668
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by bbunge » Mon Aug 08, 2016 1:47 am

You may want to start over with a fresh Ubuntu install. Just tested this and it works for me:
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Tip: Get Ubuntu installed/updated and use Clonezilla to take an image you can reload if your Zoneminder setup causes problems...

myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Mon Aug 08, 2016 3:48 am

Darn. Well OK I guess I'll burn it all down. Problem is that the machine hosts so much that works still, seems silly to have to torch it all just because ZM doesn't. Oh well, ill back up the various confs just to ease the pain.

Do you recommend using MariaDB? I don't know what that offers me personally, but the instructions seem to suggest using it. I don't want to add any complexity though if its not really needed.

SteveGilvarry
Posts: 430
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by SteveGilvarry » Mon Aug 08, 2016 10:26 am

bbunge,
We might have to work on those apache2.conf changes, zoneminder.conf should be doing everything we need to the specific folders for /zm. We really should get you up to speed on updating readthedocs so you can edit there also.

myurkoski,
Out of interest can you run below and post results.
apachectl -M
Production Zoneminder 1.35.x
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

bbunge
Posts: 2668
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by bbunge » Mon Aug 08, 2016 12:46 pm

myurkoski wrote:Darn. Well OK I guess I'll burn it all down. Problem is that the machine hosts so much that works still, seems silly to have to torch it all just because ZM doesn't. Oh well, ill back up the various confs just to ease the pain.

Do you recommend using MariaDB? I don't know what that offers me personally, but the instructions seem to suggest using it. I don't want to add any complexity though if its not really needed.
I use Mariadb on my production server and it runs quite well. Newer versions of MySQL seem to use more resources and after a good experience testing Centos I decided to try Mariadb. I try to be neutral when writing options in the instructions but guess my preferenced do show through.

If you have a lot of stuff running on that server we can try to work you through your problems. One way for you to test things is to use VirtualBox and do test installs on it.

Bill

myurkoski
Posts: 12
Joined: Fri Aug 05, 2016 6:27 pm

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by myurkoski » Mon Aug 08, 2016 8:24 pm

Good news!

Before I nuked my linux server completely, I figured I'd try a last-ditch attempt to avoid that. Basically what I did was employ a scorched-earth approach to the AMP aspects of the LAMP server. Apt-get purge was used profusely, I was very trigger-happy and used probably more wildcards than I should have. When I threw everything back together exactly as instructed on the wiki, I now have a ZM webpage!

Regretfully, I did this before I had a chance to read Steve's suggested apachectl -M command, which I believe would have been very revealing now that I understand what it does. I'm pretty sure that PHP was just not running correctly as maddieonline mentioned right off the bat. Next time I will know right where to look, and I suggest the same to others with the same behavior.

I'll have to handle the rest of the setup and testing when I get home, but at least we're making upground now. Thank you for the help guys! Now where is that donate popup?

---M Yurkoski

sabra
Posts: 4
Joined: Sat Apr 29, 2017 6:17 am

Re: Update from 1.29 to 1.30 but blank ZM webpage

Post by sabra » Mon May 01, 2017 6:21 am

After reloading my work laptop with Ubuntu 16.04 LTS (I prefer to do a reload versus an upgrade, for each LTS version) I was very excited to install PHP 7, and installed using the standard Ubuntu repositories using typical commands:

$ sudo apt-get install apache2
$ sudo apt-get install php7.0

However, after doing the installs I discovered PHP scripts would not render in a browser. After a small amount of digging I realized that doing the base installs did not include one important piece. The package ‘libapache2-mod-php7.0’ was not automatically installed as expected, as it did in the past. (I don’t remember needing to install it separately in the past.) Hopefully the package maintainers fix this at some point. Your mileage may vary.

$ sudo apt-get install libapache2-mod-php7.0

So one quick install like shown previous and all is working fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests