Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 189175

Summary: Connection refused when lauching tests on Linux.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Bing Xu <xubing>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P1 CC: jkubasta, newboya1988
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Paul Slauenwhite CLA 2007-05-25 12:49:38 EDT
Connection refused when lauching tests on Linux.

Using the TPTP-4.4.0-200705080100Y on SLES 10 running in 32bit mode on EM64T, the following exception is thrown when lauching tests locally using the IAC or from a remote machine (XP) using the Agent Controller:

java.net.ConnectException: Connection refused
        at sun.nio.ch.Net.connect(Native Method)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:491)
        at org.eclipse.hyades.internal.execution.core.file.socket.SocketChannelFactory.create(SocketChannelFactory.java:78)
        at org.eclipse.hyades.internal.execution.core.file.socket.SocketChannelFactory.create(SocketChannelFactory.java:63)
        at org.eclipse.hyades.internal.execution.core.file.dynamic.FileServerCommandFactory.connectSocketChannel(FileServerCommandFactory.java:300)
        at org.eclipse.hyades.internal.execution.core.file.dynamic.FileServerCommandFactory.connectSocketChannel(FileServerCommandFactory.java:269)
        at org.eclipse.hyades.internal.execution.core.file.dynamic.FileServerCommandFactory.createDetermineServerReachCommand(FileServerCommandFactory.java:402)        at org.eclipse.hyades.execution.local.file.FileManagerExtendedImpl.determineServerReach(FileManagerExtendedImpl.java:683)
        at org.eclipse.hyades.internal.execution.local.common.Console.run(Console.java:181)
org.eclipse.hyades.execution.core.DaemonConnectException
        at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:225)
        at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:359)
        at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:347)
        at org.eclipse.hyades.execution.harness.TestExecutionHarness$4.run(TestExecutionHarness.java:2433)
        at java.lang.Thread.run(Thread.java:803)
Caused by: org.eclipse.hyades.internal.execution.local.control.InactiveProcessException
        at org.eclipse.hyades.internal.execution.local.control.ProcessImpl.getProcessId(ProcessImpl.java:487)
        at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:220)
        ... 4 more

OS:

Linux paules 2.6.16.27-0.9-smp #1 SMP Tue Feb 13 09:35:18 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux

JRE:

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20070201 (SR4))IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20070201 (JIT enabled)
J9VM - 20070131_11312_lHdSMR
JIT  - 20070109_1805ifx1_r8
GC   - 200701_09)
JCL  - 20070126

Lauching the test again works fine.

Note: I am keeping the severity as normal since I can not consistently reproduce this defect.
Comment 1 Paul Slauenwhite CLA 2007-05-25 12:50:24 EDT
There is no firewall running on either machine.
Comment 2 Samson Wai CLA 2007-11-27 09:33:22 EST
Hi Bing. I have transferred my bugs to you for triage. Thanks.
Comment 3 Paul Slauenwhite CLA 2008-01-10 10:16:58 EST
Increasing the severity since this is impacting test execution on Linux in 4.5.

Bing, can we include this defect in 4.5?
Comment 4 Bing Xu CLA 2008-02-07 15:46:05 EST
Paul,

I tried TPTP 4.4.0 and Feb. 4's TPTP 4.5 build on rnsx643-linux with ibm-java2-x86_64-50.   In 4.4.0 'Test Connection' failed but in 4.5 I was able to profile a simple Java application both locally and from my XP.

Can you see if you can reproduce this bug?  
Comment 5 Paul Slauenwhite CLA 2008-02-08 09:36:56 EST
Hi Bing,

The problem is not with Test Connection or profiling but with Test Execution.  Please try to launch a remote TPTP Manual/JUnit test suite.

I was able to reproduce this problem by launching a remote TPTP JUnit test suite with the 4.4.1-200802061217 driver:

!ENTRY org.eclipse.hyades.test.core 1 0 2008-02-08 10:24:35.049
!MESSAGE org.eclipse.hyades.execution.core.DaemonConnectException
!STACK 0
org.eclipse.hyades.execution.core.DaemonConnectException
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:225)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:359)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:347)
	at org.eclipse.hyades.execution.harness.TestExecutionHarness$4.run(TestExecutionHarness.java:2434)
	at java.lang.Thread.run(Thread.java:803)
