Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 213630 - SampleClient does not run
Summary: SampleClient does not run
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All Linux
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Kiryl Kazakevich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 132407 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-20 15:01 EST by Joel Cayne CLA
Modified: 2016-05-05 10:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Cayne CLA 2007-12-20 15:01:18 EST
1. Install the Agent Controller Runtime (tested on Linux-IPF)
2. Run SetConfig and ACStart
3. Run SampleClient as described in the getting_started section "Checking Agent Controller Installation"

An error is returned "Connected to the Agent Controller on "localhost" at port number 10006
ERROR: Unable to get agent org.eclipse.tptp.TimeCollector
Press any key to exit..."

From the servicelog:
"<CommonBaseEvent creationTime="2007-12-20T18:31:36.078913Z" globalInstanceId="A76AB5080001342D3A9F8DBD17E6A37F" msg="PC startProcess: Error (6006), invalid executable '.\Tim
eCollector.exe'" severity="50" version="1.0.1">"
Comment 1 Jonathan West CLA 2008-01-04 17:05:40 EST
The problem is fairly simple. The agent.xml files under /agents/ in the Linux (IA32, EM64T, IPF) builds contain improper Windows-specific .EXE references. Each of the Linux builds need to have the following line replaced, for each affected agent:

From:
<launchInfo><Application executable=".\TimeCollector.exe"></Application></launchInfo>

To:
<launchInfo><Application executable="./TimeCollector"></Application></launchInfo>


E.g. replacing the windows-only backslash and ".exe" with the proper Unix forward slash and executable name. 

This must be done on the agent.xml file in the "org.eclipse.tptp.FileTransferAgent" and "org.eclipse.tptp.TimeCollector" agent directories.

Comment 2 Jonathan West CLA 2008-01-04 17:14:02 EST
Hi Kiryl, can you make the appropriate changes to the Linux builds? Thanks!
Comment 3 Kiryl Kazakevich CLA 2008-01-10 11:19:42 EST
This Linux specific problem is known and documented in AC's bin/readme.txt (but not in /getting_started.html). This document proposes to edit TimeCollector agent.xml manually before running SampleClient.

As it is not user friendly I am agree that problem is to be fixed.

Currently I see three possible solutions:

1) have two versions of agent.xml files in CVS repository for Windows and Linux and pack appropriate file according to target OS
2) continue to have one agent.xml file in CVS repository but dynamically edit it by packaging scripts
3) continue to have one agent.xml file with cross-platform form of path to agent application and make AC enough smart to run application having such path (say have "./TimeCollector" instead of ".\TimeCollector.exe")

Notes by solutions:
(1) It is simplest but produces problems of supporting two versions of the same file
(2) I do not like it as dynamic editing of agent.xml by packaging script may be not reliable especially if content/format of agent.xml will be changed in future
(3) Taking into account that AC is cross-platform product, I like this way while it is not the easiest

By the way there is a related bug 132407 which propose fourth way. It is dynamic generation of agent.xml by SetConfig script during AC configuration phase.

I would like to do short investigation of the solution (3) in order to implement it.
Comment 4 Kiryl Kazakevich CLA 2008-01-24 09:08:18 EST
My investigation showed that solution (3) is not such easy. So I have implemented solution (2).
Comment 5 Kiryl Kazakevich CLA 2008-01-28 07:27:10 EST
To be verified.
Comment 6 Joel Cayne CLA 2008-02-11 09:13:13 EST
Verified on TPTP-4.5.0-200802100400.
Comment 7 Igor Alelekov CLA 2008-02-14 07:56:05 EST
*** Bug 132407 has been marked as a duplicate of this bug. ***