Connect VTS Server running in SSL mode
trying to connect a vts running with ssl active ("useSSL":true; in configure.json) iI always get the following error message:
pvci = vtc_connect(vts_name, vts_port, VTOPT_KEEP_ALIVE );
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).
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.
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:
- 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).
Bingle (LoadRunner R&D)
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).
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.
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