Highlighted
Super Contributor.
Super Contributor.
2042 views

Connect VTS Server running in SSL mode

Hi all,

trying to connect a vts running with ssl active ("useSSL":true; in configure.json) iI always get the following error message:

Request:

pvci = vtc_connect(vts_name, vts_port, VTOPT_KEEP_ALIVE );

Response:

Error: vtc_connect: Failed to connect server. Please check the server name, port number, network connectivity or whether server above 11.52 version is started.

The VTS version is 12.53. I can access the GUI with https://<ServerName>:<ServerPort> in web browser (IE).

Some ideas?

Best regards

Christoph Richter

0 Likes
10 Replies
Highlighted
Super Contributor.
Super Contributor.

Hi,

When you connect to VTS manually via your browser, are you connecting to it from the injector that your script is running on?  I had similar issues and had to open the firewall ports up for each injector / controller (if running localhost?).

I'm only connecting via HTTP.  I presume you are sending sensitive data?  If not, I'd maybe try http as I've not had any connectivity issues using that protocol.

J

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Hello, Richter, 

Have you checked that VTS server is running correctly?

 To enable SSL connection on VTS,  beside set useSSL to true, you also need to set the certificate and privateKey in configure.json

Here are detailed steps:

  • Open command window with admin privilege and change to VTS directory:
cd C:\Program Files\HP\VTS\web

 

  • Run openssl command to create certificate and private key file:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 

Openssl will prompt for the settings, just follow it.

 

  • Now you will see cert.pem and key.pem at the directory. Modify your configure.json to include them:

 

       "useSSL": true,

       "certificate": "cert.pem",

       "privateKey": "key.pem"

  

 

  • Since the server will ask for certificate pass phrase in interactive mode when run in SSL mode, we can’t run it as service. The workaround is Stop your VTS service and run:
node main.js  

 

  • If you see following prompt:
System initialize

gc start

Enter PEM pass phrase:

Just input the pass phrase you have set when create the certificate with openssl. Now VTS should be launched in SSL mode, and could be access both from browser UI or VTC API(Access from script Enabled).

 

Regards,

Bingle (LoadRunner R&D)

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Hi BingleW,

thank you for your support.

Running with your solution, i could start only one instance (main instance). Trying to open additional instances, i could not start any other instance.

In a second try i did use .cert - certificates instead of .pem and in a third try i did use .pem - certificates without Passphrase. In both configurations i could connect to the main instance from script, but not to running additional instances (see attached ScreenShots).

 

Regards, Christoph

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Hi, Christoph,

Thanks for update, I’ve tried the scenario,  Looks like we have a bug here:

--When run VTS in SSL mode, API access failed to connect to new instance.  

I’m checking the issue, but haven’t find a quick solution yet.

Thanks again for your findings.

 

Regards,

Bingle

 

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi BigleW,

 

do you have some news regarding the described problem?

 

Regards, Christoph

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Hi, Christoph,

Sorry for late reply.

By our investigation, the SSL mode is only for Admin UI,  not supported by API mode yet. 

Regards,

Bingle

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Hi Bingle,

as if I understand you correct, i can use SSL mode for different instances only in the UI but if i like to use the VTS in LoadRunner-Scripts i have to disable SSL? IfSSL is disabled, everyone (human and script) can use the UI and read/write tables in different instances. While SSL is enabled a script can use only the main instance for read/write tables.

Will there be an update to make the VTS more usable?

Or should i open a servicecall to HP?

 

Best Regards, Christoph

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Hi, Christoph,

This will be an enhancement request. you can help to push it. 

Regards,

Bingle

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Hi,

an enhancement request was opened with id QCCR1J89479.

https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/LID/QCCR1J89479

Regards, Christoph

0 Likes
Highlighted
Super Contributor.
Super Contributor.

According to MicroFocus Support, the problem will be fixed in LoadRunner version 12.56.

(see attached png)

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.