• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 30620
  • Open Date : 2019/09/02 11:57
  • Print
NEW

[DataSpider Servista] I am using the FTP adapter, but a communication with an FTP server fails and an error occurs

I am using the FTP adapter, but a communication with an FTP server has failed and an error has occurred. To check the cause, is there any way to output the communication status of the FTP adapter?
 
Category : 

Answer

By adding the following settings to the property file, you can output the status of the communication with an FTP server to a log. Check the communication status with the FTP server from the output log.
 
Enabling the Investigation log
  • Property file
 ${dataspider.home}/server/conf/system.properties
  • Key to add
edtftp.log.log4j=true
 
Output settings of the Investigation log
  • Property file
 ${dataspider.home}/server/conf/dslog.properties
 
The settings for the output file (location, capacity, name, etc.) are the same, but a key to specify differs depending on whether you are connecting via FTP or SFTP. Please refer to the following for details:
 
# Settings of output file
 
log4j.appender.edtftp=org.apache.log4j.RollingFileAppender
log4j.appender.edtftp.File=${dslog.dir}/edtftp.log
log4j.appender.edtftp.MaxFileSize=2048KB
log4j.appender.edtftp.MaxBackupIndex=10
log4j.appender.edtftp.layout=org.apache.log4j.PatternLayout
log4j.appender.edtftp.layout.ConversionPattern=%-14d{MM/dd HH:mm:ss}|%p|%c|%m%n
  1. Key to add when connecting to an FTP server
# Category to get (FTP)
 
log4j.category.FTPClient=DEBUG, edtftp
log4j.additivity.FTPClient=false
log4j.category.FTPControlSocket=DEBUG, edtftp
log4j.additivity.FTPControlSocket=false
log4j.category.SocketUtils=DEBUG, edtftp
log4j.additivity.SocketUtils=false
log4j.category.ProFTPClient=DEBUG, edtftp
log4j.additivity.ProFTPClient=false
log4j.category.LicensePropertiesBase=DEBUG, edtftp
log4j.additivity.LicensePropertiesBase=false
log4j.category.com.enterprisedt=DEBUG, edtftp
log4j.additivity.com.enterprisedt=false
 
  1. Key to add when connecting to a SFTP server
# Category to get (SFTP)
 
log4j.category.com.enterprisedt=DEBUG, edtftp
log4j.additivity.com.enterprisedt=false
log4j.category.SubsystemChannel=DEBUG, edtftp
log4j.additivity.SubsystemChannel=false
log4j.category.AsyncService=DEBUG, edtftp
log4j.additivity.AsyncService=false
log4j.category.Channel=DEBUG, edtftp
log4j.additivity.Channel=false
log4j.category.IOChannel=DEBUG, edtftp
log4j.additivity.IOChannel=false
log4j.category.SocketChannel=DEBUG, edtftp
log4j.additivity.SocketChannel=false
log4j.category.SftpClient=DEBUG, edtftp
log4j.additivity.SftpClient=false
 
Note
  • It is necessary to restart the DataSpider Servista service to reflect the settings.
  • The file is output to a directory that is specified in "log4j.appender.edtftp.File" above. Please replace "$ {dslog.dir}" with any directory.
  • The output file size can be specified with "log4j.appender.edtftp.MaxFileSize", and the number of files could be specified with "log4j.appender.edtftp.MaxBackupIndex". Please set according to the capacity of disks.
 
Reference information
 
Related FAQ
 
Log output example (abstract)
For example, when connecting to an FTP server, the following log is output.
 
------------------
01/12 14:36:50|DEBUG|FTPClient|Class: com.enterprisedt.net.ftp.pro.ProFTPClient
01/12 14:36:50|DEBUG|ProFTPClient|Connecting to /192.168.xxx.xxx:21
01/12 14:36:50|DEBUG|SocketUtils|Invoking connect with timeout=300000
01/12 14:36:50|DEBUG|SocketUtils|Connected successfully
01/12 14:36:50|DEBUG|FTPControlSocket|220 AIX53 FTP server (Version 4.2 Fri Aug 5 20:09:00 CDT 2011) ready.
01/12 14:36:50|DEBUG|FTPControlSocket|---> USER ftptest
01/12 14:36:50|DEBUG|FTPControlSocket|331 Password required for ftptest.
01/12 14:36:50|DEBUG|FTPControlSocket|---> PASS ********
01/12 14:36:50|DEBUG|FTPControlSocket|230-Last unsuccessful login: Mon Nov 9 20:43:15 JST 2015 on ftp from ::ffff:192.168.xxx.xxx
01/12 14:36:50|DEBUG|FTPControlSocket|230-Last login: Tue Jan 12 14:37:13 JST 2016 on ftp from ::ffff:192.168.xxx.xxx
01/12 14:36:50|DEBUG|FTPControlSocket|230 User ftptest logged in.
------------------