Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate monitors appearing in montage #881

Closed
Tornadozone13 opened this issue Dec 31, 2019 · 6 comments
Closed

Duplicate monitors appearing in montage #881

Tornadozone13 opened this issue Dec 31, 2019 · 6 comments

Comments

@Tornadozone13
Copy link

Tornadozone13 commented Dec 31, 2019

Platform & OS Version

macOS Mojave 10.14.6 & iPhone 13.3

The version of zmNinja you are reporting:

1.3.85 & 1.3.087

The version and OS of ZoneMinder you are using:

1.33.16, Debian Buster

Device details:

MacBook Pro 2015 15" & iPhone 11 Pro Max

What is the nature of your issue

Bug/Question

Details

I sat down to run updates tonight and updated both zmNinja and Zoneminder to the latest versions. After doing so I am getting duplicate monitors. I can't tell if Zoneminder or zmNinja is the culprit but would like to know the best way to troubleshoot or find out if its a known issue. I looked at known bugs and didn't see it listed. I have tried reverting zmNinja on the Mac to the version I was running prior with no avail to the problem. I have attached both zmNinja and Zoneminder logs, the zmNinja had a few mentions of the monitor issue but nothing in the Zoneminder logs. Please disregard the event server issue, that is something I'm still trying to setup correctly to get remote notifications. I have starred out my DDNS address that was in the zmNinja logs for security reasons. Thanks for you help in advance.

Screen Shot 2019-12-30 at 9 57 41 PM

zmNinja Debug Logs


