Page 1 of 1
zmfilter.pl cowardly refusing to create empty archive
Posted: Mon Mar 31, 2008 12:39 am
by donnied
I just upgraded to 1.23.2-2 on Debian Testing. I previously had Zoneminder running and recently I decided to let Debian upgrade ZM. I had two black screens and couldn't get them working; so I thought something got fundamentally hosed when I upgraded so I decided to start over from scratch.
I got two black screens. I"m not sure what's going on but I have to
Code: Select all
chmod 666 /dev/video0
chmod 666 /dev/video3
every time I reboot the machine.
Also zmfilter can't upload images. I can make images and download them fine using the video option but alll zmfilter.log tells me is
"cowardly refusing to create empty archive! at /usr/bin/zmfilter.pl line 749"
Posted: Mon Mar 31, 2008 11:41 am
by donnied
If I do a search I notice no .tar.gz have been created by zoneminder. I did a quick strace and it seemed as if it was looking in cameraname/usr/share/zoneminder/events. Where is it looking?
Posted: Tue Apr 01, 2008 11:09 am
by donnied
The mpg's are being made in /var/cache/zoneminder/events/ . Where is the upload sequence looking?
Posted: Sun Apr 06, 2008 7:51 pm
by donnied
I just installed from source. I'm getting the same error from the filter for uploading files "cowardly refusing to create empty archive."
Is the ftp upload working for anyone?
Posted: Mon Apr 07, 2008 6:49 am
by hackintosh
donnied wrote:I just installed from source. I'm getting the same error from the filter for uploading files "cowardly refusing to create empty archive."
Is the ftp upload working for anyone?
same problem here.
i suspect the script wrongly call the location which is the jpg/mpeg file stored at .
what u guy think ??
Posted: Tue Apr 08, 2008 11:27 am
by donnied
It's definitely not calling a file.
Code: Select all
~$ tar -cvf bob.tar.gz
tar: Cowardly refusing to create an empty archive
Try `tar --help' or `tar --usage' for more information.
tar -cvf bob.tar.gz bob
bob/
$tar -cvf bob.tar.gz bob.nofile
tar: bob.nofile: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
The error I get is from line 749:
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <*$arch_image_path> ) )
I've been told that the relative path * in front isn't good, but I don't think that's the problem. If it were wouldn't it be specifying and invalid path and not no path? (And I tried without and it didn't change things.)
In 1.22 we see:
Code: Select all
elsif ( ZM_UPLOAD_ARCH_FORMAT eq "tar" )
{
if ( ZM_UPLOAD_ARCH_COMPRESS )
{
$arch_file .= '.tar.gz';
}
else
{
$arch_file .= '.tar';
}
Info( "Creating upload file '$arch_file'\n" );
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <*$arch_image_path> ) )
{
Error( "Tar error: ".Archive::Tar->error()."\n " );
}
in 1.23 we see:
Code: Select all
( ZM_UPLOAD_ARCH_FORMAT eq "tar" )
{
if ( ZM_UPLOAD_ARCH_COMPRESS )
{
$arch_file .= '.tar.gz';
}
else
{
$arch_file .= '.tar';
}
Info( "Creating upload file '$arch_file'\n" );
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <*$arch_image_path> ) )
{
Error( "Tar error: ".Archive::Tar->error()."\n " );
Posted: Wed Apr 09, 2008 7:01 am
by hackintosh
donnied wrote:It's definitely not calling a file.
Code: Select all
~$ tar -cvf bob.tar.gz
tar: Cowardly refusing to create an empty archive
Try `tar --help' or `tar --usage' for more information.
tar -cvf bob.tar.gz bob
bob/
$tar -cvf bob.tar.gz bob.nofile
tar: bob.nofile: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
The error I get is from line 749:
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <arch_image_path> ) )
I've been told that the relative path * in front isn't good, but I don't think that's the problem. If it were wouldn't it be specifying and invalid path and not no path? (And I tried without and it didn't change things.)
In 1.22 we see:
Code: Select all
elsif ( ZM_UPLOAD_ARCH_FORMAT eq "tar" )
{
if ( ZM_UPLOAD_ARCH_COMPRESS )
{
$arch_file .= '.tar.gz';
}
else
{
$arch_file .= '.tar';
}
Info( "Creating upload file '$arch_file'\n" );
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <arch_image_path> ) )
{
Error( "Tar error: ".Archive::Tar->error()."\n " );
}
in 1.23 we see:
Code: Select all
( ZM_UPLOAD_ARCH_FORMAT eq "tar" )
{
if ( ZM_UPLOAD_ARCH_COMPRESS )
{
$arch_file .= '.tar.gz';
}
else
{
$arch_file .= '.tar';
}
Info( "Creating upload file '$arch_file'\n" );
if ( $arch_error = !Archive::Tar->create_archive( $arch_file, ZM_UPLOAD_ARCH_COMPRESS, <arch_image_path> ) )
{
Error( "Tar error: ".Archive::Tar->error()."\n " );
have u tried both version?? both also not working ?
in both version u showed me, what i found is 1.22 have elseif
i believe the zmfilter.pl will call the path which specified in zm.conf
in zmfilter.pl , this is a line i found
Code: Select all
use constant EVENT_PATH => ZM_PATH_WEB.'/'.ZM_DIR_EVENTS;
ZM_PATH_WEB is available in zm.conf which is the location of the web sciprting where to store.
ZM_DIR_EVENTS is not available in zm.conf, so i believe it cant get the right path cause it is not specify in zm.conf
i had tried to add it but remain same.
i'm not programmer, i cant understand the coding well
Posted: Wed Apr 09, 2008 7:07 pm
by cordel
ZM_DIR_EVENTS is stored in the database and accessable through the console options under the paths tab.
zoneminder uploading empty files - temporary fix
Posted: Wed Apr 09, 2008 7:39 pm
by treecko
zmfilter.pl has a bug, this version I found to be working:
http://www.socomms.com/contrib/scripts/ ... riginal.pl
file contents replaced with the code from above link and zoneminder now sends correct files to your ftp site
I have tested it with zip option, I guess it should work with tar as well.
This is on openSuSe 10.3, I used one click install, and as seen from posts on this forum the bug is also present in Debian, so anyone who has same problem with uploading empty files try the "zmfilter-original.pl" .
also, I have edited zm.conf to include this line:
---------------------------------------------------------
# Zoneminder events directory
ZM_DIR_EVENTS=/srv/www/htdocs/zm/events
----------------------------------------------------------
but sometimes I do still see uploaded empty zip files 22 bytes in size, next to correctly formed tar files, as above zmfilter is from earlier version so this is only a temporary fix...
Posted: Thu Apr 10, 2008 12:02 am
by donnied
Copying the old zmfilter.pl to replace the newer version worked for me.
Posted: Thu Apr 10, 2008 6:15 am
by hackintosh
donnied wrote:Copying the old zmfilter.pl to replace the newer version worked for me.
donnied,
please give me a copy of old config.
Thanks 1st..
Posted: Thu Apr 10, 2008 11:11 pm
by donnied
Sorry, I just used the one from the link posted here.
Re: zmfilter.pl cowardly refusing to create empty archive
Posted: Sat Apr 12, 2008 11:41 pm
by PeterHoward
Sorry for the delay in joining in on this; I've been a bit busy on other stuff.
donnied wrote:I just upgraded to 1.23.2-2 on Debian Testing. I previously had Zoneminder running and recently I decided to let Debian upgrade ZM. I had two black screens and couldn't get them working; so I thought something got fundamentally hosed when I upgraded so I decided to start over from scratch.
I got two black screens. I"m not sure what's going on but I have to
Code: Select all
chmod 666 /dev/video0
chmod 666 /dev/video3
every time I reboot the machine.
Unfortunately that's a "feature" of the package at the moment. I need to work out a way of updating the values from inside the packaged code that doesn't violate debian packaging guidelines
Also zmfilter can't upload images. I can make images and download them fine using the video option but alll zmfilter.log tells me is
"cowardly refusing to create empty archive! at /usr/bin/zmfilter.pl line 749"
You seem to have solved this one, but I'd like to try to work out what was happening. When you talk about "downloading" them, are you talking about the "export" option?
Also you say you previously had Zoneminder running - was that a manual install? Or a previous version of the package?
Tanks,
PJH
Posted: Fri Apr 18, 2008 12:03 pm
by donnied
I have run both previously -- a manual install and from the .deb package. The newest installs were on newly installed Debian machines.
I meant I could export the video as files and download them and they were playable. The problem was in the zmfilter file. Using the older version listed in the thread helps things work fine.
Sorry for the delay.
What exactly is the problem with permissions for /dev/video and the Debian package? Previously, I changed the permissions once and it continued to work; on the recent install I had to change every time I rebooted.
Thank you.
Posted: Sun Apr 20, 2008 1:18 am
by PeterHoward
donnied wrote:
What exactly is the problem with permissions for /dev/video and the Debian package? Previously, I changed the permissions once and it continued to work; on the recent install I had to change every time I rebooted.
What you're seeing now is what most people have been seeing along the way. The problem is that /dev/video* gets the wrong default permissions on boot. zmfix.pl changes them, but that requires root permission. Lee's fix of "chmod u+s" is, to my understanding, not allowed by the Debian Packaging Guidelines. And I keep not getting around to working out another way.
I'd love to know why you've only started having the problem recently as I didn't change anything related to that since 1.22.3-9 or so.
PJH