1.32 problems

Discussion topics related to mobile applications for ZoneMinder
Post Reply
harrijs
Posts: 5
Joined: Tue Oct 02, 2018 6:38 pm

1.32 problems

Post by harrijs » Tue Oct 02, 2018 6:48 pm

After an upgrade from 1.30.4 to 1.32 my zmninja has become broken. Just to be clear, I have scoured the forums, IRC, and the FAQs for a resolution. I have verified that the upgrade was successful and that the APIs are configured correctly. I see the correct ZM version and API version when I reach https://server/zm/api/host/getversion.json. I see my monitors returned when I reach https://server/zm/api/monitors.json. I do receive the following when listing the monitors but I don't know that it is an issue:

Notice (8): Use of undefined constant ZM_DB_SSL_CA_CERT - assumed 'ZM_DB_SSL_CA_CERT' [CORE/Cake/Model/ConnectionManager.php, line 69]
Notice (8): Use of undefined constant ZM_DB_SSL_CLIENT_KEY - assumed 'ZM_DB_SSL_CLIENT_KEY' [CORE/Cake/Model/ConnectionManager.php, line 69]
Notice (8): Use of undefined constant ZM_DB_SSL_CLIENT_CERT - assumed 'ZM_DB_SSL_CLIENT_CERT' [CORE/Cake/Model/ConnectionManager.php, line 69]

The zmninja app authenticates successfully according to the app and the server logs. After the authentication success message from the app, I get the screen that says "If this screen doesn't go away after a while, it is possibly your APIs are not configured properly."

For the most part everything appears to be working from the web interface, I just seem to have an issue with zmninja accessing it and the normal areas that cause the problem (APIs) don't seem to be the culprit this time.

If there is any additional information I can provide or testing that I can perform I would be happy to work on resolving this issue. TIA.

CentOS Linux release 7.5.1804 (Core)
zmNinja v1.3.021 - Android 8.1.0

# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.es.its.nyu.edu
* epel: mirror.cogentco.com
* extras: centos.servint.com
* rpmfusion-free-updates: mirrors.lug.mtu.edu
* rpmfusion-nonfree-updates: mirrors.lug.mtu.edu
* updates: mirror.atlanticmetro.net
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9911
*epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12695
extras/7/x86_64 CentOS-7 - Extras 432
rpmfusion-free-updates/x86_64 RPM Fusion for EL 7 - Free - Updates 243
rpmfusion-nonfree-updates/x86_64 RPM Fusion for EL 7 - Nonfree - Updates 50
updates/7/x86_64 CentOS-7 - Updates 1540
repolist: 24871

User avatar
asker
Posts: 1049
Joined: Sun Mar 01, 2015 12:12 pm

Re: 1.32 problems

Post by asker » Tue Oct 02, 2018 8:36 pm

See viewtopic.php?t=27518

Your APIs are still not configured correctly. Those lines (ZM_DB_etc) will cause ZM issues.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

harrijs
Posts: 5
Joined: Tue Oct 02, 2018 6:38 pm

Re: 1.32 problems

Post by harrijs » Tue Oct 02, 2018 10:13 pm

Thanks,

This is getting me closer but still no cigar. I now have my monitors listed in zmNinja. I added the new lines from my zm.conf.rpmnew file to the zmcustom.conf file in/etc/zm/conf.d

I can't see live output from my monitors, but I can replay events.

I checked my.cnf in /etc/ and it doesn't have the following to be removed:

sql_mode = NO_ENGINE_SUBSTITUTION

Here is the output of my.cnf:

root@hostname# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

There are three files in /etc/my.cnf.d

root@hostname# cat client.cnf
#
# These two groups are read by the client library
# Use it for options that affect all clients, but not the server
#


[client]

# This group is not read by mysql client library,
# If you use the same .cnf file for MySQL and MariaDB,
# use it for MariaDB-only client options
[client-mariadb]



root@hostname# cat mysql-clients.cnf
#
# These groups are read by MariaDB command-line tools
# Use it for options that affect only one utility
#

[mysql]

[mysql_upgrade]

[mysqladmin]

[mysqlbinlog]

[mysqlcheck]

[mysqldump]

[mysqlimport]

[mysqlshow]

[mysqlslap]


