Forum Discussion

Hasan_35483's avatar
Hasan_35483
Icon for Nimbostratus rankNimbostratus
Apr 20, 2012

Connection reset exception while using iControl Asseumbly 10.2 Java

I have included all the library jars available with icontrol assembly 10.2 java download.

 

I am able to create a LTM pool from the UI and using tmsh commands , but it fails while using iControl Assembly. Below is the code I hv written and the exceptions generated. Pls advice.

 

 

iControl.CommonIPPortDefinition [][] membersAofA = new iControl.CommonIPPortDefinition[1][];

 

membersAofA[0] = new iControl.CommonIPPortDefinition[1];

 

membersAofA[0][0] = new iControl.CommonIPPortDefinition();

 

String addr = members.keySet().iterator().next();

 

membersAofA[0][0].setAddress(addr);

 

membersAofA[0][0].setPort(members.get(addr));

 

 

LocalLBLBMethod lb =LocalLBLBMethod.LB_METHOD_DYNAMIC_RATIO;

 

LocalLBLBMethod[] lBMethods = {lb};

 

m_interfaces.getLocalLBPool().create(poolNames, lBMethods, membersAofA);

 

ERROR:

 

 

AxisFault

 

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

 

faultSubcode:

 

faultString: java.net.SocketException: Connection reset

 

faultActor:

 

faultNode:

 

faultDetail:

 

{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Connection reset

 

at java.net.SocketInputStream.read(SocketInputStream.java:180)

 

at java.io.BufferedInputStream.fill(BufferedInputStream.java:230)

 

at java.io.BufferedInputStream.read(BufferedInputStream.java:249)

 

at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:601)

 

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)

 

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

 

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

 

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

 

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

 

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

 

at org.apache.axis.client.Call.invoke(Call.java:2767)

 

at org.apache.axis.client.Call.invoke(Call.java:2443)

 

at org.apache.axis.client.Call.invoke(Call.java:2366)

 

at org.apache.axis.client.Call.invoke(Call.java:1812)

 

at iControl.LocalLBPoolBindingStub.create(LocalLBPoolBindingStub.java:1064)

 

at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:92)

 

at bigIPF5LoadBalancer.Test.main(Test.java:69)

 

 

{http://xml.apache.org/axis/}hostname:tpmoutbound9

 

 

java.net.SocketException: Connection reset

 

at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

 

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

 

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

 

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

 

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

 

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

 

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

 

at org.apache.axis.client.Call.invoke(Call.java:2767)

 

at org.apache.axis.client.Call.invoke(Call.java:2443)

 

at org.apache.axis.client.Call.invoke(Call.java:2366)

 

at org.apache.axis.client.Call.invoke(Call.java:1812)

 

at iControl.LocalLBPoolBindingStub.create(LocalLBPoolBindingStub.java:1064)

 

at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:92)

 

at bigIPF5LoadBalancer.Test.main(Test.java:69)

 

Caused by: java.net.SocketException: Connection reset

 

at java.net.SocketInputStream.read(SocketInputStream.java:180)

 

at java.io.BufferedInputStream.fill(BufferedInputStream.java:230)

 

at java.io.BufferedInputStream.read(BufferedInputStream.java:249)

 

at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:601)

 

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)

 

