Community
Participate
Working Groups
Build ID: I20050401-1645 Steps To Reproduce: 1.client of Agent Controller (RAC Connector in Iterator mode) running on z/OS 2.Agent Controller 4.2 running on Windows XP 3.The client prints "Error while creating the data connectionjava.net.SocketTimeoutException: Read timed out" on the console and the Agent Controller crashes. More information: Using the following configuration: client of Agent Controller (RAC Connector in Iterator mode) running on z/OS Agent Controller 4.2 running on Windows XP The client prints "Error while creating the data connectionjava.net.SocketTimeoutException: Read timed out" on the console and the Agent Controller crashes. While looking for a solution, I patched the code in ConnectionImpl.java: in the 'createDataConnection' method instead of setting the default timeout (Constants.TIMEOUT_PERIOD = 100ms) on the 'datasock' socket, I put a larger timeout : 10000ms. With this patch, the problem disappeared. int createDataConnection(int direction) throws IOException { ... datasock=new Socket(addrs[offset], _port); datasock.setTcpNoDelay(true); //datasock.setSoTimeout(Constants.TIMEOUT_PERIOD); datasock.setSoTimeout(10000); ... }
What does the RAC iterator mean here. Assigning it to Joanna since related to RAC code.
The "ConnectionImpl" class belongs to the new execution plugin "org.eclipse.tptp.platform.execution". I am not sure what the "RAC Connector in Iterator mode" means but I guess it implements the new execution API to connect to the New Technology Agent Controller.
Stoiko - Please explain what you mean by "RAC Connector in Iterator mode". Also, can you reproduce the timeout failure when running the client on a Windows system? Linux?
Our component is called "RAC Connector in Iterator mode". The problem could be recreated with any Java client running on z/OS connected to Agent Controller running on Windows for example with logging agent, registered by GLA. Example client: import java.net.InetAddress; import org.eclipse.tptp.platform.execution.client.agent.IAgent; import org.eclipse.tptp.platform.execution.client.core.*; import org.eclipse.tptp.platform.execution.util.TPTPDataPath; public class ACTest { public static final String AGENT_CONTROLLER_HOST = "9.182.191.77"; public static final int AGENT_CONTROLLER_PORT = 10006; public static final String AGENT_NAME = "org.eclipse.tptp.legacy.myagent"; public static void main(String args[]) throws Exception { INode acNode = null; ConnectionInfo connInfo = new ConnectionInfo(); acNode = NodeFactory.createNode(AGENT_CONTROLLER_HOST); connInfo.setHostName(AGENT_CONTROLLER_HOST); connInfo.setPort(AGENT_CONTROLLER_PORT); IAgentController ac = acNode.connect(connInfo); IAgent remoteLoggingAgent = ac.getAgent(AGENT_NAME, "org.eclipse.tptp.platform.execution.client.agent.IAgent"); remoteLoggingAgent.startMonitoring(TPTPDataPath.DATA_PATH_RECEIVE, new LoggingAgentDataProcessor()); Thread.sleep(5000); remoteLoggingAgent.releaseAccess(); ac.disconnect(); } private static class LoggingAgentDataProcessor implements IDataProcessor { public void incomingData(byte ignore1[], int ignore2, InetAddress ignore3) {} public void incomingData(char ignore1[], int ignore2, InetAddress ignore3) {} public void invalidDataType(byte ignore1[], int ignore2, InetAddress ignore3) {} public void waitingForData() {} } } We don’t observe the timeout with Windows and Linux clients.
Stoiko, Please provide a patch for the fix needed for z/os. Please work with Joanna on filling a non-committer contribution questionnaire.
We can not provide a fix for this defect because it requires a design decision to be taken first. At the moment we don’t have necessary expertise on the source code to be able to take the decision. This design decision should be taken by the authors/owners of the TPTP library. We see the following options to be considered when the fix is prepared: 1/ A straightforward solution to the timeout problem would be to set a larger value of Constants.TIMEOUT_PERIOD. This, however, is a good solution - given a slow enough network connection, the problem will most certainly emerge again. 2/ A more sophisticated solution would be to add a new property in 'ConnectionInfo', which can override the default timeout period. This seems to be a good enough solution for the client side. However, the most disturbing aspect of the problem is still not addressed - the Agent Controller should not crash when the client times out. Since we are not familiar with the architecture and the source code of the Agent Controller, we cannot propose a solution for this problem.
Please file a separate bug for the AC crashing issue and cross-reference this bug. AC is owned by separate component and needs ownership by them if it is going to get attention.
FYI... The bug requested in comment 7 has been opened. It is bug 170062.
We are ready to provide access to our test machines. The needed machines are one z/OS test machine and one Windows machine. Both machines are located in the IBM network and BSO firewall authentication is needed in order for the machines to be used. Could you please provide an IBM contact on your team who could use these machines? URGENT: Please provide a fix for this bug as soon as possible because we can’t exit our System Verification Testing phase without it. Thanks.
Assigning to JOanna since she is the component owner
Hi Stoiko, can you contact me for setting up the the environment on the z/OS and Windows hosts? I can access the IBM network as long as the BSO firewall allows me in. Thanks.
Set priority to P1 for 4.4 plan closure.
Created attachment 58664 [details] Batch file for running the GLA agent I can run "ACTest" successfully on the z/OS host "tvt2073". The agent "myagent" is running on my Windows machine. The TPTP 4.4 driver I was using is: http://www.eclipse.org/tptp/home/downloads/?buildId=TPTP-4.4.0-200702050100 On the Windows XP side: 1. Download and setup the TPTP 4.4 Agent Controller with no security 2. Download and setup the TPTP 4.4 GLA 3. Copy Deyan's "myagent.adapter" and "myagent.log" to the GLA's "bin" dir 4. Set PATH to point to JDK 1.5 5. Start Agent Controller 6. Copy the attached "run.bat" file to the GLA's "bin" dir 7. Run GLA using the attached "run.bat" file On the z/OS side: 1. Set PATH to point to JDK 1.5 2. Copy "tptpcore.jar" to my home dir. This can be found from the TPTP runtime zip under the "org.eclipse.tptp.platform.execution" plugin 3. Copy "ACTest.java" to my home dir and compile it 4. Set CLASSPATH pointing to my home dir as well as "tptpcore.jar" 5. Run the "ACTest" program as "java ACTest" Note: Make sure your firewall (whether it is BSO or your local Windows firewall) is not blocking the network traffic.
Created attachment 58859 [details] Patch to ConnectionImpl in the new exec framework This patch has been verified by the bug originator. The patch includes a new method allowing users to set the socket timeouts instead of hard-coding the default 100ms.
+6 hours worked.
Guru, please review the patch. Thanks.
Samson the patch looks good. Please commit the change.
Fix checked into HEAD.
Created attachment 58991 [details] Patch to ConnectionImpl in the new exec framework (4.2.1) I have just created this patch for the TPTP 4.2.1 branch. Please give this a try.
Created attachment 58992 [details] tptpcore.jar for the 4.2.1 release
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.