No image in watch window

Support and queries relating to all previous versions of ZoneMinder
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

No image in watch window

Post by carrthomas »

Hi ,

I have ZoneMinder nearly working... but there is no image in my monitor watch window. …..So I did the following:-

1) Mouse Clicking on the image box produces a Dialogue box describing the image properties and shows me the following information:-

Location: http://localhost/cgi-bin/zms?monitor=1& ... 50&scale=1

Width: 352 pixels
Height: 288 pixels



2) Next I Mouse Clicked on the URL link in the above dialogue box which reveals the following information :-

SERVER ERROR

The server encountered an internal error and was unable to complete your request.

Error message: Premature end of script headers: zms

I f you think this is a server error please contact your webserver.

ERROR 500



Any clues gratefully received.

Thanks

Peter Thomas



( I am using Mozilla browser and REDHAT 8. I have not installed Cambozola.)
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

More information on symptoms of above problem

/tmp/zmdc.log reports that zmc keeps crashing; there are multiple instances of:
Starting pending process, zmc -d 0
'zmc -d 0' starting at 03/10/24 23:27:08, pid = 4479
'zmc -d 0' started at 03/10/24 23:27:08
'zmc -d 0' crashed at 03/10/24 23:27:08, exit status 255



Jose' Rodriguez recommends in a possibly relevant forum mail to:-

Issue the following command to stop all ZM daemons: zmpkg.pl stop

Then log into ZM and click on Options. Go to the Video tab and turn off the option that says ZM_STRICT_VIDEO_CONFIG.

After that issue the following command to start the ZM daemons: zmpkg.pl start



How do I log into ZM ??


Thanks

Peter.
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Ok I have found options button and turned off ZM_STRICT_VIDEO_CONFIG .

Now I have an Image which is clear and fantastic for maybe 25 seconds and then it freezes!!

The image freezes solid and then disappears leaving a kite face icon in the top corner of the image box if I do a refresh.

Help!..

Peter
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Image box in watch window still freezing after 25 to 70 secs

The server load has crept up to 36 overnight and everything is responding very slowly on my desktop. (what are server load units and what do they mean.)

I shutdown Linux but it took ages. Never seen this behaviour before.

What to do next ? Where to look?

Any ideas please.

Peter
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Re: No image in watch window

Post by tech_fixer »

Peter,
It seems like the ZMS (ZoneMinder Streaming) processes are hainging. The trouble is that every time you try to view the watch window, a new ZMS process is started, but the ones that crash never finish, and may continue to consume system resources.

Now, the best way to debug this is to begin with a freshly rebooted system. so reboot now. After, try avvessing your camera with a capture program like "xawtv "or "tvtime". Sometimes the output generated by these programs is useful to troubleshoot image problems in ZM.

Now, check your log files. These can contain useful information about your problems. If your camera did not work right with xawtv or tvtime you should try first your system log in /var/log/messages. See the last 50 lines or so. Then issue the command dmesg. Check the last 25 lines or so.

If xawtv or tvtime worked fine, then try ZM's logs. The default install puts them in /tmp so, if you followed the default install, look for any files in /tmp that begin with the letters "zm".

If you find something suspicious, post it on the forum and we'll take a look for you.

Regards,
Jose Rodriguez
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Re: No image in watch window

Post by tech_fixer »

Also, if you have a lot of ZMS processes running, but you are not watching anything, then red the entry "Why do I have lots of zms processes running even though I'm not viewing any streams?" from the FAQ section.

Regards,
Jose Rodriguez
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Hi Jose,

Thanks a million for finding me buried deep in the forum here!

I am afraid linux is a bit new for me, however I can already feel the wonderful power and flexibility harnessed in this excellent application Philip has produced. I like very much the modular and scaleable nature of the design with the browser frontend and daemons running in the background and I really look forward to a stable instance of ZoneMinder running for me to enjoy too.

Now I will go carefully step by step (following your recommendations) from a fresh reboot into my Linux Redhat 8.

