http://hostname_or_ip/zm gives "Site can't be reached"

Forum for questions and support relating to the 1.29.x releases only.
Locked
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

I'm using Ubuntu 16.04 desktop which has ZoneMinder 1.29 in its repos. I followed the wiki install instructions including tasksel of LAMP Server. I did get one funny:
root@john:~# a2enmod cgi
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

However, when I do "http://hostname_or_ip/zm", I get "Site can't be reached".

I noticed that there is a thread for ZoneMinder 1.30 called "New Install". One post (of Tue Oct 11, 2016 5:45 pm) said that the problem was php's time zone not being set. Mine is set i.e. the ; has been removed from the appropriate line (the line is now date.timezone = Europe/London) in the [Date[ section of /etc/php/7.0/apache2/php.ini.

PS I noticed that the wiki has an extra step compared to Zoneminder's website:
Edit zoneminder.conf Is that significant?

nano /etc/apache2/conf-available/zoneminder.conf
Add a - before Indexes and a + before FollowSymLinks

<Directory /usr/share/zoneminder/www>
Options -Indexes +FollowSymLinks
Make sure the following is at the bottom of the file

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>
Ctrl+o Enter to save

CTRL+x to exit

Enable and start Zoneminder

systemctl enable zoneminder
service zoneminder start
John
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by bbunge »

That step is not important unless you expose your server to the internet.
The php setting is needed for Zm 1.30.x and higher.
Double check all your steps and restart your server. You missed something!
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

@bbunge
Thanks for the info about the extra step. I've tried again and still getting same problem.
As I previously said, I got one funny:
root@john:~# a2enmod cgi
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
Could that be the cause?
I also noticed that the "New Install" thread also had the following:
<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Should I amend /etc/apache2/conf-available/zoneminder.conf (is that the correct file to amend?) as above?
The "New Install" post also stated "Opening a page with 127.0.0.1 returns the Apache 2 Ubuntu default page confirming (as per the text in the page) that the server is working properly.". When it try to open (in Chrome) http://127.0.0.1, I also get the "This site can't be reached". Does that mean that the problem is in Apache?
John
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

Another point is that 127.0.0.1 and 127.0.1.1 (in Chrome) both give site not reached even though I can ping them. The "New Install" post stated that "Opening a page with 127.0.0.1 returns the Apache 2 Ubuntu default page confirming (as per the text in the page) that the server is working properly.". So is there something I should do re 127.0.0.1?
John
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by bbunge »

The message after cgi is normal
The other add fixes a directory browsing issue in Zoneminder
You have installed Ubuntu on a desktop. Did you install LAMP from tasksel
Check to see if Zoneminder is starting. If you did not add the database to MySQL correctly you will have problems!
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

@bbunge
I did install LAMP server by using tasksel (i.e. invoking tasksel after sudo -i).
"systemctl start zoneminder" jsut returns prompt. zoneminder looks like it started Ok:
root@John:~# systemctl status zoneminder
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor prese
Active: active (running) since Mon 2018-02-26 14:58:13 GMT; 2 days ago
.....
John
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by bbunge »

My user name is bbunge! I do not have or want an @ attached to it.

From the Firefox browser on your Ubuntu desktop use http://localhost/zm
From another PC use: http://ip-address/zm

Yes, you need to do all the steps in the instructions here: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Make sure you become root by using sudo su before you run the commands or prepend each command with a sudo.

Make sure you get the MySQL correction. When you edit the my.cnf be sure to scroll down to the [mysqld] section to add: sql_mode = NO_ENGINE_SUBSTITUTION

F.Y.I. I just ran the instructions and they worked the first time.

If you want to upgrade to the latest release see: https://wiki.zoneminder.com/Common_Issu ... .x_Upgrade
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

I don't think that you are reading and/or understanding my posts. I did become root throughout. I have followed all the steps in the appropriate webpage for Ubuntu Desktop 16.04 i.e. https://zoneminder.readthedocs.io/en/la ... untu-16-04
i have not used the Server's webpage as I am amending an existing Ubuntu 16.04 Desktop install not the Server one. I have done the MySQL correction.
John
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by bbunge »

Server or desktop all the same install. Only difference is with a desktop you have to add tasksel then install LAMP with tasksel which you have done.

Please go through the steps in the WIKI as the Read-the-docs is not for 1.29.x. Trust me. That is why I spend a great deal of my retirement time running installs to make sure everything is accurate and can be done by someone with little Linux experience. There is even a Lubuntu .iso with Zoneminder pre-configured and ready to install!

Just go through the steps in the wiki to see what you missed: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

You may need to do: mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

I've done all the steps in the above (Server) wiki. Still same problem. I previously did instructions in viewtopic.php?t=21721 as I wanted to ZM to use port 81 rather than 80: I have set Port Forwarding on my router for port 81 to route to this computer. I'm wondering if this is a problem in Apache2 as http://127.0.0.1 *as well as http://server-ip/zm) gives "This site can't be reached".
John
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

Attached shows status of Apache2 & ZoneMinder.
Attachments
Apache2 and ZoneMinder Statuses.txt
(2.7 KiB) Downloaded 431 times
John
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by bbunge »

If you changed the default port you need to use http://localhost:81/zm
johnaaronrose
Posts: 44
Joined: Tue Feb 27, 2018 9:27 am

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by johnaaronrose »

http://localhost:81/zm/ gives the ZoneMInder console. Thanks for that.
John
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: http://hostname_or_ip/zm gives "Site can't be reached"

Post by alabamatoy »

http to localhost probably presents very little risk, but from anywhere else, risk is significant. The local cameras login/pw and IPs etc etc are readily sniffed as well as actual ZM creds
Locked