Can someone help me figure out why I get a ton of the messages when trying to upload to ubuntu-server on local lan. I can log this user in sftp server no problem from a terminal on the very client zoneminder is running on.
I'm using ubuntu-server 16.04 LTS and the same with the client. Ubuntu 16.04 LTS desktop.
Every thing is working except the upload. I have 10 monitors running at 1280x720@30fps no problem. I can stream, view, and wrap up the .tar files. The logs shows it creating files to be uploaded. Uploading... Then Bam! This error message. Lots of them.
I have tried many combinations for the remote directory. Currently I have /zm-events entered. I have a user "zm" in jail under /home with root owning both directories but the directory "zm-events under /home/zm/zm-events is owned by "zm" and that user is in the sftp group.
Any time spent help me with this will greatly be appreciated.
Thank you
James
Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
Re: Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
I'm having the same issue. What happens if you run this from the terminal as root : `zmfilter -f $FILTER_NAME` replacing $FILTER_NAME with whatever you set in the filter web ui setup?
Do you see something like this :
If so it may be the same issue I have. It looks like an issue with their push function syntax on lines 555 & 557 in /usr/bin/zmfilter.pl . Haven't gotten around to filing a bug report for it, but lines 555-558 should probably read something like :
Do you see something like this :
Code: Select all
ssh: Could not resolve hostname array(0x38a7c80): Name or service not known
Code: Select all
push(@more_ssh_args, '-o StrictHostKeyChecking=no')
if ! $Config{ZM_UPLOAD_STRICT};
push(@more_ssh_args, '-v')
if $Config{ZM_UPLOAD_DEBUG};
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
but, but, but ....what if my hostname really is "array(0x38a7c80)"? Kidding of course.
I guess this is a case of different perls behaving differently, as the current syntax tested fine on my CentOS 7 machine.
I think the issue is actually with line 559. Since more_ssh_args is already a list.
Change line 559 from:
to:
Since more_ssh_args is already a list, my hypothesis is adding the brackets causes Perl to insert the list into a second list on your system.
Since this works fine on my machine as is, I'd appreciate it if both of you could test this and get back to me.
I guess this is a case of different perls behaving differently, as the current syntax tested fine on my CentOS 7 machine.
I think the issue is actually with line 559. Since more_ssh_args is already a list.
Change line 559 from:
Code: Select all
$sftpOptions{more} = [@more_ssh_args];
Code: Select all
$sftpOptions{more} = @more_ssh_args;
Since this works fine on my machine as is, I'd appreciate it if both of you could test this and get back to me.
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/
All of these can be found at https://zoneminder.blogspot.com/
Re: Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
lol. I'm on CentOS7 as well - fresh build less than a week old, perl v 5.16.3 . I changed line 559 as you requested :knnniggett wrote:but, but, but ....what if my hostname really is "array(0x38a7c80)"? Kidding of course.
I guess this is a case of different perls behaving differently, as the current syntax tested fine on my CentOS 7 machine.
I think the issue is actually with line 559. Since more_ssh_args is already a list.
Change line 559 from:to:Code: Select all
$sftpOptions{more} = [@more_ssh_args];
Since more_ssh_args is already a list, my hypothesis is adding the brackets causes Perl to insert the list into a second list on your system.Code: Select all
$sftpOptions{more} = @more_ssh_args;
Since this works fine on my machine as is, I'd appreciate it if both of you could test this and get back to me.
Code: Select all
push @more_ssh_args, ['-o'=>'StrictHostKeyChecking=no']
if ! $Config{ZM_UPLOAD_STRICT};
push @more_ssh_args, ['-v']
if $Config{ZM_UPLOAD_DEBUG};
$sftpOptions{more} = @more_ssh_args;
Code: Select all
Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
Code: Select all
[root@phoenix ~]# zmfilter.pl -f uploadToIO
ssh: connect to host 2 port 16969: Invalid argument
Code: Select all
$VAR1 = [
[
'-o',
'StrictHostKeyChecking=no'
],
[
'-v'
]
];
Code: Select all
$VAR1 = {
'password' => 'mypass',
'timeout' => '600',
'user' => 'myuser',
'more' => 2,
'port' => '16969',
'host' => 'myhost'
};
I was never a fan of perl TBH, haven't used it in years, so I might be missing the obvious issue. It seemed to me you guys were creating this multidimensional array of @more_ssh_args and I wasn't sure why that was needed, so reassigning it as a single array was my fix.
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Can't create SFTP connection: SSH slave exited unexpectedly with error code 255
A Pull Request to fix this issue has been generated:
https://github.com/ZoneMinder/ZoneMinder/pull/1677
It awaits peer review and verification that the issue has been resolved on systems other than my own.
https://github.com/ZoneMinder/ZoneMinder/pull/1677
It awaits peer review and verification that the issue has been resolved on systems other than my own.
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/
All of these can be found at https://zoneminder.blogspot.com/