1) Try accessing your camera with a capture program like "xawtv "

OK, I have accessed XAWTV many times in the past and not had any trouble. I always go back to it for my sanity!

(I have never looked in any log files to check XAWTV is working properly, I have never thought to do this, but if you think this is a good idea then I will do so. Where do I look?).

OK,for now I open XAWTV and launch dmesg, seems ok, nothing nasty looking, now I close XAWTV again, it seems to work OK. Fine pictures from my camera as usual.

Next I run zmc from a user console instance on my Bluecurve desktop (so I am running in Xwindows I guess) like this:-

$ zmc -d /dev/video0&

Next I run zms from the console in debugger gdb:-

$ gdb zms

$ (gdb)run

I found that it is necessary to start zmc before zms for success.


Now I have "--zoneminder frame" updating into my console screen beneath a lot of random characters. The console screen keeps updating regularly but sometimes the text of "--zoneminder frame" is broken and distorted. Example here:- --zo-em-nder fr-me. ( Is this normal and OK?).

I have run the above setup overnight and the console window is still updating the following morning.

This must be good!


Here is my TOP data from this morning following the overnight run setup above:-


7:09am up 11:20, 1 user, load average: 0.38, 0.59, 0.70
88 processes: 84 sleeping, 2 running, 0 zombie, 2 stopped
CPU states: 6.5% user, 1.3% system, 0.0% nice, 92.0% idle
Mem: 513928K av, 362052K used, 151876K free, 0K shrd, 15196K buff
Swap: 257000K av, 0K used, 257000K free 222148K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
7195 pthomas 15 0 36100 31M 30800 S 2.3 6.2 9:09 zmc
1913 pthomas 15 0 13324 13M 7132 R 2.1 2.5 15:52 gnome-terminal
1046 root 5 -10 153M 25M 6504 S < 1.9 5.0 198:06 X
1221 pthomas 15 0 5856 5852 4964 S 0.3 1.1 0:34 magicdev
8116 pthomas 16 0 1108 1108 840 R 0.3 0.2 1:32 top
1 root 15 0 476 476 424 S 0.0 0.0 0:04 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:01 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 15 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 25 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 kupdated
8 root 25 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
58 root 15 0 0 0 0 SW 0.0 0.0 0:00 khubd
253 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
298 root 15 0 0 0 0 SW 0.0 0.0 0:00 knodemgrd




Next small step is maybe it would be good to pipe the streaming data to my Mozilla browser and run this for a few hours to see if it freezes. This way I can check my browser being pushed to from the streaming capture (before I get involved with Apache).

How can I do this task please? I am stuck here.


--------------------------------------------------------------------------



2) Read the entry "Why do I have lots of zms processes running even though I'm not viewing any streams?" from the FAQ section.