Caused by: org.eclipse.hyades.internal.execution.local.control.InactiveProcessException
	at org.eclipse.hyades.internal.execution.local.control.ProcessImpl.getProcessId(ProcessImpl.java:487)
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:220)
	... 4 more

!ENTRY org.eclipse.hyades.test.core 4 0 2008-02-08 10:24:35.081
!MESSAGE IWAT4039E The Test Execution Harness reported the following problems:Connection refused on host 192.168.0.108.

Note: I am increasing the severity to blocker since we can consistently reproduce this defect and it is blocking test execution on Linux, which is a common use case.  We should attempt to include this in 4.4.1 and 4.5.
Comment 6 Bing Xu CLA 2008-02-08 12:14:27 EST
I traced the code of 4.4.0 on Linux EM64T, the error was caused by the bug fixed in 196341.  I tried to launch a simple JUnit test using 4.5 on EM64T and it worked.  Paul, have you got this error from 4.5?  

Comment 7 Paul Slauenwhite CLA 2008-02-08 12:18:24 EST
(In reply to comment #6)
> I traced the code of 4.4.0 on Linux EM64T, the error was caused by the bug
> fixed in 196341.  I tried to launch a simple JUnit test using 4.5 on EM64T and
> it worked.  Paul, have you got this error from 4.5?  
> 

Not sure I agree Bing since 196341 was resolved in 4.4.1.  

I have not been able to test using 4.5 due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=218270.
Comment 8 Bing Xu CLA 2008-02-11 17:12:42 EST
Hi Paul,

I download TPTP-4.4.1-200802061217 and installed on my XP and rnsx642-linux.  I then created a JUnit test case in both XP and Linux workbench.  The test case opens a file and writes a line.   I can launch the JUnit remotely from Linux to XP and vise versa.

Can you try it on rnsx642-linux and see if you still have the problem?
Comment 9 Paul Slauenwhite CLA 2008-02-11 18:35:09 EST
(In reply to comment #8)
> Hi Paul,
> 
> I download TPTP-4.4.1-200802061217 and installed on my XP and rnsx642-linux.  I
> then created a JUnit test case in both XP and Linux workbench.  The test case
> opens a file and writes a line.   I can launch the JUnit remotely from Linux to
> XP and vise versa.
> 
> Can you try it on rnsx642-linux and see if you still have the problem?
> 

I tried a remote TPTP JUnit test execution on rnsx642-linux with success.  However, the Agent Controller is running a differnet OS (Redhat) and a 64-bit JRE:

java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux amd64-64 j9vmxa6423-20070426
com.ibm.vm.bitmode=64
Comment 10 Bing Xu CLA 2008-02-12 11:23:02 EST
I tried TPTP-4.4.1-200802061217 on tptp-blackhawk running SLES 9 on IA32.

JVM:  

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32devifx-20071025 (SR6b))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20071005 (JIT enabled)

OS:

Linux tptp-blackhawk 2.6.5-7.97-default #1 Fri Jul 2 14:21:59 UTC 2004 i686 i686 i386 GNU/Linux

I was able to launch the JUnit remotely to my XP successfully.  

Paul, if possible, can you run a simple Java on the Linux machine that is giving you trouble and get the values of these properties:

System.getProperty("os.arch")
System.getProperty("os.name")



Comment 11 Paul Slauenwhite CLA 2008-02-12 11:29:17 EST
(In reply to comment #10)

> I was able to launch the JUnit remotely to my XP successfully.  

It is actually the inverse that is causing the problems, that is, launching from SLES 10 EM64T to a Windows XP machine.

> Paul, if possible, can you run a simple Java on the Linux machine that is
> giving you trouble and get the values of these properties:
> 
> System.getProperty("os.arch")
> System.getProperty("os.name")

x86
Linux

If necessary, I can give you access to my Linux machine.

Comment 12 Bing Xu CLA 2008-02-12 11:41:45 EST
> It is actually the inverse that is causing the problems, that is, launching
> from SLES 10 EM64T to a Windows XP machine.

That's what I tried--launching a JUnit from the workbench on Linux to my XP.

> If necessary, I can give you access to my Linux machine.

Sure. Can you send me an email.

Comment 13 Paul Slauenwhite CLA 2008-02-12 12:06:17 EST
(In reply to comment #12)
> > It is actually the inverse that is causing the problems, that is, launching
> > from SLES 10 EM64T to a Windows XP machine.
> 
> That's what I tried--launching a JUnit from the workbench on Linux to my XP.

No.  Launching from Linux to Windows XP.

> > If necessary, I can give you access to my Linux machine.
> 
> Sure. Can you send me an email.
 
Looks like the VPN client is not supported for this kernel.  I will sent you the external IP.

Comment 14 Bing Xu CLA 2008-02-12 12:46:50 EST
Tried launching a JUnit from my local XP to tptp-blackhawk (SUSE 9 on IA32) and it worked.

Talked to Paul, going to close this one for now and reopne if happens again in 4.5.
Comment 15 Paul Slauenwhite CLA 2008-02-12 15:00:18 EST
Closing.
Comment 16 Paul Slauenwhite CLA 2008-02-20 07:01:20 EST
We were able to consistently reproduce this problem on the first test execution using the 4.4.1-200802121409 driver:

!ENTRY org.eclipse.hyades.test.core 1 0 2008-02-20 07:55:03.757
!MESSAGE org.eclipse.hyades.execution.core.DaemonConnectException
!STACK 0
org.eclipse.hyades.execution.core.DaemonConnectException
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:225)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:359)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:347)
	at org.eclipse.hyades.execution.harness.TestExecutionHarness$4.run(TestExecutionHarness.java:2434)
	at java.lang.Thread.run(Thread.java:803)
