zmfilter.pl crashes on upload attempts to SFTP

Forum for questions and support relating to the 1.28.x releases only.
Locked
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

zmfilter.pl crashes on upload attempts to SFTP

Post by McFuzz »

Hi all,

All of the sudden, zmfilter.pl fails right when it tried to upload a video to my SFTP box in my 1.28.0 install:

Code: Select all

Jan 22 21:03:50 lulzsec zmfilter[3467]: INF [Creating upload file '/tmp/zm/PorchCam-1765.zip', 455 files]
Jan 22 21:03:52 lulzsec zmfilter[3467]: INF [Uploading to xxxxxx using SFTP]
Jan 22 21:03:53 lulzsec zmdc[3284]: ERR ['zmfilter.pl ' exited abnormally, exit status 9]
Subsequently it attempts to re-upload the same video over and over and over again until it just stops and does not attempt any further. It also does not send me a notification that an event occurred via email. Last night I also did a full perl module update (for an unrelated reason) and I have a feeling that it is somehow related to the failures since I believe it started occurring afterwards, but not entirely certain why or how...

I've tried recompiling zoneminder from source (as I always do when a new release comes out - got it from the master branch from the git repo) - however, no luck there; still get the same message.

A quick google search yielded the following link: https://github.com/ZoneMinder/ZoneMinder/issues/516 - however, the package in question (libmime-tools-perl) is already installed and is at the latest version on my end.

So my next test was to swap to FTP instead of SFTP; that, apparently, got the uploads going but still with an odd message, some events failing to upload but I am getting email notifications:

Code: Select all

Jan 22 21:26:13 lulzsec zmfilter[19828]: INF [Uploading to xxxxxxx.com using FTP]
Jan 22 21:26:18 lulzsec zmfilter[19828]: INF [Creating upload file '/tmp/zm/GarageCam-1767.zip', 429 files]
[b]Jan 22 21:26:20 lulzsec web_php[19885]: ERR [Uncaught SyntaxError: Unexpected token <<][/b]
Jan 22 21:26:21 lulzsec zmfilter[19828]: INF [Uploading to xxxxxxx.com using FTP]
Jan 22 21:26:26 lulzsec zmfilter[19828]: INF [Creating upload file '/tmp/zm/GarageCam-1769.zip', 317 files]
Jan 22 21:26:27 lulzsec zmfilter[19828]: INF [Uploading to xxxxxxx.com using FTP]
[b]Jan 22 21:26:31 lulzsec web_php[2282]: ERR [Uncaught SyntaxError: Unexpected token <<][/b]
Any ideas of what may be happening here?

Thanks in advance!
Last edited by McFuzz on Fri Jan 23, 2015 6:15 am, edited 1 time in total.
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by McFuzz »

Update:

So I had a hunch and attempted to SFTP into my box via cli but within the debian VM that hosts zoneminder. As I suspected, it freaked out over a change in host key. I then did the proper modification in the known_hosts file and restarted zoneminder. However, it still failed to upload events ALTHOUGH it did send an email notification.

For now, I've reverted back to standard FTP...


Any suggestions?
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by McFuzz »

Anyone...?
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by McFuzz »

Still have the problem and not any closer to a resolution... Can anyone assist...?
bbunge
Posts: 2967
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by bbunge »

Well, I've never used the upload option but wanted you to know that your post has been read. Not knowing how robust your upload speed is and how large the archive is... have you tried increasing the upload timeout? You might also increase your PHP memory limits and check memory usage in MySQL. I had some issues exporting log files and increasing the PHP memory usage fixed that. The value is: Maximum memory allocation and I set mine to 1024M.

Good luck!

bb
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by knight-of-ni »

This is one feature I have never used, either.

However, standard zoneminder troubleshooting steps apply:
- Turn on debug. And look for additional information in your log files
- Execute the same zmfilter command zoneminder is using from the command line to see if it yields new information
- What do the log files say on the FTP server? Is the zoneminder ftp client successfully connecting?
- How big are those zip files and how much memory do you have on your system? The /tmp folder on modern distros is no longer a real folder on your local disk. Instead, it is a tmpfs, which sits in RAM. And your tmpfs will by default limit itself to 50% of your physical ram.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: zmfilter.pl crashes on upload attempts to SFTP

Post by McFuzz »

Thanks for the replies; I'll try to do some additional debugging and report.

Thanks :)
Locked