Dec 30, 2019 09:44:35 PM INFO Device is ready
Dec 30, 2019 09:44:35 PM INFO You are running on desktop
Dec 30, 2019 09:44:35 PM DEBUG Inside configureStorageDB
Dec 30, 2019 09:44:35 PM DEBUG configureStorageDB: trying order:["asyncStorage","localStorageWrapper"]
Dec 30, 2019 09:44:35 PM INFO configureStorageDB:localforage driver for storage:asyncStorage
Dec 30, 2019 09:44:35 PM DEBUG configureStorageDB:Making sure this storage driver works...
Dec 30, 2019 09:44:35 PM DEBUG configureStorageDB:test get/set worked, this driver is ok...
Dec 30, 2019 09:44:35 PM INFO localforage driver:asyncStorage
Dec 30, 2019 09:44:35 PM INFO Cloud settings plugin not found, skipping cloud sync...
Dec 30, 2019 09:44:35 PM INFO Cloudsync operation complete, continuing...
Dec 30, 2019 09:44:35 PM INFO >>>>No data to import....
Dec 30, 2019 09:44:35 PM INFO Retrieving language before init is called...
Dec 30, 2019 09:44:35 PM INFO No language set, switching to en
Dec 30, 2019 09:44:35 PM INFO Device Language is:en
Dec 30, 2019 09:44:35 PM INFO >>>>Language to be used:en
Dec 30, 2019 09:44:35 PM DEBUG isFirstUse returned: false
Dec 30, 2019 09:44:35 PM DEBUG last state=app.montage param=[object Object]
Dec 30, 2019 09:44:35 PM INFO Language file loaded, continuing with rest
Dec 30, 2019 09:44:35 PM INFO ZMData init: checking for stored variables & setting up log file
Dec 30, 2019 09:44:35 PM INFO Checking for new version updates...
Dec 30, 2019 09:44:35 PM INFO Setting up pause and resume handler AFTER language is loaded...
Dec 30, 2019 09:44:35 PM INFO user profile encrypted, decoding...
Dec 30, 2019 09:44:35 PM INFO Setting NVR init bandwidth to: highbw
Dec 30, 2019 09:44:35 PM INFO NVR init retrieved store loginData
Dec 30, 2019 09:44:35 PM INFO Inside init-complete in app.js: All init over, going to portal login
Dec 30, 2019 09:44:35 PM INFO Entering Portal Main
Dec 30, 2019 09:44:35 PM INFO User credentials are provided
Dec 30, 2019 09:44:38 PM INFO --------->Setting up network state handlers....
Dec 30, 2019 09:44:38 PM INFO --------->Setting up global key handler...
Dec 30, 2019 09:44:38 PM INFO ---> Hacked up waked detection...
Dec 30, 2019 09:44:40 PM INFO Pin code match
Dec 30, 2019 09:44:40 PM INFO Cancelling zmAutologin timer
Dec 30, 2019 09:44:40 PM INFO Detected token login supported
Dec 30, 2019 09:44:40 PM INFO Access token still has 8 minutes left, using it
Dec 30, 2019 09:44:40 PM INFO ----> Setting token re-login after 480 seconds
Dec 30, 2019 09:44:40 PM INFO Adding to chain stack: Pointer>http://******/zm
Dec 30, 2019 09:44:40 PM INFO Fallback of Pointer is 
Dec 30, 2019 09:44:40 PM INFO reached end of chain loop
Dec 30, 2019 09:44:40 PM INFO No need to do a reachability test, as there are no fallbacks
Dec 30, 2019 09:44:40 PM INFO No need for logout!
Dec 30, 2019 09:44:40 PM INFO Detected token login supported
Dec 30, 2019 09:44:40 PM INFO Access token still has 8 minutes left, using it
Dec 30, 2019 09:44:40 PM INFO ----> Setting token re-login after 480 seconds
Dec 30, 2019 09:44:40 PM INFO Got API version: 1.33.16
Dec 30, 2019 09:44:40 PM INFO First invocation of TimeZone, asking server
Dec 30, 2019 09:44:40 PM INFO EventSever: Initializing Websocket with URL wss://*****:9000
Dec 30, 2019 09:44:40 PM INFO getMonitors:Loading all monitors
Dec 30, 2019 09:44:40 PM INFO Checking value of ZM_MIN_STREAMING_PORT for the first time
Dec 30, 2019 09:44:40 PM INFO ZM_MIN_STREAMING_PORT not configured, disabling
Dec 30, 2019 09:44:40 PM INFO Monitor load was successful, loaded 8 monitors
Dec 30, 2019 09:44:40 PM INFO multi server list loaded
Dec 30, 2019 09:44:40 PM INFO sending stored ZM_MIN_STREAMING_PORT 0
Dec 30, 2019 09:44:40 PM INFO EventSever: Will try to reconnect in 10 sec..
Dec 30, 2019 09:44:40 PM INFO Inside Montage Ctrl:We found 8 monitors
Dec 30, 2019 09:44:40 PM INFO found a packery layout
Dec 30, 2019 09:44:40 PM INFO Monitors that are active and not DOM hidden: 8 while grid has 8
Dec 30, 2019 09:44:41 PM INFO Arranging as per packery grid
Dec 30, 2019 09:44:44 PM INFO found a packery layout
Dec 30, 2019 09:44:44 PM INFO Monitors that are active and not DOM hidden: 8 while grid has 6
Dec 30, 2019 09:44:44 PM INFO Whoops!! Monitors have changed. I'm resetting layouts, sorry!
Dec 30, 2019 09:44:49 PM INFO sending stored ZM_MIN_STREAMING_PORT 0
Dec 30, 2019 09:44:50 PM INFO EventSever: Initializing Websocket with URL wss://*****:9000
Dec 30, 2019 09:44:50 PM INFO EventSever: Will try to reconnect in 10 sec..

Zoneminder Logs (if applicable)