Caused by: org.eclipse.hyades.internal.execution.local.control.InactiveProcessException
	at org.eclipse.hyades.internal.execution.local.control.ProcessImpl.getProcessId(ProcessImpl.java:487)
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:220)
	... 4 more

!ENTRY org.eclipse.hyades.test.core 4 0 2008-02-20 07:55:18.788
!MESSAGE IWAT4039E The Test Execution Harness reported the following problems:Connection refused on host 192.168.0.108.

On the second test execution, the execution hangs at 31% (before deployment at the initialization stage with the Agent Controller).
Comment 17 Paul Slauenwhite CLA 2008-02-20 07:01:46 EST
(In reply to comment #16)

Using a TPTP Manual Test suite.
Comment 18 Paul Slauenwhite CLA 2008-02-20 07:03:33 EST
(In reply to comment #16)

> On the second test execution, the execution hangs at 31% (before deployment at
> the initialization stage with the Agent Controller).

This behavior is not consistent since the third test execution resulted in the same error message as the first test execution:

IWAT4039E The Test Execution Harness reported the following
problems:Connection refused on host 192.168.0.108.

Bing, can we investigate for 4.4.1?

Comment 19 Paul Slauenwhite CLA 2008-02-20 11:25:08 EST
Bing, Tony is seeing the same symptoms when using Windows XP --> Linus (tptp-blackhawk) and the Feb12 4.4.1 driver:

!ENTRY org.eclipse.hyades.test.core 1 0 2008-02-20 11:16:51.653
!MESSAGE org.eclipse.hyades.execution.core.DaemonConnectException
!STACK 0
org.eclipse.hyades.execution.core.DaemonConnectException
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:246)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:359)
	at org.eclipse.hyades.execution.local.NodeImpl.connect(NodeImpl.java:347)
	at org.eclipse.hyades.execution.harness.TestExecutionHarness$4.run(TestExecutionHarness.java:2434)
	at java.lang.Thread.run(Thread.java:803)
Caused by: org.eclipse.hyades.internal.execution.local.control.NotConnectedException
	at org.eclipse.hyades.internal.execution.local.control.ProcessImpl.launch(ProcessImpl.java:171)
	at org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:217)
	... 4 more

!ENTRY org.eclipse.hyades.test.core 4 0 2008-02-20 11:16:51.674
!MESSAGE IWAT4039E The Test Execution Harness reported the following problems:Connection refused on host tptp-blackhawk.

Changing the target to 4.4.1 since this is blocking 4.4.1 testing.

