Error: Cannot find sprinter agent. You need to run sprinter agent on secondary machine

If you are getting the following error message when working with Sprinter

Error: Cannot find sprinter agent. You need to run sprinter agent on secondary machine

The cause of this error is due to some security settings in the customer’s environment, it is possible that Sprinter will fail to establish communication with the ‘Sprinter Agent’ on secondary machine (while customer attempts to execute test which requires the secondary machine for mirroring), in this case, the customer will see the error message during the tests startup.

In order to solve the problem (detect and fix the required security settings), please try the following steps:

1. On the secondary machine:

a. Close the ‘Sprinter Agent’ (if running): right-click on the tray icon, then click the ‘Exit’ option.

b. Change logging level of ‘Sprinter Agent’:

i. Go to ‘bin’ folder within installation of Sprinter.

ii. Open file ‘SprinterAgent.exe.config’.

iii. Find the comment which explains how to change the logging level (find this string: ‘To control the lowest logging level’).

iv. Act according the comment, and change the level to ‘All’.

c. Launch ‘Sprinter Agent’.

d. Find the URI where the ‘Sprinter Agent’ is listening:

i. Open file ‘%appdata%/HP/Sprinter/Log/SprinterAgent.exe.log’.

ii. Find entry which contains this string: ‘Inspection listener was opened successfully’.

iii. Copy the written value (e.g. ‘http://+:8080/HP_Sprinter_Agent_Service_Inspection/1/’) to notepad.

iv. Replace the ‘+’ with ‘127.0.0.1’ (e.g. create this text: ‘http://127.0.0.1:8080/HP_Sprinter_Agent_Service_Inspection/1/’).

e. Try to establish communication (via ‘127.0.0.1’) with the local ‘Sprinter Agent’:

i. Open the Internet Explorer browser.

ii. Copy the text from notepad to the browser’s address bar.

iii. Click ‘Enter’ (this action will send kind of HTTP request to the ‘Sprinter Agent’).

iv. The browser’s main window supposed to display text (the HTTP response which sent from ‘Sprinter Agent’).

v. Clicking on ‘View’ > ‘Source’ will display XML of the response. E.g.:

<HTML><BODY><?xml version="1.0" encoding="utf-16"?>

<InspectionInfoEx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SessionInfo>

<Username>…</Username>

<UserDomain>…</UserDomain>

<SessionId>…</SessionId>

</SessionInfo>

<Endpoints>

<string>net.tcp://localhost:64865/MirrorTestingAgentService</string>

<string>net.pipe://localhost/Agent-…/MirrorTestingAgentService</string>

</Endpoints>

<ProtectSessions>true</ProtectSessions>

</InspectionInfoEx></BODY></HTML>

vi. If all works fine (browser shows valid response from ‘Sprinter Agent’) – continue to paragraph ‘f’.

vii. If exists problem (browser shows error message) – customer should change security settings on this machine, until all works fine.

f. Try to establish communication (via real IP Address) with the local ‘Sprinter Agent’:

i. Repeat paragraph ‘e’, but now replace the ‘127.0.0.1’ with real IP Address of the secondary machine (e.g. enter this string to the browser’s address bar: ‘http://a.b.c.d:8080/HP_Sprinter_Agent_Service_Inspection/1/’, where ‘a.b.c.d’ stands for real IP Address of the secondary machine).

ii. If all works fine (browser shows valid response from ‘Sprinter Agent’) – continue to paragraph ‘2’.

iii. If exists problem (browser shows error message) – customer should change security settings on this machine, until all works fine.

2. On the primary machine:

a. Try to establish communication (via real IP Address) with the remote ‘Sprinter Agent’:

i. Repeat paragraph ‘1.f’ (but now from the primary machine).

ii. If all works fine (browser shows valid response from ‘Sprinter Agent’) – continue to paragraph ‘b’.

iii. If exists problem (browser shows error message) – customer should change security settings on the primary/secondary machine, until all works fine.

b. Try to establish communication (via Sprinter) with the remote ‘Sprinter Agent’:

i. Define and run test which use the secondary machine for mirroring.

ii. The test startup supposed to end successfully (without any error message).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s