|
在controller中跑总是报
Action.c(23): Error -86003:Failed to establish FTP session.
请问是怎么回事呢,该怎么排查?
脚本如下:
Action()
{
char *filename;
// FTP ftp1;
int i=0;
char *md5_origin = lr_eval_string("{md5_o}");
char md5[33] = {0};
//lr_rendezvous("ftp");
lr_start_transaction("ftp_download");
i=ftp_logon("FTP",
"URL=ftp://iptv:iptv@10.42.119.85",
LAST);
if (i == LR_FAIL) {
lr_error_message("logon failed");
lr_exit(LR_EXIT_ITERATION_AND_CONTINUE , LR_FAIL);
}
i=ftp_get("Get_Files",
"SOURCE_PATH={remotefile}",
"TARGET_PATH=E:/{NewParam}",
"PASSIVE=TRUE",
"MODE=BIN",
ENDITEM ,
LAST);
if (i == LR_FAIL) {
lr_error_message("get file failed");
ftp_logout();
lr_exit(LR_EXIT_ITERATION_AND_CONTINUE , LR_FAIL);
}
lr_end_transaction("ftp_download", LR_AUTO);
filename = lr_eval_string("E:/{NewParam}");
lr_start_transaction("md5_validate");
MDFile(filename, md5);
if (strcmp(md5,md5_origin)==0) {
lr_end_transaction("md5_validate", LR_PASS);
}
else
{
lr_error_message("differ : file = %s, md5 = %s, md5_origin = %s", filename, md5, md5_origin);
lr_end_transaction("md5_validate", LR_FAIL);
}
ftp_logout();
return 0;
} |
|