ZoneMinder / zoneminder

ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
http://www.zoneminder.com/
GNU General Public License v2.0
5.03k stars 1.21k forks source link

[H264] For time to time I find ZM partially stopped #1688

Closed abishai closed 7 years ago

abishai commented 7 years ago

Running revision a7979eb (20161003) of video-storage-h264, 12 monitors are in h.264 passthrough. From time to time, ZM web interface indicating that instance is stopped, however all main functions works - video is written, motion is detected, ZMNinja fully works.

I enable debug output for zmdc, however I found nothing obvious. http://pastebin.com/WsGjLAqh

root@zm:~ # ps -aux
USER    PID %CPU %MEM     VSZ    RSS TT  STAT STARTED     TIME COMMAND
www   39832  4.2  1.7  668608 418012  -  SJ   02:47   68:34.70 /usr/local/bin/zmc -m 7
www   39863  4.2  1.3  522036 326856  -  RJ   02:48   38:30.77 /usr/local/bin/zma -m 1
www   39862  4.1  1.3  513844 320780  -  SJ   02:48   40:59.34 /usr/local/bin/zma -m 3
www   39850  3.7  1.6  666560 409856  -  SJ   02:47   58:33.42 /usr/local/bin/zmc -m 6
www   39848  2.9  1.6  658368 410284  -  SJ   02:47   44:10.31 /usr/local/bin/zmc -m 3
www   39844  2.5  0.8  405040 188996  -  SJ   02:47   32:21.96 /usr/local/bin/zmc -m 12
www   39846  2.3  0.7  396848 178840  -  SJ   02:47   33:09.93 /usr/local/bin/zmc -m 5
www   39847  2.3  1.6  664512 401608  -  SJ   02:47   38:29.15 /usr/local/bin/zmc -m 11
www   39849  2.2  1.6  662464 410932  -  SJ   02:47   38:23.88 /usr/local/bin/zmc -m 1
www   39869  1.7  0.6  330148 139840  -  SJ   02:48   17:25.13 /usr/local/bin/zma -m 2
www   39861  1.6  0.6  334244 142408  -  SJ   02:48   17:58.52 /usr/local/bin/zma -m 8
www   39865  1.4  0.6  330148 139828  -  SJ   02:48   17:08.89 /usr/local/bin/zma -m 4
www   39860  1.3  0.5  326052 137180  -  SJ   02:48   16:59.06 /usr/local/bin/zma -m 5
www   39859  1.2  1.3  505652 314660  -  SJ   02:48   14:12.72 /usr/local/bin/zma -m 9
www   39853  1.1  0.6  332196 139816  -  SJ   02:47   17:21.27 /usr/local/bin/zma -m 12
www   39856  1.1  0.7  396848 179756  -  SJ   02:47   25:36.62 /usr/local/bin/zmc -m 2
www   39855  0.6  1.7  682944 427892  -  SJ   02:47   23:07.56 /usr/local/bin/zmc -m 9
www   39845  0.4  0.7  398896 179568  -  SJ   02:47   28:02.31 /usr/local/bin/zmc -m 8
www   39857  0.2  0.7  394800 180180  -  SJ   02:47   18:32.02 /usr/local/bin/zmc -m 4
root   7390  0.0  0.0   10464   1152  -  IsJ  Fri16    0:00.94 /usr/sbin/syslogd -c -ss
mysql  7446  0.0  0.0   13144      0  -  IWsJ -        0:00.00 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/usr/local/etc/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --pid-file=/var/db/mysql/zm.dacha.abinet.ru.
mysql  8758  0.0  0.7 2073784 187576  -  IJ   Fri16    3:18.95 /usr/local/libexec/mysqld --defaults-extra-file=/usr/local/etc/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --plugin-dir=/usr/local/lib/mysql/plugin --skip-perfo
root   8939  0.0  0.0   58772   2200  -  SsJ  Fri16    0:01.30 php-fpm: master process (/usr/local/etc/php-fpm.conf) (php-fpm)
root   8944  0.0  0.0   20260      0  -  IWsJ -        0:00.00 nginx: master process /usr/local/sbin/nginx
www    8945  0.0  0.0   20260   1412  -  IJ   Fri16    0:00.82 nginx: worker process (nginx)
www    8953  0.0  0.0   10428      0  -  IWsJ -        0:00.00 daemon: /usr/local/sbin/fcgiwrap[8954] (daemon)
www    8954  0.0  0.0   10408      0  -  IWJ  -        0:00.00 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8957  0.0  0.0   10408    488  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8958  0.0  0.0   10408    492  -  IJ   Fri16    0:00.06 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8959  0.0  0.0   10408    492  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8960  0.0  0.0   10408    740  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8961  0.0  0.0   10408    736  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8962  0.0  0.0   10408    736  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8963  0.0  0.0   10408    492  -  IJ   Fri16    0:00.06 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8964  0.0  0.0   10408    496  -  IJ   Fri16    0:00.06 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8965  0.0  0.0   10408    736  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8966  0.0  0.0   10408    740  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8967  0.0  0.0   10408    740  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8968  0.0  0.0   10408    736  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8969  0.0  0.0   10408    736  -  IJ   Fri16    0:00.05 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8970  0.0  0.0   10408    492  -  IJ   Fri16    0:00.04 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8971  0.0  0.0   10408      0  -  IWJ  -        0:00.00 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8972  0.0  0.0   10408    492  -  IJ   Fri16    0:00.02 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8973  0.0  0.0   10408      0  -  IWJ  -        0:00.00 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
www    8974  0.0  0.0   10408      0  -  IWJ  -        0:00.00 /usr/local/sbin/fcgiwrap -s unix:/var/run/fcgiwrap/fcgiwrap.sock -c 18
root   8996  0.0  0.0   55676   2220  -  IsJ  Fri16    0:00.00 /usr/sbin/sshd
root   9000  0.0  0.0   12564    464  -  IsJ  Fri16    0:00.10 /usr/sbin/cron -J 15 -s
www   39791  0.0  0.1   95228  17348  -  IJ   02:47    0:19.13 /usr/local/bin/perl -wT /usr/local/bin/zmaudit.pl -c
www   39797  0.0  0.1  111652  19044  -  IJ   02:47    0:01.24 /usr/local/bin/perl -wT /usr/local/bin/zmfilter.pl
www   39831  0.0  0.9  479028 219620  -  SJ   02:47    0:13.18 /usr/local/bin/zma -m 10
www   39851  0.0  0.8  479028 210356  -  SJ   02:47    0:14.61 /usr/local/bin/zma -m 7
www   39858  0.0  1.7  672704 420444  -  SJ   02:48   15:14.15 /usr/local/bin/zmc -m 10
www   39864  0.0  0.8  479028 210232  -  SJ   02:48    0:14.40 /usr/local/bin/zma -m 11
www   39870  0.0  0.8  479028 210420  -  SJ   02:48    0:14.25 /usr/local/bin/zma -m 6
www   65645  0.0  0.1   84976  16776  -  SJ   17:12    0:00.53 /usr/local/bin/perl -wT /usr/local/bin/zmwatch.pl
www    8776  0.0  0.0   84976   7276 v0- SJ   Fri16    0:42.40 /usr/local/bin/perl -wT /usr/local/bin/zmdc.pl startup
root  65414  0.0  0.0   43732   2136  0  IJ   17:05    0:00.00 login [pam] (login)
root  65415  0.0  0.0   19600   2920  0  SJ   17:05    0:00.03 -csh (csh)
root  65815  0.0  0.0   21164   1964  0  R+J  17:18    0:00.00 ps -aux
root@zm:~ # sudo -u www zmdc.pl status
Unable to connect to server
root@zm:~ # sudo -u www zmdc.pl check
stopped

I can't figure out what is stopped ? All process seems to be here.

knight-of-ni commented 7 years ago

@abishai Please take all troubleshooting sessions to the user forum. If, during the discussion, someone can identify a specific component of the zoneminder source code misbehaving, which is not due to how zoneminder was packaged, then we can certainly file a bug report here. This is done intentionally to keep keep all discussions requests for help out of our github forum.

Previous problem reports with these same symptoms involved restarting zoneminder (usually through the web console) in a way that bypasses systemd. This is caused by a misconfiguration of the init scripts, which are created during the build/packaging process. If I recall you may be one of our FreeBSD users (always tell us what distro you are using when creating a report), in which case this probably does not apply. However, it would be worth checking if your init system agrees or differs with the start/stopped status shown on the web console. Please include that in your user forum post.