Page 1 of 1

FTP directory (upload to subdirectory) ERROR

PostPosted: Thu Jan 24, 2019 11:08 am
by vkad
So I have a ftp directory as /remoteftp/RECORDINGS but vicidial is not putting recordings in this directory.

# REPORT server connection information
VARREPORT_host => ftp.example.com
VARREPORT_user => ftpuser
VARREPORT_pass => ftppassword
VARREPORT_port => 21
VARREPORT_dir => remoteftp/RECORDINGS
VARHTTP_path => https://example.com/recordings/?file=


|select recording_id,start_time from recording_log where filename='AOLOUT_mjrivera_20190124-101809_2056081221' order by recording_id desc LIMIT 1;|
|548399|2019-01-24|AOLOUT_mjrivera_20190124-101809_2056081221-all.mp3| ||
Net::FTP>>> Net::FTP(2.77)
Net::FTP>>> Exporter(5.68)
Net::FTP>>> Net::Cmd(2.29)
Net::FTP>>> IO::Socket::INET(1.33)
Net::FTP>>> IO::Socket(1.36)
Net::FTP>>> IO::Handle(1.34)
Net::FTP=GLOB(0x202b9c0)<<< 220 ProFTPD 1.3.5b Server ready.
Net::FTP=GLOB(0x202b9c0)>>> USER remoteftp
Net::FTP=GLOB(0x202b9c0)<<< 331 Password required for remoteftp
Net::FTP=GLOB(0x202b9c0)>>> PASS ....
Net::FTP=GLOB(0x202b9c0)<<< 230-Welcome to FBI
Net::FTP=GLOB(0x202b9c0)<<< 230 User remoteftp logged in
Net::FTP=GLOB(0x202b9c0)>>> CWD remoteftp/RECORDINGS
Net::FTP=GLOB(0x202b9c0)<<< 250 CWD command successful
Net::FTP=GLOB(0x202b9c0)>>> MKD 2019-01-24
Net::FTP=GLOB(0x202b9c0)<<< 550 2019-01-24: File exists
Net::FTP=GLOB(0x202b9c0)>>> CWD 2019-01-24
Net::FTP=GLOB(0x202b9c0)<<< 250 CWD command successful
Net::FTP=GLOB(0x202b9c0)>>> TYPE I
Net::FTP=GLOB(0x202b9c0)<<< 200 Type set to I
Net::FTP=GLOB(0x202b9c0)>>> ALLO 126144
Net::FTP=GLOB(0x202b9c0)<<< 202 No storage allocation necessary
Net::FTP=GLOB(0x202b9c0)>>> PASV
Net::FTP=GLOB(0x202b9c0)<<< 227 Entering Passive Mode (181,33,19,12,227,140).
Net::FTP=GLOB(0x202b9c0)>>> STOR AOLOUT_mjrivera_20190124-101809_2056081221-all.mp3
Can't use an undefined value as a symbol reference at /usr/lib/perl5/5.18.2/Net/FTP/dataconn.pm line 54.

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Fri Jan 25, 2019 12:26 pm
by Leckbush
Im not a professional but as far as I understand, there's something wrong this file (/usr/lib/perl5/5.18.2/Net/FTP/dataconn.pm) on LINE 54. Try to check that out using "Nano" and start there

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Fri Jan 25, 2019 12:51 pm
by williamconley
try transferring a file on the command line using the ftp client at the console. if that fails, you have removed Vicidial and its scripts from the issue, and can now work out what's wrong with the ftp client transfer pathway. Perhaps upgrading or downgrading ftp client would be useful. if it works, however, then it's likely the perl module mentioned, which also can likely be upgraded or downgraded.

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Sat Jan 26, 2019 2:01 pm
by vkad
It looks like that ftp works when I change the the subdir from remoteftp/RECORDINGS to just RECORDINGS. Seems like it doesn't like the forward slash in the subdir?

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Sat Jan 26, 2019 4:23 pm
by williamconley
or the folder structure doesn't match what vicidial expects based on the astguiclient.conf settings

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Sat Jan 26, 2019 4:43 pm
by vkad
Net::FTP=GLOB(0x202b9c0)<<< 220 ProFTPD 1.3.5b Server ready.
Net::FTP=GLOB(0x202b9c0)>>> USER remoteftp
Net::FTP=GLOB(0x202b9c0)<<< 331 Password required for remoteftp
Net::FTP=GLOB(0x202b9c0)>>> PASS ....
Net::FTP=GLOB(0x202b9c0)<<< 230-Welcome to FBI
Net::FTP=GLOB(0x202b9c0)<<< 230 User remoteftp logged in
Net::FTP=GLOB(0x202b9c0)>>> CWD remoteftp/RECORDINGS

-----------------This is the stage where the command below 250 confirms that the dir is correct and exists----------


Net::FTP=GLOB(0x202b9c0)<<< 250 CWD command successful
Net::FTP=GLOB(0x202b9c0)>>> MKD 2019-01-24
Net::FTP=GLOB(0x202b9c0)<<< 550 2019-01-24: File exists
Net::FTP=GLOB(0x202b9c0)>>> CWD 2019-01-24
Net::FTP=GLOB(0x202b9c0)<<< 250 CWD command successful

--------------Even the subdir for date creation succeeds---------------------------------

Net::FTP=GLOB(0x202b9c0)>>> TYPE I
Net::FTP=GLOB(0x202b9c0)<<< 200 Type set to I
Net::FTP=GLOB(0x202b9c0)>>> ALLO 126144
Net::FTP=GLOB(0x202b9c0)<<< 202 No storage allocation necessary
Net::FTP=GLOB(0x202b9c0)>>> PASV
Net::FTP=GLOB(0x202b9c0)<<< 227 Entering Passive Mode (181,33,19,12,227,140).
Net::FTP=GLOB(0x202b9c0)>>> STOR AOLOUT_mjrivera_20190124-101809_2056081221-all.mp3


-----------------------Only the failure happens when the file upload is being done.------------------------------------------
Upon investigation it seems that a file with size zero is being created but the file is actually never uploaded.

Re: FTP directory (upload to subdirectory) ERROR

PostPosted: Sat Jan 26, 2019 8:08 pm
by williamconley
no time right now, but we've seen several issues at this stage that required either going to passive mode or NOT going to passive mode to complete the upload, plus some firewall issues (test by downing the firewall entirely, just for the test, to eliminate that possibility).

Also see if the ftp client has a more robust debugging mode. And verify that manual ftp is using the same mode as the Vicidial automation version. We've altered a few client scripts to use the "other mode" (ie: if vici uses passive, we turn it off, if Vicidial does not use passive, we turn it on).