ZM 1.24.3 SVN won't start
ZM 1.24.3 SVN won't start
I am seeing this error again when I stop and them try to start the SVN ZM :
---
Starting ZoneMinder: Can't connect: No such file or directory at /usr/local/share/perl/5.10.1/ZoneMinder/Debug.pm line 349
ZoneMinder::Debug::Fatal('Can\'t connect: No such file or directory') called at /usr/local/bin/zmdc.pl line 168
failure
---
I had this error yesterday but then after retires it finally stared. No luck today.
---
Starting ZoneMinder: Can't connect: No such file or directory at /usr/local/share/perl/5.10.1/ZoneMinder/Debug.pm line 349
ZoneMinder::Debug::Fatal('Can\'t connect: No such file or directory') called at /usr/local/bin/zmdc.pl line 168
failure
---
I had this error yesterday but then after retires it finally stared. No luck today.
Running Ubuntu 11.04 64bit Zoneminder 1.24.3 from SVN, FFmpeg, libjpeg-turbo, Webmin, Cambozola
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: ZM 1.24.3 SVN won't start
Code: Select all
diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in
index f0109c3..30319a5 100644
--- a/scripts/zmdc.pl.in
+++ b/scripts/zmdc.pl.in
@@ -131,6 +131,9 @@ foreach my $arg ( @ARGV )
}
}
+# Create the directory first if it doesn't exist
+mkdir(ZM_PATH_SOCKS);
+
socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or Fatal( "Can't open socket: $!" );
my $saddr = sockaddr_un( SOCK_FILE );
mastertheknife
Kfir Itzhak.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ZM 1.24.3 SVN won't start
What do you have your ZM_PATH_SOCKS set to? If it's the same as TMPDIR in the configure script then it should get automatically created on install.
Phil
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: ZM 1.24.3 SVN won't start
The problem is that many distros delete /tmp/zm at system shutdown.zoneminder wrote:What do you have your ZM_PATH_SOCKS set to? If it's the same as TMPDIR in the configure script then it should get automatically created on install.
mastertheknife
Kfir Itzhak.
Re: ZM 1.24.3 SVN won't start SOLVED
I added a few lines to /etc/init.d/zm to create /tmp/zm folder if it is not already there. The problem was I didn't have correct file owner. So I did a chmod www-data:www-data /tmp/zm and it now runs again.
Here is the inserted lines so that /tmp/zm is created:
---
if [ ! -d /tmp/zm ] ; then
mkdir /tmp/zm
chown www-data:www-data /tmp/zm
fi
----
Now it all works. Sorry about the alarm.
Here is the inserted lines so that /tmp/zm is created:
---
if [ ! -d /tmp/zm ] ; then
mkdir /tmp/zm
chown www-data:www-data /tmp/zm
fi
----
Now it all works. Sorry about the alarm.
Running Ubuntu 11.04 64bit Zoneminder 1.24.3 from SVN, FFmpeg, libjpeg-turbo, Webmin, Cambozola
Re: ZM 1.24.3 SVN won't start, /tmp/zm folder deleted on boo
There is another way to solve this on Ubuntu/Debian. One can set the variable TMPTIME in text file /etc/default/rcS to a value greater than the default of zero. TMPTIME sets how old /tmp files must be before they are deleted. So if TMPTIME=3, no files less than three days old would be deleted and that would spare /tmp/zm folder.
For more info, type command 'man rcS' (note the 'S' is uppercase).
I set my TMPTIME to three, so no files less than 3 days old will be deleted on boot:
---
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.
TMPTIME=3
SULOGIN=no
DELAYLOGIN=no
UTC=no
VERBOSE=no
FSCKFIX=no
root@solitude:/etc/default# ^C
root@solitude:/etc/default#
---
For more info, type command 'man rcS' (note the 'S' is uppercase).
I set my TMPTIME to three, so no files less than 3 days old will be deleted on boot:
---
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.
TMPTIME=3
SULOGIN=no
DELAYLOGIN=no
UTC=no
VERBOSE=no
FSCKFIX=no
root@solitude:/etc/default# ^C
root@solitude:/etc/default#
---
Running Ubuntu 11.04 64bit Zoneminder 1.24.3 from SVN, FFmpeg, libjpeg-turbo, Webmin, Cambozola
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ZM 1.24.3 SVN won't start
The /tmp/zm is just the default value. If you are building from source (which I assume you must be if you are using 1.24.3) just add ZM_TMPDIR=/tmp to just use regular /tmp however the install will try and chown it (and uninstall will try and remove it!) so you might be better off pointing it elsewhere. I will do a mod to make /tmp a special case so it can be safely used.
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ZM 1.24.3 SVN won't start
I have done a fix now to recreate the temporary directory on startup if it's not missing. It should be available shortly in the repository but I may bump the version number to 1.24.4 as there are one or two other fixes in there as well.
Phil
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: ZM 1.24.3 SVN won't start
Make sure to also include this fix please:zoneminder wrote:I have done a fix now to recreate the temporary directory on startup if it's not missing. It should be available shortly in the repository but I may bump the version number to 1.24.4 as there are one or two other fixes in there as well.
http://www.zoneminder.com/forums/viewto ... 116#p69116
Thank you,
mastertheknife
Kfir Itzhak.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ZM 1.24.3 SVN won't start
Ok, will take a look. Do you know if this is an issue with only shared or mapped memory, or both?
Phil
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: ZM 1.24.3 SVN won't start
Hi Phil,zoneminder wrote:Ok, will take a look. Do you know if this is an issue with only shared or mapped memory, or both?
It affects both because $monitor is a new value at every loop iteration, so MMapAddr or the ShmKey values inside $monitor don't exist, and the shared memory is always re-opened, without something to close it\free it later. Never tested how bad this is with shm shared memory, but with mmap shared memory, the open files count just keeps increasing.
Also, I will soon have a big (5000+ lines) performance patch ready for you and the next version of ZM (1.25.0?), stay tuned
mastertheknife
Kfir Itzhak.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ZM 1.24.3 SVN won't start
I can sort of see it with mapped memory, though I'm not sure why the open file handle is not closed by garbage collection but shared memory has no file handle so if it happens with that then I am confused.
I am going to see if I can do a fix that doesn't require the application explicitly invalidate the memory if I can.
I am going to see if I can do a fix that doesn't require the application explicitly invalidate the memory if I can.
Phil