I have looked at the website for the update to Apache (http://people.redhat.com/jorton/9-httpd)

Philip says in the forum that he downloaded the single file from that location but now there are several files! Which one do I need?

Mod_ssl-2.040-21.8.136.rpm
httpd-manual-2.0.40-21.8.i386.rpm
httpd-devel-2.0.40-21.8.i386.rpm
httpd-2.0.40-21.8.i386.rpm

When I know which one I need, presumably I install it with just:- rpm -Uvh <the rpm file> and that is finished! (No more leaking if that is one of my problems)

------------------------------------------------------------

Finally for completeness here is a printout from 14 Dec 2003 of zmdc.log from the last time I ran ZoneMinder. I used "zmpkg.pl start" to start ZoneMinder. Maybe it holds some clues? Here it is :-

l5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usrlib/perl5/vendor_perl) at /usr/local/bin/zmfilter.pl line 73.
BEGIN failed--compilation aborted at /usr/local/bin/zmfilter.pl line 73.
'zmfilter.pl -m 1 -e -1' crashed at 03/12/14 15:42:22, exit status 2
Starting pending process, zmfilter.pl -m 1 -e -1
'zmfilter.pl -m 1 -e -1' starting at 03/12/14 15:45:02, pid = 3630
'zmfilter.pl -m 1 -e -1' started at 03/12/14 15:45:02
Can't locate Archive/Zip.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/prl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/pel5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usrlib/perl5/vendor_perl) at /usr/local/bin/zmfilter.pl line 73.
BEGIN failed--compilation aborted at /usr/local/bin/zmfilter.pl line 73.
'zmfilter.pl -m 1 -e -1' crashed at 03/12/14 15:45:02, exit status 2
'zmc -d 0' stopping at 03/12/14 15:45:27
'zmc -d 0' died at 03/12/14 15:45:27
'zmc -d 0' starting at 03/12/14 15:45:27, pid = 3713
'zmc -d 0' started at 03/12/14 15:45:27
Command 'zmfilter.pl -m 1 -e -1' removed from pending list at 03/12/14 15:45:27
Can't find process with command of 'zma -m 1'
'zmwatch.pl ' stopping at 03/12/14 16:02:33
'zmwatch.pl ' died at 03/12/14 16:02:34, signal 14
'zmaudit.pl -d 900 -y' stopping at 03/12/14 16:02:34
'zmc -d 0' died at 03/12/14 16:02:34
'zmc -d 0' starting at 03/12/14 16:02:34, pid = 7181
'zmc -d 0' started at 03/12/14 16:02:34
Can't connect to server: Lost connection to MySQL server during query
'zmc -d 0' crashed at 03/12/14 16:02:34, exit status 221
[pthomas@localhost tmp]$



Can you recommend anymore small steps to try?

I thankyou again for responding to help with a broken ZoneMinder.. ...

Thanks.

Peter.
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Re: No image in watch window

Post by tech_fixer »

Peter:
The dmesg output is much more useful *after* you've run xawtv. It can contain important information about your camera setup.

Now, dont go starting the zmc and zms processes independently. That's just asking for a big headache. Use the zmpkg.pl script with the start and stop commands.

Before attempting to fix a probable memory leak, let's make sure your ZM setup is working well. Maybe that will take care of the rogue processes. From the log you posted I can deduct that you are missing a Perl module. As per your log file:
"Can't locate Archive/Zip.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/prl5/5.8.0"

So, you will need the Archive::Zip module.

You'll need to look for it, download it, compile, test and install it. Sounds a bit much, doesnt it? To make your life easier, try downloading the Webmin (www.webmin.com) Unix administration package. It provides a nice web based GUI to most administrative tasks. Download the latest RPM and install it. Once installed point your browser to http://localhost:10000 and login with the "root" account and password. Then click on the "Other" tab, then click on "Perl Modules", and on the provided form enter Archive::Zip on the "From CPAN named" input box. This will cause your Linux desktop to connect to CPAN (the central repository for all things Perl), and download, compile, test and install the module for you.

After that, try running ZM using the "zmpkg.pl start" command. Then check your log files for any new entries. If you see more lines like the one above, then you'll probably need to install more Perl modules, depending on your Linux distribution.

Now, stop ZM by using the "zmpkg.pl stop" command. Access the ZM console through your browser (make sure Apache and MySQL are running first). Try starting ZM by using the link on the console. Does it start properly? If so, try viewing your camera.

Good luck and let me know how it goes.

Regards,
Jose Rodriguez
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: No image in watch window

Post by zoneminder »

I'm hopeful that the latest version (0.9.16) will finally remove the need to have any Archive modules installed if you don't want to use them however not having them this should only affect the filtering and not any of the more core functions.

I think any clues to what is going wrong here probably lie in /var/log/messages (or equivalent file in /var/log, search for ERR)

Phil,
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Thanks for the help guys,

 I discovered webmin.com has 2 versions of the Unix admin package one of 1.5 Mbyte and the other of 7.5 Mbyte.

My problems so far have been missing modules of code so

I downloaded the full 7.5Mbyte code ….……….gulp!

