Overview
You are dealing with one of the following issues with the FTP Adapter:
- When executing an FTP Adapter in Aurea Process you get an Error or SocketException,
- The FTP Adapter is stuck due to a SocketException.
- You are unable to execute an FTP Adapter due to a connection reset error.
After encountering one of the above issues, you are getting an error like the following in the BizLogic.log file:
BizLogic | ERROR | ejbServer | BizLogic | (1576) Error in External Performer Execution <com.savvion.sbm.adapters.ftp.FTPAdapter:execute> for the Process Instance <TestJMSUploadFile12#790>.; context(EPManager.invokePerformingMethod) | Thread-1 (HornetQ-client-global-threads-1371001881) |#] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.savvion.sbm.bizlogic.server.EPManager.invokePerformingMethod(EPManager.java:1182) at com.savvion.sbm.bizlogic.server.EPManager.invokeAdapter(EPManager.java:579) at com.savvion.sbm.bizlogic.server.EPManager.processAdapter(EPManager.java:533) at com.savvion.sbm.bizlogic.server.EPManager.executeUT(EPManager.java:503) at com.savvion.sbm.bizlogic.server.AdapterRunner.processAdapter(AdapterRunner.java:146) at com.savvion.sbm.bizlogic.server.AdapterRunner.executeUsingUT(AdapterRunner.java:76) at com.savvion.sbm.bizlogic.server.ejb.BLAdapterMDB.onMessage(BLAdapterMDB.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation (Manage dReferenceMethodInterceptorFactory.java:72) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:105) at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:56) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:5 3) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterc eptor.java:41) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescr iption.java:184) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) at javax.jms.MessageListener$$$view28.onMessage(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:140) at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) at com.sun.proxy.$Proxy20.onMessage(Unknown Source) at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:278) at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:983) at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:48) at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1113) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:196) at java.net.SocketInputStream.read(SocketInputStream.java:122) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.BufferedReader.fill(BufferedReader.java:154) at java.io.BufferedReader.read(BufferedReader.java:175) at org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:58) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:314) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294) at org.apache.commons.net.ftp.FTP.getReply(FTP.java:692) at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1813) at com.savvion.sbm.adapters.ftp.FTPAdapter.ftpDisconnect(FTPAdapter.java:434) at com.savvion.sbm.adapters.ftp.FTPAdapter.storeFTPFile(FTPAdapter.java:230) at com.savvion.sbm.adapters.ftp.FTPAdapter.execute(FTPAdapter.java:80) ... 64 more
Prerequisites
- The ability to log into the Aurea Process Server and the FTP server
- Permissions to modify the sbmserverenv.cmd file in the Aurea Process install directory
Solution
The above issue was identified and reproduced on a machine with IPv6 protocol enabled. To resolve this issue please do the following:
- On the Aurea Process Server and the FTP machine, run the following command:
netsh advfirewall set global StatefulFTP disable
- If the above command does not resolve the issue, modify the sbmserverenv.cmd file in your Aurea Process installation to add the following JVM argument:
-Djava.net.preferIPv4Stack=true
- After adding the JVM argument to the sbmserverenv.cmd file, restart the Aurea Process server.
Testing
Once the solution is applied, the FTP Adapter should no longer generate an error in the BizLogic.log and should function as expected.