39

技术问题分析(9.28)

 5 years ago
source link: http://blog.sina.com.cn/s/blog_493a84550102xvx0.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

最近MFT文件传输配置和监控中,发现出现了MFT文件传输失败异常,具体涉及到两种异常类型,对于原来的文件传输失败异常,大部分原因都是由于源端或目标端本身网络不通,或者用FTP用户名和密码配置错误导致的传输异常,因此在遇到MFT传输失败后,一般会先进行如下检查。

即先登录到MFT服务器上,手工通过SFTP命令Get源端的文件下来,同时手工通过Put命令将文件上传到目标端服务器上面。如果这个验证能够通过的话,再来排查其它的原因。

对于MFT传输异常,最近监控发现了两种场景的错误:

MFTException MFT-5031_Error occurred while reading metadata of file

cause=oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: file://wsdl/FileListing_ptt.wsdl [ FileListing_ptt::FileListing(part,part) ] - WSIF JCA Execute of operation 'FileListing' failed due to: JCA Binding Component connection issue.

Error in establishing a session with SSH Server.. Unable to establish a session with the server. Please ensure hostname and port specified to login to the server are correct. ; nested exception is: BINDING.JCA-12511 JCA Binding Component connection issue. JCA Binding Component is unable to create an outbound JCA (CCI) connection. file://wsdl/FileListing_ptt.wsdl [ FileListing_ptt::FileListing(part,part) ]

Please ensure hostname and port specified to login to the server are correct. Please make sure that the JCA connection factory and any dependent connection factories have been configured with a sufficient limit for max connections. Please also make sure that the physical connection to the backend EIS is available and the backend itself is accepting connections. ]

第二个类型的异常错误如下:

MFTException MFT-5004_Error occurred while delivering message to endpointcause=oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: file://wsdl/Put_ptt.wsdl [ Put_ptt::Put(part,part) ]WSIF JCA Execute of operation 'Put' failed due to: Error sending file to FTP Server. Error sending file to FTP Server.

Unable to send file to server. ; nested exception is: BINDING.JCA-11429 Error sending file to FTP Server. Error sending file to FTP Server. Unable to send file to server. Please ensure

1. Specified remote output Dir has write permission

2. Output filename has not exceeded the max characters allowed by the OS and

3. Remote File System has enough space.

这两个错误可以看到实际上都是本身MFT传输的时候,通过FTP Adapter适配到目标文件目录进行文件写入,或者进行元数据读取的时候出现错误。这个也给我们一个关键提示,实际上你在查MFT文件传输的异常或错误的时候,完全可以去查OSB JCA FTP Adapter相关的异常和错误。

比如上面说的原因里面谈到有如下几个方面。

比如第一个异常里面的谈到的要确认实际的IP,端口和用户名和密码是否正确,是否能够正常连接到SFTP,而这个我们很容易进行验证。在这个验证通过后,提到了要检查JCA connection连接数是否超过了现在,而这个默认变量为100,一直没有做过该参数的调整。

基于异常提示,可以找到的解决方案是调整该参数值,但是在MFT Admin Server的JDBC连接池里面只能找到一个MFT相关的连接池。这个默认值按道理应该是够用,是否真正是由于该值影响不确定。

具体调整最大连接数的设置点在:

1. Go to services -> JDBC -> Data sources.

2. Select the data source associated with the FTP Service.

3. Go to Connection Pool Tab.

4. Under the Maximum Capacity option, increase the size set by default. Increase it by a factor of 25%.

5. Click on save.

6. If the issue is not resolved, keep increasing in increments of 10% until the captured error is no longer generated.

而实际上为了验证是否是由于超过了最大连接数,我们可以先关闭集群里面的多余节点,或暂停一些已经部署的MFT服务,如果没有再出现类似异常,则很可能和连接数有关系。但是如果做了上述操作仍然报错,那么说明实际上和MFT连接数没有必然关系。

对于MFT 5031错误,在Oracle Support网站还可以搜索到一篇文章,具体参考:

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=522896060352714&id=2139131.1&_afrWindowMode=0&_adf.ctrl-state=lavu40vxo_176

在这篇文章里面提到是远程FTP Server的信任证书需要导入, Remote FTP server trusted certificate needs to be imported。具体给出的配置和证书导入解决方案如下,暂时未进行验证。

Configuring remote SSL FTP server

Follow the steps below to connect from a Remote FTP(S) Source or Target to a remote FTP Server. The remote FTP Server can be non-MFT FTP Server, or it could be MFT Embedded FTP Server within another deployment of MFT.

Export the trusted certificate used for remote SSL FTP server to a file using appropriate tools. In case of MFT FTPS remote server, do it via WLST with below command:

svc.exportKeyStoreCertificate(appStripe='',name='',password='',alias='',type='Certificate',filepath='')

Import the trusted certificate to MFT using the below WLST command:

svc.importKeyStoreCertificate(appStripe='',name='', password='',alias='',keypassword='',type='TrustedCertificate',filepath='')

对于MFT-5004错误,发现文件传输失败的均是重传的时候出现失败,观察目标目录,发现在目标目录下已经有同名的文件存在,但是这个文件本身的uid, gid等都变成了0,即root用户,但是我们实际传输的是MFT的一个用户。这样就导致MFT用户在重传的时候,实际是没有权限对目标目录已经存在的文件进行重写操作的。即如检查里面的谈到的,Specified remote output Dir has write permission。在解决了目标文件的用户,用户组属性后,再触发重传操作后能够成功重传。该问题解决。

这也给我们一个启示,就是在解决MFT传输问题的时候一定不要局限在MFT Server上,而是应该应该扩展到网络,SFTP账号和安全,源和目标文件夹等多个方面去排查和定位问题。

对于MFT 5031问题,在Support网站搜索到另外一篇文章,谈到和SFTP的代理设置有关系。

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=524210950037837&id=2440982.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=lavu40vxo_688#SYMPTOM

这篇文章的场景和我们类似,即直接使用SFTP命令行进行Put文件是可以的,但是采用MFT文件传输朝目标文件夹Put文件就出现上面MFT5031的异常。

在这篇文章里面给出了如下的解决方法:

SFTP Remote server with Proxy Server will work when "Transport Provider" is set to HTTP instead of Socket (Default setting for the Transport Provider is Socket).

Transport provider can be set from the advanced properties --> general section.

Please change the Transport Provider to HTTP and deploy then verify the use case.

即在MFT传输的高级设置里面,将传输提供通道属性由Socket套接字修改为Http以绕过代理的影响。对于MFT传输我们按上面这篇文章的方法进行修改,但是传输的时候仍然报通用的错误,问题没有解决。

对于MFT5031的异常总结了下,进行了如下排查但是问题暂时还没有解决。

1. 将Socket传输修改为Http传输,问题仍然存在没有解决。

2. 根据一篇文章提到的,检查目标端Sftp Server上的Sftp参数配置,暂时没有进行完整检查。

//useSftp true

//authenticationType PASSWORD

//preferredKey ExchangeAlgorithm diffie-hellman-group1-sha1

//preferred CompressionAlgorithm none

//preferred DataIntegrityAlgorithm hmac-md5

//preferredPKIAlgorithm ssh-rsa

//privateKeyFile -

//preferredCipherSuite blowfish-cbc

//transportProvider socket

3. 超过最大连接数(初步确认和最大连接数没有关系,只启动集群一个节点问题仍然存在)

4. 设置安全证书,暂时未配置,当前本身没有启用证书。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK