Error: "Failed to open new connection to server (server_name)"

  • KM1189977
  • 29-Jun-2011
  • 25-Sep-2013

Summary

SAPGUI script fails with connection errors during replay when usin SAP Client 7.20 patch 3: Error: "Failed to open new connection to server"

Error

The following error message is shown in the Replay Log for a sapgui_open_connection_ex step :

Starting action vuser_init.
vuser_init.c(12): Error: Failed to open new connection to server "XXX"
vuser_init.c(12): Error: Failed to get active window
vuser_init.c(12): Error: Failed to find SapGui component by ID "sbar."
vuser_init.c(12): Error: Failed to get the status bar text
vuser_init.c(12): Error: Failed to get active window
Abort was called from an action.

Cause

The SAPGUI 7.20 Patch 3 version was released on October 15, 2010 and contains a bug that causes most scripting solutions to fail. For this reason this patch release should not be used with LoadRunner or Performance Center.

Fix

Install a later SAPGUI client release such as SAPGUI 7.20 with Patch 4 to resolve these replay errors.

Verify that you are able to record and replay the Business Process using the SAP GUI Scripting API. For more information Check the article "how to verify if the SAPGUI scripting functionality is working correctly": KM1160850. Also, check that the configuration of the SAP Environment is correct according to the “How to Configure the SAP Environment” section of the HP LoadRunner Virtual User Generator User Guide.