I live in a sleepy village in England where even narrowband internet is reluctant to visit, too far from a telephone exchange to connect Broadband. So download is so slooow!


 Interestingly I am using 0.9.16 which suggests from Philip's comment that maybe I can switch off the archive Perl stuff and maybe ignore it. Anyway I don't know how to do it.


So game over for tonight……………. Tomorrow I go look for the missing Perl archive file. (With any luck a small module)


Thanks for your help again,

Peter
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: No image in watch window

Post by zoneminder »

A maybe easier (and lower bandwidth) option for missing perl modules is just to run

perl -MCPAN -eshell

on the command line as root as described in the README. So long as you answer most of the questions with defaults and don't install a new Bundle if it asks, you can then type

install Archive::Zip

and it will do all the downloading etc for you. This will probably only be of the order of a couple hundred kilobytes at most depending on how many other modules it has to get first.

However, as I said above, I think the perl modules thing is a red herring in your case. Can you search for any ERR indications in your /var/log/messages file and see if there's anything in there. Dependign on your distro they might actually be in a different file but will usually be in /var/log somewhere.

Cheers,

Phil,
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Thankyou everyone for all the valuable advice given above.


The challenge still remains for me unfortunately as before:- No stable image in watch window!



I undertook the following troubleshoot program when ZoneMinder was up and running yesterday:-

I start Mozilla Browser V1.0.1 (which came with Redhat 8) and point it to the cgi-bin file dished out by Apache for the camera streaming (all part of the ZoneMinder application).

This action immediately starts up two ZMS processes.

Next as usual I discover that the image in the browser window freezes after one or two minutes.

The message shown in the broken image box of Mozilla is:- unable to display image contains too many errors.

If I then refresh the Mozilla browser then TWO more ZMS processes startup and the images start to flow again but the image in the browser window freezes again after some one or two minutes


Each one of these ZMS process uses 6.5% CPU resources.
The Mozilla application I am using to study the streaming images to screen is using 12% CPU resource.
I can kill off all the unwanted ZMS processes if the load builds up too much after a number of refreshes of Mozilla browser but even with just one ZMS process running the freezing still occurs.

Slowing down the image frame rate reveals tearing of the image in the Mozilla browser window and slipping of the image much like the vertical synchronisation failure on a TV set. Different image sizes selected produce different results, but none are stable.
[By the way :- XAWTV seems to be working OK]

I have googled for information on Mozilla v1.0.1 but there is no evidence of any problems with freezing images associated with it. I believe there are a few dump methods in Mozilla console that may help to solve the cause of this behaviour for me. Does anyone know anymore?

I am loathed to just change to Mozilla v1.4 (which I suspect will make no difference) until the mechanism leading to a solution is found.

Var/log/messages contains 26Mbyte of text stretching back over time. (I guess I have to clear it out manually once in a while ?). I have renamed it messages_old and created a new one called messages for all the above testing but have found nothing in it at all sofar! The permissions for the new file are identical to the original file.


I think ZoneMinder is maybe working OK apart from this problem. I have set up zones and triggered events.

Thanks again and a Merry Xmas,

Peter Thomas.
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Hold on a second, what is this……………

http://bugzilla.mozilla.org/show_bug.cgi?id=121084
Bugzilla Bug 121084
cache: Images requested twice -> "The image cannot be displayed, because it contains errors." message [when "Compare the page in cache ..." set to "every time I view the page"] Last modified: 2003-12-07


Is this the reason I am also seeing two instances of ZMS started everytime I refresh my Mozilla browser ?

Peter Thomas
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: No image in watch window

Post by zoneminder »

It's possible. The caching related headers were changed in .16 though I can't remember whether it was in the betas for the final, I'll have to check. I guess it might be that one or more trigger this problem whereas others don't.

Phil,
carrthomas
Posts: 42
Joined: Tue Nov 25, 2003 10:11 pm

Re: No image in watch window

Post by carrthomas »

Hi,

Thanks Phil, didn’t quite follow what you were saying about caching headers?

Anyway My watch window is still locking up after some indeterminate time of use (usually 60 seconds or more).

An independent Mozilla browser behaves in the same way.

Here is my /var/log/messages:-
Jan 2 11:17:29 localhost zmc-d0[12788]: INF [zone1: 12980 - Capturing at 10.00 fps]
Jan 2 11:17:30 localhost zmc-d0[12788]: INF [zone1: 12990 - Capturing at 10.00 fps]
Jan 2 11:17:31 localhost zmc-d0[12788]: INF [zone1: 13000 - Capturing at 10.00 fps]
Jan 2 11:17:32 localhost zms[16305]: INF [Debug Level = 0, Debug Log = ]
Jan 2 11:17:32 localhost zms[16305]: INF [Got 1 monitors]
Jan 2 11:17:32 localhost zms[16305]: INF [monitor purpose=0]
Jan 2 11:17:32 localhost zms[16305]: INF [shm.size=6566528]
Jan 2 11:17:32 localhost zms[16305]: INF [Initialised zone 0/All - 1 - 380x288 - Rgb:ff0000, AT:15, MnAP:50, MxAP:
75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0]
Jan 2 11:17:32 localhost zms[16305]: INF [Monitor zone1 has function 2]
Jan 2 11:17:32 localhost zms[16305]: INF [Monitor zone1 LBF = '%%s - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
Jan 2 11:17:32 localhost zms[16305]: INF [Monitor zone1 IBC = 20, WUC = 15, pEC = 10, PEC = 10, FRI = 10, RBP = 10
]
Jan 2 11:17:32 localhost zms[16305]: INF [Loaded monitor 1(zone1), 0 zones]
Jan 2 11:17:32 localhost zms[16307]: INF [Debug Level = 0, Debug Log = ]
Jan 2 11:17:32 localhost zms[16307]: INF [Got 1 monitors]
Jan 2 11:17:32 localhost zms[16307]: INF [monitor purpose=0]
Jan 2 11:17:32 localhost zms[16307]: INF [shm.size=6566528]
Jan 2 11:17:32 localhost zms[16307]: INF [Initialised zone 0/All - 1 - 380x288 - Rgb:ff0000, AT:15, MnAP:50, MxAP:
75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0]
Jan 2 11:17:32 localhost zms[16307]: INF [Monitor zone1 has function 2]
Jan 2 11:17:32 localhost zms[16307]: INF [Monitor zone1 LBF = '%%s - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
Jan 2 11:17:32 localhost zms[16307]: INF [Monitor zone1 IBC = 20, WUC = 15, pEC = 10, PEC = 10, FRI = 10, RBP = 10
]
Jan 2 11:17:32 localhost zms[16307]: INF [Loaded monitor 1(zone1), 0 zones]
Jan 2 11:17:32 localhost zmc-d0[12788]: INF [zone1: 13010 - Capturing at 10.00 fps]
Jan 2 11:17:33 localhost zmc-d0[12788]: INF [zone1: 13020 - Capturing at 10.00 fps]
Jan 2 11:17:35 localhost zmc-d0[12788]: INF [zone1: 13030 - Capturing at 5.00 fps]
Jan 2 11:17:36 localhost zmc-d0[12788]: INF [zone1: 13040 - Capturing at 10.00 fps]
Jan 2 11:17:37 localhost zmc-d0[12788]: INF [zone1: 13050 - Capturing at 10.00 fps]
Jan 2 11:17:38 localhost zmc-d0[12788]: INF [zone1: 13060 - Capturing at 10.00 fps]
Jan 2 11:17:39 localhost zmc-d0[12788]: INF [zone1: 13070 - Capturing at 10.00 fps]

I don’t understand why capture rate appears to vary between 5 and 10 fps from the above log information.
Also as you can see two zms procsses start as a result of launching mozilla above.

Any ideas of what to do next ?

Thanks.

Peter
Locked