Java Protocol Common Recording Problems

Java Protocol Common Recording Problems

Problem 1: NOT PROXIED error in the recording events log.

Diagnosis: This error occurs when there is some sort of spyware/parasite software installed on the system. We have seen this behavior with Google Desktop Search agent, huntbar etc.

Steps to troubleshoot:

1. Use process explorer to get the list of dlls getting hooked into Internet Explorer.

2. Compare the list with the dlls from a machine where we can record. Most cases it should give a clue.

3. Run Ad-Aware software. To download this, visit http://www.lavasoftusa.com/software/adaware/. This usually eliminates the spyware programs.

4. Make sure to check carefully the processes running on the machine. If you find any suspicious DLL\exe, just google the name and see if it’s a known spyware. If so, uninstall the software related to this DLL\executable.

5. Sort the list of DLLs by ‘Path Name’ in Process Explorer. The DLLs to scrutinize carefully are the ones which are not located in LoadRunner\bin and c:\windows\system32 or c:\winnt\system32.

Problem 2: "Cannot connect to remote server" in the recording log

Diagnosis: Probably the communication from this server and on that particular port should not be filtered

Steps to troubleshoot:

Try port mapping if it is a HTTPS site.

Go to Recording Options > Port Mapping and add the Target Server’s IP address, Port Number as 443, Service ID as HTTP, Connection Type as SSL. Make sure "Test SSL" returns success. Change the SSL Ciphers and SSL Version to achieve success for "Test SSL". Refer to KB: 21919 in order to identify these.

Problem 3: "Connection prematurely aborted by the client" error in the recording log.

Diagnosis: Probably the communication from this server and on that particular port should not be filtered

Steps to troubleshoot: Try port mapping with Direct Trapping. Here’s how we can do direct trapping

a. Enable the Direct trapping option:

[HKEY_CURRENT_USER\Software\Mercury Interactive\LoadRunner\Protocols\WPlus\Analyzer]

"EnableWSPDebugging"=dword:00000001

"ShowWSPDirectTrapOption"=dword:00000001

"EnableWSPDirectTrapping"=dword:00000001

b. Before Recording Multi-Web, add port mapping entries for HTTP/TCP (and NOT SSL) connections.

Set their ‘Record Type’ from ‘Proxy’ to ‘Direct’.

c. Start recording.

Problem 4: Application sends a "Client Side" certificate to the server and waits for server authentication.

Diagnosis: As LoadRunner sits in between the client and server, we take this certificate information from the client and pass it on to the server. So, we need to have the certificate in .pem format.

Steps to troubleshoot: Use openSSL to convert the client side certificate to .pem format and add it in the port mapping in recording options

In Internet Explorer:

Choose Tools > Internet Options. Select the Content tab and click Certificates.

Select a certificate from the list and click Export.

Click Next several times until you are prompted for a password.

Enter a password and click Next.

Enter a file name and click Next.

Click Finish

In Netscape:

Choose Communicator > Tools > Security Info.

Click on the Yours link in the Certificates category in the left pane.

Select a certificate from the list in the right pane, and click Export

Enter a password and click OK.

Enter a filename and save the information.

The resulting certificate file is in PKCS12 format. To convert the file to PEM format, use the openssl.exe utility located in the LoadRunner bin directory. To run the utility:

Open a DOS command window.

Set the current directory to the LoadRunner bin directory.

Type openssl pkcs12 -in <input_file> -out <output file.pem>

Enter the password you chose in the export process.

Enter a new password (it can be the same as before).

Enter the password again for verification.

In Recording Options > Port Mapping > check the option for "Use specified client side certificate" and point to the saved .pem file.

Problem 5: Server sends a certificate to the client for authorization and only when authorized by the client a connection can be established between the client and server. This is mostly true for Java based applications. The error we get is "No trusted certificate found"

Diagnosis: Since the recorder is in between client and server, we should authorize the certificate from the server. So, our wplusca.crt should be in the server’s certificate repository.

Steps to troubleshoot:

Copy wplusca.crt file into the certificate repository of the server.

1. Locate keytool.exe executable (usually under JRE_ROOT\bin directory).

2. Add its directory to the PATH environment variable.

3. Locate cacerts file (with no extension) under JRE_ROOT\lib\security directory.

4. Copy the attached cacert.pem to this directory.

5. Make this to be the current directory in the command prompt.

6. Execute:

keytool -list -keystore cacerts

7. It will ask you for the password, reply:

"changeit"

8. It will list all the CA certificates installed (usually 25).

Notice the number of certificates.

9. Execute:

keytool -import -file cacert.pem -keystore cacerts -alias mercuryTrickyCA

10. It will ask you for the password, reply:

"changeit"

11. It will ask you if you are sure you want to add the certificate to the store, reply:

"yes"

12. Execute:

keytool -list -keystore cacerts

13. It will ask you for the password, reply:

"changeit"

14. It will list all the CA certificates installed.

The number of certificates should be bigger by 1

Problem 6: The recording log does not indicate any error but the connection between the client & Server has ended abruptly. This could happen possibly due to the ‘WPLUSCA’ certificate with a private key

Diagnosis: The recorder sends the ‘WPLUSCA’ certificate with a private key to the server for authentication while recording.

Steps to troubleshoot:

1. Go to LoadRunner\bin\certs and make a copy of the WPlusCA.crt file.

2. Open it in a notepad

3. Delete the portion between "Begin RSA Private Key" and "End RSA Private Key"

4. Save the file.

5. Now right click the file and choose "Install certificate" and follow the on screen instructions.

This will now send a certificate without the private key and if the server accepts the communication will continue.

Problem 7: "Failed to resolve hostname" error in the recording log

Diagnosis: If vugen box is not able to resolve the server name that is given in URL, it throws this error in the recording log and then crashes the IE

Steps to troubleshoot: Modify hosts file on the vugen machine with server name and any IP address

Advertisements

One thought on “Java Protocol Common Recording Problems

  1. Tiaan

    Hi, wonder if could help me.
    I need to do hooking for java record and play. But i never have done it before.
    If you could assist me with a example or something. On how a hooking is created and put into jave record and play.

    Regards,
    Tiaan

    Reply

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