2013-12-13 75 views
1

我試圖連接FTPES服務器(IBM MVS OS/390),與ftp4j努力當我使用他們的示例代碼,當我得到PASS未能例外使用ftp4j使用FTPES到IBM MVS操作系統連接/ 390服務器

it.sauronsoftware.ftp4j.FTPException [code=530, message= PASS command failed] 

我使用Python以及使用FTPLIB以及M2Crypto ftpslib,所有這些返回相同的錯誤嘗試「530 PASS命令失敗」

任何線索?

def connect(self): 
    try: 
     ctx = SSL.Context('sslv23') 
     self.ftps = ftpslib.FTP_TLS(ssl_ctx=ctx) 
     self.ftps.connect(self.host,self.port) 
     self.ftps.auth_tls() 
     self.ftps.set_pasv(1) 
     self.ftps.sendcmd('USER %s' % self.username) # '331 Please specify the password.' 
     self.ftps.sendcmd('PASS %s' % self.password) 

     #self.ftps.login(self.username, self.password) 
     self.ftps.prot_p() 
     print('logged in sucessfuly') 
     self.ftps.cwd('XXXX') 
    except Exception,e: 
     self.ftps = None 
     self.logger.warning("Exception raised while connecting FTPS server, %s" % ("*** Caught exception: %s: %s" % (e.__class__, e))) 

回答

0

所有端口FTPES使用Java,Python以及除了迷人的工作,我錯過了錯誤的用戶名,而複製和粘貼從源頭到屬性文件。當我嘗試使用filezilla連接到主機時,發現了這個問題,身份驗證細節引發了我的失敗,在此期間,我驗證了我的憑據,並在屬性文件中提供了錯誤信息。