Comment 20 Bing Xu CLA 2008-02-20 11:52:31 EST
(In reply to comment #19)
> Bing, Tony is seeing the same symptoms when using Windows XP --> Linus
> (tptp-blackhawk) and the Feb12 4.4.1 driver:
> !ENTRY org.eclipse.hyades.test.core 1 0 2008-02-20 11:16:51.653

Did Tony get this when he launching JUnit remotely from XP --> tptp-blackhawk?  The exception looks a bit different from before.  I am looking into it now.

Comment 21 Paul Slauenwhite CLA 2008-02-20 12:22:47 EST
(In reply to comment #20)
> (In reply to comment #19)
> > Bing, Tony is seeing the same symptoms when using Windows XP --> Linus
> > (tptp-blackhawk) and the Feb12 4.4.1 driver:
> > !ENTRY org.eclipse.hyades.test.core 1 0 2008-02-20 11:16:51.653
> 
> Did Tony get this when he launching JUnit remotely from XP --> tptp-blackhawk? 
> The exception looks a bit different from before.  I am looking into it now.
> 

After verifying Tony's installation, he had mistakenly configured the Agent Controller to only allow local connections.  Changing the configuration to allow all connections resolves the problem.  Confirmed that JUnit and Manual test suites are working on tptp-blackhawk.  As such, decreasing the severity since this defect cannot be consistently reproduced.   
Comment 22 Bing Xu CLA 2008-02-20 13:55:14 EST
(In reply to comment #16)
> We were able to consistently reproduce this problem on the first test execution
> using the 4.4.1-200802121409 driver:
> !ENTRY org.eclipse.hyades.test.core 1 0 2008-02-20 07:55:03.757
> !MESSAGE org.eclipse.hyades.execution.core.DaemonConnectException
> !STACK 0
> org.eclipse.hyades.execution.core.DaemonConnectException
>         at
> org.eclipse.hyades.execution.local.NodeImpl._connect(NodeImpl.java:225)
>         at
....
> On the second test execution, the execution hangs at 31% (before deployment at
> the initialization stage with the Agent Controller).

Paul, did you get this exception when running a manual test suite on a local deployment on Linux?  If so which one?
Comment 23 Paul Slauenwhite CLA 2008-02-20 13:59:24 EST
(In reply to comment #22)

> Paul, did you get this exception when running a manual test suite on a local
> deployment on Linux?  If so which one?

No, local deployment worked fine.
Comment 24 Bing Xu CLA 2008-02-20 15:05:07 EST
Paul, this is what I tried on rnsx642-linux:

1. install TPTP-4.4.1-200802121409 Eclipse/TPTP and AC.
2. create a new deployment of Platform.Communication.Agent_Controller pointing to my XP
3. Run Platform.Communication.Agent_Controller test suite with the new deployment.

I didn't see the error.  Is this what you've tried?  What test suite were you using?
Comment 25 Paul Slauenwhite CLA 2008-02-21 06:36:06 EST
(In reply to comment #24)
> Paul, this is what I tried on rnsx642-linux:
> 
> 1. install TPTP-4.4.1-200802121409 Eclipse/TPTP and AC.
> 2. create a new deployment of Platform.Communication.Agent_Controller pointing
> to my XP
> 3. Run Platform.Communication.Agent_Controller test suite with the new
> deployment.
> 
> I didn't see the error.  Is this what you've tried?  What test suite were you
> using?
> 

No.

1) Create a simple TPTP Manual (or JUnit) Test suite and deployment (including artifact and location including your Linux hostname/IP address) on your Windows XP machine.
2) Install the TPTP 4.4.1 Agent Controller on your Linux machine.
3) Run the test suite from your Windows XP machine with the deployment , which will deploy/run the test suite on the Linux machine. 
Comment 26 Bing Xu CLA 2008-04-04 11:45:22 EDT
Paul, do you still have this problem during 4.5 i6 test pass?
Comment 27 Paul Slauenwhite CLA 2008-04-04 14:32:56 EDT
(In reply to comment #26)
> Paul, do you still have this problem during 4.5 i6 test pass?
> 

I have not.  Tony, have you?
Comment 28 Tony Wang CLA 2008-04-04 14:59:24 EDT
no, it works fine
Comment 29 Paul Slauenwhite CLA 2008-04-04 15:06:18 EDT
Thanks Tony. 

Lets close this defect as WORKSFORME and I can reopen if I see this behavior in the future.
Comment 30 Bing Xu CLA 2008-04-04 15:36:21 EDT
It works now.  Will reopen is encouter this again.
Comment 31 Paul Slauenwhite CLA 2008-06-10 09:48:51 EDT
Verified in TPTP-4.5.0RC3-200806031051.  Closing.