root@hostname# cat server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]

# this is only for embedded server
[embedded]

# This group is only read by MariaDB-5.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mysqld-5.5]

# These two groups are only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

[mariadb-5.5]

Please let me know if I can provide any further information to help troubleshoot this issue. TIA

User avatar
asker
Posts: 1049
Joined: Sun Mar 01, 2015 12:12 pm

Re: 1.32 problems

Post by asker » Tue Oct 02, 2018 11:41 pm

I am frankly not a Zoneminder config expert. I know you said you went through the FAQ but mostly working is not properly working (like the API part above). There are many points posted in the FAQ about streaming issues. You'll have to diligently check those. If you still have pending Zoneminder install issues you will find better support in the ZM 1.32 forum (folks there know a lot about configuration issues)
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

harrijs
Posts: 5
Joined: Tue Oct 02, 2018 6:38 pm

Re: 1.32 problems

Post by harrijs » Wed Oct 03, 2018 1:54 pm

Thanks, I will move this discussion over there. I do want to point out that the API issue I experienced is not currently documented outside of this forum. All of the steps to check APIs that I was able to find regarding zmNinja (zmNinja git/wiki/medium) worked for me and I still didn't have a working connection.

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

Re: 1.32 problems

Post by iconnor » Wed Oct 03, 2018 2:32 pm

The DB SSL errors can be gotten rid of by adding the following lines to /etc/zm/zm.conf

# SSL CA certificate for ZoneMinder database
ZM_DB_SSL_CA_CERT=

# SSL client key for ZoneMinder database
ZM_DB_SSL_CLIENT_KEY=

# SSL client cert for ZoneMinder database
ZM_DB_SSL_CLIENT_CERT=

User avatar
asker
Posts: 1049
Joined: Sun Mar 01, 2015 12:12 pm

Re: 1.32 problems

Post by asker » Wed Oct 03, 2018 3:18 pm

harrijs wrote:
Wed Oct 03, 2018 1:54 pm
Thanks, I will move this discussion over there. I do want to point out that the API issue I experienced is not currently documented outside of this forum. All of the steps to check APIs that I was able to find regarding zmNinja (zmNinja git/wiki/medium) worked for me and I still didn't have a working connection.
If you are sure all the API steps work out, then it may be a zmNinja conf. issue.

Do any of the live streaming issues in the FAQ apply to you? Did you try with the desktop, using a wizard? Lets start with your response to this section- just the summary part
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

harrijs
Posts: 5
Joined: Tue Oct 02, 2018 6:38 pm

Re: 1.32 problems

Post by harrijs » Wed Oct 03, 2018 3:37 pm

Thanks again for your assistance.

I was able to install the desktop client successfully. Going through the wizard successfully connected to the ZM instance and I can view live images from all of my monitors. I believe this shows that the underlying ZM instance is working as expected.

I began to review some of the httpd logs and specifically noticed some output in the ssl_error_log when attempting to connect via my android zmNinja instance:

[Wed Oct 03 10:30:29.874875 2018] [:error] [pid 124556] [client x.x.x.x:40450] ERR [Socket /var/lib/zoneminder/sock/zms-202579s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.]

I am going to look into this to verify everything, but if it works for the desktop zmNinja client, I believe that tells me that the android zmNinja client should work as well.

I think that I may clear the cache and data on the android client as well and run the setup again. I will wait until you reply before doing so in case you want to grab any output off the android client.

User avatar
asker
Posts: 1049
Joined: Sun Mar 01, 2015 12:12 pm

Re: 1.32 problems

Post by asker » Wed Oct 03, 2018 3:41 pm

As I wrote before, please respond to all the points I requested in my post above (summary section)
I am going to look into this to verify everything, but if it works for the desktop zmNinja client, I believe that tells me that the android zmNinja client should work as well.
Not necessarily. Here are various things that can go wrong:

1. You might have run the desktop version on the same LAN as ZM but ran the mobile app from WAN and there are some issue there ( Open a chrome browser from the mobile phone and connect to ZM to make sure it works there too)
2. You are using self-signed certs and the common name of the cert doesn't match the URL hostname
3. Please post un-edited (except for masking personal info) logs from ZM and apache error logs when you are trying to stream

etc.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests