zm is stopped and won't restart (no zmc processes up)

Forum for questions and support relating to the 1.24.x releases only.
Locked
skier
Posts: 29
Joined: Thu Dec 10, 2009 11:54 am

zm is stopped and won't restart (no zmc processes up)

Post by skier »

I have a zoneminder 1.24.2 setup that had been working fine for months
without intervention. Now all of a sudden all the sources are red and
the console is "Stopped". No images, needless to say.

Restarting zoneminder from the web interface does not work (still says
"stopped"). From the console, "ps axf | grep zmc" shows no zmc capture
processes. "shutdown -r" allows the system to come back up but does
not fix the problem: all sources are still red.

From the web interface / Options / Paths / PATH_LOGS , the place where
the logs are is /tmp , but in /tmp there are no zmc logs at all. The
only file in there is zmpkg.log.

What can I do to re-enable the sources?
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Re: zm is stopped and won't restart (no zmc processes up)

Post by TechGuy »

skier wrote:I have a zoneminder 1.24.2 setup that had been working fine for months
without intervention. Now all of a sudden all the sources are red and
the console is "Stopped". No images, needless to say.

Restarting zoneminder from the web interface does not work (still says
"stopped"). From the console, "ps axf | grep zmc" shows no zmc capture
processes. "shutdown -r" allows the system to come back up but does
not fix the problem: all sources are still red.

From the web interface / Options / Paths / PATH_LOGS , the place where
the logs are is /tmp , but in /tmp there are no zmc logs at all. The
only file in there is zmpkg.log.

What can I do to re-enable the sources?
Is MySQL Running? Did you Change the MySQL Password?
skier
Posts: 29
Joined: Thu Dec 10, 2009 11:54 am

Post by skier »

Er, yes, mysql is running. No, I didn't change the password.

Meanwhile, I think I'm coming up with some sort of a clue: I suspect it was an automatic update that broke some of the shared libraries.

zmc: error while loading shared libraries: libavutil.so.50: cannot open shared object file: No such file or directory

I vaguely remember going through some other libavutil pains when recompiling ffmpeg from source a few months ago. There was also something to do with symlinks somewhere. Now, if only I could remember what I did...

Anyway, it will take some more probing to confirm this (and even more to fix it) but I *suspect* that I had a newer version of the shared libraries, coming from svn, and that some automatic upgrade from the distro has left me with an older one that no longer works.

It's a nuisance: I'd rather lock down the configuration that works and allow no changes at all, but on the other hand this is a public-facing machine on the web so I'm pretty much obliged to get the automatic updates as soon as they're out.
skier
Posts: 29
Joined: Thu Dec 10, 2009 11:54 am

SOLVED

Post by skier »

OK, so my guess above was right, and I've now fixed it. What a pain. Let me write it all down here so that it may help someone else too (and me, next time it happens).


First thing I did, I fetched the latest ffmpg from svn and recompiled it and installed it (totally useless in retrospect). Anyway, instructions for that were at
http://ubuntuforums.org/showpost.php?p= ... tcount=967

It now says it uses libavutil version 50:

FFmpeg version SVN-r22991, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 30 2010 17:04:56 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxvid --enable-x11grab
libavutil 50.15. 0 / 50.15. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.61. 0 / 52.61. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

...however zmc still complains as before:

zmc: error while loading shared libraries: libavutil.so.50: cannot open shared object file: No such file or directory


Reason, I think, is that the above didn't build a *shared library* for libavutil 50.

OK, but do I have it? Yes, it turns out I had it already in the source tree of
the ffmpeg that I compiled a few months ago. Discovered that with

locate libavutil.so.50


So what I did (probably horribly wrong, but worked) was

sudo cp /usr/src/ffmpeg-old/libavutil/libavutil.so.50 /usr/local/lib
sudo ln -s /usr/local/lib/libavutil.so.50 /usr/lib/libavutil.so.50

and now zmc no longer complains about a missing libavutil.so.50.

So I connected to the web interface, restarted zoneminder (from the
link that said "stopped") and hey presto, now all 8 cameras are back
to green and I get a picture from them.
Locked