2019-12-30 21:40:01 | zmdc |   | 832 | ERR | 'zmeventnotification.pl' exited abnormally, exit status 255 | zmdc.pl |  
-- | -- | -- | -- | -- | -- | -- | --
2019-12-30 21:40:01 | zmeventnotification |   | 5167 | ERR | Failed starting server: SSL_cert_file /etc/letsencrypt/live/domain/fullchain.pem can't be used: No such file or directory at /usr/share/perl5/IO/Socket/SSL.pm line 2284. | zmeventnotification.pl |  
2019-12-30 21:40:01 | zmeventnotification |   | 5167 | INF | MQTT Disabled | zmeventnotification.pl |  
2019-12-30 21:40:01 | zmeventnotification |   | 5167 | INF | Push enabled via FCM | zmeventnotification.pl |  
2019-12-30 21:40:01 | zmeventnotification |   | 5167 | INF | using secrets file: /etc/zm/secrets.ini | zmeventnotification.pl |  
2019-12-30 21:40:01 | zmeventnotification |   | 5167 | INF | using config file: /etc/zm/zmeventnotification.ini | zmeventnotification.pl |  
2019-12-30 21:30:00 | zmdc |   | 832 | ERR | 'zmeventnotification.pl' exited abnormally, exit status 255 | zmdc.pl |  
2019-12-30 21:30:00 | zmeventnotification |   | 2740 | ERR | Failed starting server: SSL_cert_file /etc/letsencrypt/live/domain/fullchain.pem can't be used: No such file or directory at /usr/share/perl5/IO/Socket/SSL.pm line 2284. | zmeventnotification.pl |  
2019-12-30 21:30:00 | zmeventnotification |   | 2740 | INF | MQTT Disabled | zmeventnotification.pl |  
2019-12-30 21:30:00 | zmeventnotification |   | 2740 | INF | Push enabled via FCM | zmeventnotification.pl |  
2019-12-30 21:30:00 | zmeventnotification |   | 2740 | INF | using secrets file: /etc/zm/secrets.ini | zmeventnotification.pl |  
2019-12-30 21:30:00 | zmeventnotification |   | 2740 | INF | using config file: /etc/zm/zmeventnotification.ini | zmeventnotification.pl |  
2019-12-30 21:24:39 | zmdc |   | 832 | ERR | 'zmeventnotification.pl' exited abnormally, exit status 255 | zmdc.pl |  
2019-12-30 21:24:39 | zmeventnotification |   | 2726 | ERR | Failed starting server: SSL_cert_file /etc/letsencrypt/live/domain/fullchain.pem can't be used: No such file or directory at /usr/share/perl5/IO/Socket/SSL.pm line 2284. | zmeventnotification.pl |  
2019-12-30 21:24:39 | zmeventnotification |   | 2726 | INF | MQTT Disabled | zmeventnotification.pl |  
2019-12-30 21:24:39 | zmeventnotification |   | 2726 | INF | Push enabled via FCM | zmeventnotification.pl |  
2019-12-30 21:24:39 | zmeventnotification |   | 2726 | INF | using secrets file: /etc/zm/secrets.ini | zmeventnotification.pl |  
2019-12-30 21:24:39 | zmeventnotification |   | 2726 | INF | using config file: /etc/zm/zmeventnotification.ini | zmeventnotification.pl |  
2019-12-30 21:24:10 | web_php |   | 1933 | ERR | Socket /var/run/zm/zms-399097s.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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. | /usr/share/zoneminder/www/includes/functions.php | 2172
2019-12-30 21:21:58 | zmdc |   | 832 | ERR | 'zmeventnotification.pl' exited abnormally, exit status 255 | zmdc.pl |  
2019-12-30 21:21:58 | zmeventnotification |   | 1588 | ERR | Failed starting server: SSL_cert_file /etc/letsencrypt/live/domain/fullchain.pem can't be used: No such file or directory at /usr/share/perl5/IO/Socket/SSL.pm line 2284. | zmeventnotification.pl


Thanks in advances, 
GAP
@welcome
Copy link

welcome bot commented Dec 31, 2019

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you follow the issue template or I may not respond.

@pliablepixels
Copy link
Member

pliablepixels commented Dec 31, 2019

  1. Log into ZM Console, open a new tab and see the output of https://yourserver/api/zm/monitors.json - does it show each monitor twice? If so, you need to fix your API/DB

  2. If not, in zmNinja go to menu->Clear API cache, exit the app and try again

@cotman
Copy link

cotman commented Dec 31, 2019

mmm...think this might be an issue with recent Zoneminders from the master branch (I'm running 1.33.16~20191229135312-bionic,but I also saw the same behaviour with 1.33.16~20191226155739-bionic).

The API returns two of each monitor, although only one of each is displayed in the web console - first spotted this problem with the Zoneminder plugin for Kodi, but now see it happens with zmNinja too).

@Tornadozone13
Copy link
Author

It does appear to be a Zoneminder issue based on the output of http://server/zm/api/monitors.json. I didn't think to run that command as the web interface doesn't show the duplicate like nmNinja. The weird thing is it only duplicated 2 of my 6 monitors, both happen to be rotated sideways. Is it possible to edit the API/DB to remove the duplicates or should I just recreate my Zoneminder instance?

@neillbell
Copy link
Contributor

This seems to be related to the problem referenced at ZoneMinder/zoneminder#2772

Once I deleted all my groups and did a "Clear API Cache", things went back to normal. The fix for this was 11 days ago, though, so I don't know why it showed up now.

@Tornadozone13
Copy link
Author

That is probably by far the strangest "hack" I have seen... I guess when I upgrade to the latest version of Zoneminder, something went wrong in the database creating the duplicate monitors. As @neillbell mentioned deleting the all group views, "Clear API Cache" in zmNinja, and restarting zoneminder was the key to fixing this issue. Thank you all for the help in troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants