Highlighted
Absent Member.
Absent Member.
253 views

Socket exception while executing script

I have a script which recorded using RMI-JAVA protocol. We are using RMI Server in between the application server and the Load runner. When I am trying to execute the script using Load runner controller, it runs perfectly for sometime and then through Socket exception. Please find the exception as below.

RMI server is on windows machine and the application server is on AIX env.

Error: System.err: java.net.SocketException: Operation timed out: connect:could be due to invalid address
System.err: at java.net.PlainSocketImpl.socketConnect(Native Method)
System.err: at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
System.err: at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
System.err: at java.net.Socket.connect(Socket.java:536)
System.err: at java.net.Socket.connect(Socket.java:486)
System.err: at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
System.err: at sun.net.www.http.HttpClient.openServer(HttpClient.java:397)
System.err: at sun.net.www.http.HttpClient.openServer(HttpClient.java:507)
System.err: at sun.net.www.http.HttpClient.(HttpClient.java:245)
System.err: at sun.net.www.http.HttpClient.New(HttpClient.java:319)
System.err: at sun.net.www.http.HttpClient.New(HttpClient.java:331)
System.err: at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:821)
System.err: at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:773)
System.err: at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:698)
System.err: at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:865)
System.err: at com.s1.fst.httptunnel.net.Util.sendRequest(Util.java:42)
System.err: at com.s1.fst.httptunnel.rmi.RmiHttpTunnelServiceImpl.sendRequest(RmiHttpTunnelServiceImpl.java:35)
System.err: at com.s1.fst.httptunnel.rmi._RmiHttpTunnelServiceImpl_Tie.sendRequest(_RmiHttpTunnelServiceImpl_Tie.java:85)
System.err: at com.s1.fst.httptunnel.rmi._RmiHttpTunnelServiceImpl_Tie._invoke(_RmiHttpTunnelServiceImpl_Tie.java:70)
System.err: at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
System.err: at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
System.err: at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
System.err: at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
System.err: at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
System.err: at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
System.err: at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
System.err: at com.ibm.rmi.iiop.WorkerThread.run(ThreadPoolImpl.java:202)
System.err: at java.lang.Thread.run(Thread.java:797)
Error: java.net.SocketException: Operation timed out: connect:could be due to invalid address
Error: at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
at java.net.Socket.connect(Socket.java:536)
at java.net.Socket.connect(Socket.java:486)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:397)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:507)
at sun.net.www.http.HttpClient.(HttpClient.java:245)
at sun.net.www.http.HttpClient.New(HttpClient.java:319)
at sun.net.www.http.HttpClient.New(HttpClient.java:331)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:821)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:773)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:698)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:865)
at com.s1.fst.httptunnel.net.Util.sendRequest(Util.java:42)
at com.s1.fst.httptunnel.rmi.RmiHttpTunnelServiceImpl.sendRequest(RmiHttpTunnelServiceImpl.java:35)
at com.s1.fst.httptunnel.rmi._RmiHttpTunnelServiceImpl_Tie.sendRequest(_RmiHttpTunnelServiceImpl_Tie.java:85)
at com.s1.fst.httptunnel.rmi._RmiHttpTunnelServiceImpl_Tie._invoke(_RmiHttpTunnelServiceImpl_Tie.java:70)


I am getting this error on the Load runner controller's left side window i. e. Scenario status window.

Any help in regard to this is highly appreciated.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: Socket exception while executing script

The proxy setting for the Java classes are prefixed "http.".

See http://java.sun.com/j2se/1.5.0/docs/...roperties.html.


For https proxy has to be set as follows..

System.setProperty("https.proxyHost", "192.168.68.1");
System.setProperty("https.proxyPort", "80");

if the initial setting was as follows

System.setProperty("proxyHost", "192.168.68.1");
System.setProperty("proxyPort", "80");

just a prefix of https. made the trick!!

Hope it helps. 🙂
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Socket exception while executing script

Thank you Srinivas for your response.

I have checked all the script but sorry there is no such setting available. But we have set these kind of properties in initialize method. Please find these properties as below


public int initialize() throws Throwable {

// Set system properties...
_properties1 = new Properties(System.getProperties());
_properties1.put("invokedviajava", "");
_properties1.put("jxe.lowest.romimage.version", "9");
_properties1.put("ibm.signalhandling.sigchain", "true");
_properties1.put("terminal.name", "ASahoo-dt");
_properties1.put("com.ibm.util.extralibs.properties", "");
_properties1.put("java.fullversion", "J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20060504 (JIT enabled)\nJ9VM - 20060501_06428_lHdSMR\nJIT - 20060428_1800_r8\nGC - 20060501_AA");
_properties1.put("sun.jnu.encoding", "Cp1252");
_properties1.put("java.rmi.server.codebase", "http://ASahoo-dt:8098/");
_properties1.put("java.assistive", "ON");
_properties1.put("ibm.signalhandling.rs", "false");
_properties1.put("com.s1.fst.jaas_config", "jaas_config.xml");
_properties1.put("com.ibm.oti.vm.bootstrap.library.path", "c:/r_et/java/jre/bin/j9vm;c:/r_et/java/jre/bin/classic;c:/r_et/java/bin;c;/r_et/;C:/Windows/System32/;C:/r_et/java/Jre/bin;C:/Program Files/Mercury/LoadRunner/bin");
_properties1.put("java.jcl.version", "20060511a");
_properties1.put("console.encoding", "Cp437");
_properties1.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
_properties1.put("com.ibm.cpu.endian", "little");
_properties1.put("com.ibm.oti.configuration", "scar");
_properties1.put("ibm.signalhandling.sigint", "true");
_properties1.put("jxe.current.romimage.version", "9");
_properties1.put("com.ibm.oti.jcl.build", "20060331_1751");
_properties1.put("com.ibm.vm.bitmode", "32");
_properties1.put("com.ibm.oti.vm.library.version", "23");
_properties1.put("java.naming.provider.url", "iiop://localhost:1000");
_properties1.put("ibm.system.encoding", "Cp1252");
System.setProperties(_properties1);

There is properties mentioned to set system parameter. Please find those as below.

System.setSecurityManager(new java.rmi.RMISecurityManager());


DummyClassLoader.setContextClassLoader();
java.util.Hashtable _hashtable = new java.util.Hashtable();
_hashtable.put("java.naming.provider.url", "iiop://localhost:1000");
_hashtable.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.