... 12 more

 

 

  • I got past this issue . I was using a wrong port to connect. But now it fails with the below class not found exception. I have included all the jars.

     

    Any ideas ?

     

    AxisFault

     

    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

     

    faultSubcode:

     

    faultString: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    faultActor:

     

    faultNode:

     

    faultDetail:

     

    {http://xml.apache.org/axis/}stackTrace:java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)

     

    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:11)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)

     

    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

     

    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

     

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

     

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

     

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

     

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

     

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

     

    at org.apache.axis.client.Call.invoke(Call.java:2767)

     

    at org.apache.axis.client.Call.invoke(Call.java:2443)

     

    at org.apache.axis.client.Call.invoke(Call.java:2366)

     

    at org.apache.axis.client.Call.invoke(Call.java:1812)

     

    at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1533)

     

    at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:94)

     

    at bigIPF5LoadBalancer.Test.main(Test.java:69)

     

    Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:20)

     

    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:36)

     

    at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)

     

    ... 15 more

     

     

    {http://xml.apache.org/axis/}hostname:tpmoutbound9

     

     

    java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

     

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

     

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

     

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

     

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

     

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

     

    at org.apache.axis.client.Call.invoke(Call.java:2767)

     

    at org.apache.axis.client.Call.invoke(Call.java:2443)

     

    at org.apache.axis.client.Call.invoke(Call.java:2366)

     

    at org.apache.axis.client.Call.invoke(Call.java:1812)

     

    at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1533)

     

    at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:94)

     

    at bigIPF5LoadBalancer.Test.main(Test.java:69)

     

    Caused by: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)

     

    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:11)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)

     

    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

     

    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

     

    ... 12 more

     

    Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

     

    at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:20)

     

    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:36)

     

    at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)

     

    ... 15 more

     

  • I added the following line of code to get rid of the above error ; but now i face the trustore file missing problem :. I am using iControl Assembly 10.2 Java

     

    Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl");

     

     

     

    AxisFault

     

    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

     

    faultSubcode:

     

    faultString: java.net.SocketException: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    faultActor:

     

    faultNode:

     

    faultDetail:

     

    {http://xml.apache.org/axis/}stackTrace:java.net.SocketException: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)

     

    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:11)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)

     

    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

     

    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

     

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

     

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

     

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

     

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

     

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

     

    at org.apache.axis.client.Call.invoke(Call.java:2767)

     

    at org.apache.axis.client.Call.invoke(Call.java:2443)

     

    at org.apache.axis.client.Call.invoke(Call.java:2366)

     

    at org.apache.axis.client.Call.invoke(Call.java:1812)

     

    at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1533)

     

    at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:102)

     

    at bigIPF5LoadBalancer.Test.main(Test.java:69)

     

    Caused by: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    at com.ibm.jsse2.tc.a(tc.java:55)

     

    at com.ibm.jsse2.kc.f(kc.java:14)

     

    at com.ibm.jsse2.kc.(kc.java:23)

     

    at com.ibm.jsse2.kc.e(kc.java:8)

     

    at com.ibm.jsse2.SSLSocketFactoryImpl.(SSLSocketFactoryImpl.java:5)

     

    at java.lang.J9VMInternals.newInstanceImpl(Native Method)

     

    at java.lang.Class.newInstance(Class.java:1328)

     

    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:21)

     

    at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)

     

    ... 15 more

     

     

    {http://xml.apache.org/axis/}hostname:tpmoutbound9

     

     

    java.net.SocketException: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

     

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

     

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

     

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

     

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

     

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

     

    at org.apache.axis.client.Call.invoke(Call.java:2767)

     

    at org.apache.axis.client.Call.invoke(Call.java:2443)

     

    at org.apache.axis.client.Call.invoke(Call.java:2366)

     

    at org.apache.axis.client.Call.invoke(Call.java:1812)

     

    at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1533)

     

    at bigIPF5LoadBalancer.LoadBalancerPolicy.createPool(LoadBalancerPolicy.java:102)

     

    at bigIPF5LoadBalancer.Test.main(Test.java:69)

     

    Caused by: java.net.SocketException: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)

     

    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:11)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)

     

    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

     

    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

     

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

     

    ... 12 more

     

    Caused by: java.lang.Exception: Truststore file does not exist: C:\Users\Administrator\.keystore

     

    at com.ibm.jsse2.tc.a(tc.java:55)

     

    at com.ibm.jsse2.kc.f(kc.java:14)

     

    at com.ibm.jsse2.kc.(kc.java:23)

     

    at com.ibm.jsse2.kc.e(kc.java:8)

     

    at com.ibm.jsse2.SSLSocketFactoryImpl.(SSLSocketFactoryImpl.java:5)

     

    at java.lang.J9VMInternals.newInstanceImpl(Native Method)

     

    at java.lang.Class.newInstance(Class.java:1328)

     

    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:21)

     

    at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)

     

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)

     

    ... 15 more