HTTP Status Codes 403 and 500 during script replay (8687 Views)
Reply
Occasional Advisor
Peter95
Posts: 13
Registered: ‎12-11-2011
Message 1 of 10 (8,687 Views)

HTTP Status Codes 403 and 500 during script replay

Hi,

 

I'm new to load runner and was hoping someone may be able to help me determine what causes the above errors to happen.  I created a new script and I was able to go through the process successfully, however, when I tried to replay the scirpt, it came back with a HTTP 403 (Forbidden) code.  Any idea what could be the cause of this type of error?  

 

 

I have another script that was created about 2 months back and was working fine until just the other day.  When I did a replay of this script, I get the HTTP Status code of 500 (Internal Server Error). 

 

What I am trying to understand is why these errors happen on a playback when I would have thought they would have happened during the recording.

 

We are using LR 9.5  

 

Any help would be greatly appreciated.

 

Regards,

Peter

HP Expert
Shlomi Nissim
Posts: 106
Registered: ‎08-15-2009
Message 2 of 10 (8,583 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Hi,

 

HTTP 500 happens usually when the data sent in the HTTP request is invalid causing the server to fail or due to an application bug. In cases like that check whether the same flow, done manually, yields the same error. If it does, it is an application bug. If not, you should make sure your script is valid. I would check whether the dynamic data is well correlated.

 

HTTP 403 error has several variants but the most common is related to wrong or missing certificate in the client side. I would check that first.

 

BTW: LoadRunner documentation includes a reference for all HTTP errors. You can gradually read about it at your own pace. I often find myself going back there :-)

 

Regards,

Visit LoadRunner Linked-In Group: http://www.linkedin.com/groups?about=&gid=1879289

Visit TruClient Linked-In Group: http://www.linkedin.com/groups/HP-TruClient-Software-group-4539324/about
Occasional Advisor
Peter95
Posts: 13
Registered: ‎12-11-2011
Message 3 of 10 (8,570 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Hi Shlomi,

 

Thanks for the feedback.   Where would I go to check if this certificate is wrong or missing?   When I go to the link that it the script replay is failing on, and I log in, it comes back with the following message.

 

The application 'Generic Key Figure Monitor' requires a unique context ID. The context ID is a four-character alphanumeric code that you must enter as the application parameter I_CONTEXT_ID in the starting iView in the Enterprise Portal.

 

Not sure what this means?

 

Regards,

Peter

HP Expert
Shlomi Nissim
Posts: 106
Registered: ‎08-15-2009
Message 4 of 10 (8,566 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Here is a discussion that might help you resolve it: http://forums.sdn.sap.com/thread.jspa?threadID=626031&tstart=3915

 

Regards,

Shlomi

HP LoadRunner Software Linked-In Group

 

Visit LoadRunner Linked-In Group: http://www.linkedin.com/groups?about=&gid=1879289

Visit TruClient Linked-In Group: http://www.linkedin.com/groups/HP-TruClient-Software-group-4539324/about
Frequent Advisor
stormshade69
Posts: 32
Registered: ‎01-03-2012
Message 5 of 10 (8,519 Views)

Re: HTTP Status Codes 403 and 500 during script replay

what i usually do is before i run my scenario i make sure i have a monitoring in place to the servers that im running my test. like Introscope(Wily) you can have a visibility why you have those 400 and 500 errors plus the utilization of the servers your performing tests on...
Occasional Advisor
Peter95
Posts: 13
Registered: ‎12-11-2011
Message 6 of 10 (8,506 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Hi,

 

When I go to re-create a script and then replay it, I am seeing a HTTP 403 Forbidden message.  Then when I go to look in the log, I see a message that says the following:

 

<script>

 <!--

if (EPCM.getUniqueWindowId() != 'WID1325781883684') { alert("An error occured while starting the iView.\nApplication http://lexoep.c-a-m.com:8111/sap/bc/webdynpro/SAP/KEY_FIGURE_MONITOR/;sap-ext-sid=HSgqGbKfZjx23iTDL0...\nwill run with a wrong client window ID!\n\nDo not continue; please report this problem to your administrator.")}EPCM.DSM.registerAll('pcd:portal_content/Z.Cameron/Z.business_packages/Z.manufacturing/Z.roles/Z.ptp_plant_manager/Z.my_job/Z.ptp_plant_management/com.sap.pct.plntmngr.overview/com.sap.pct.erp.plntmngr.overview/com.sap.pct.erp.plntmngr.key_figure_monitor', 'GUSID:HSgqGbKfZjx23iTDL0ixiQ--Sg*pl*aW*KPJ63WnFzQdsw--');

  //-->

</script>

 

Does anybody know what this means? 

 

Thanks,

Peter

Occasional Advisor
Peter95
Posts: 13
Registered: ‎12-11-2011
Message 7 of 10 (8,500 Views)

Re: HTTP Status Codes 403 and 500 during script replay

After the replay and when I double click on the error message HTTP 403(Forbidden), it goes to the first line in this script, but it also references the second line in the error message.  I tried correlating this and it still didn't work. 

 

If this error message is due to correlation, how can I correlate the first line?  I put as LB sap-ext-sid= and RB-- and still it didn't work.  I tried to include the second value but not sure how to include it as well

 

However in this example there is another value Sg*pl*aW*KPJ63WnFzQdsw--_2". 

 

Any help or advice would be greatly appreciated.

 

web_submit_data(";sap-ext-sid=HSgqGbKfZjx23iTDL0ixiQ--Sg*pl*aW*KPJ63WnFzQdsw--_2",
  "Action=http://lexoep.c-a-m.com:8111/sap/bc/webdynpro/SAP/KEY_FIGURE_MONITOR/;sap-ext-sid={WCSParam2}--Sg*pl...",
  "Method=POST",
  "RecContentType=text/html",
  "Referer=http://lexoep.c-a-m.com:8111/sap/bc/webdynpro/SAP/KEY_FIGURE_MONITOR/;sap-ext-sid={WCSParam2}--Sg*pl...",
  "Snapshot=t28.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=SAPEVENTQUEUE", "Value=Custom_ClientInfos~E002Id~E004WD01~E005WindowOpenerExists~E004false~E005ClientURL~E004http~003A~002F~002Flexoep.c-a-m.com~003A8111~002Fsap~002Fbc~002Fwebdynpro~002FSAP~002FKEY_FIGURE_MONITOR~002F~003Bsap-ext-sid~003D{WCSParam2}--Sg~002Apl~002AaW~002AKPJ63WnFzQdsw--~E003~E002ClientAction~E004enqueue~E005ResponseData~E004delta~E003~E002~E003~E001LoadingPlaceHolder_Load~E002Id~E004_loadingPlaceholder_~E003~E002ResponseData~E004delta~E005ClientAction~E004submit~E003~E002~"
  "E003", ENDITEM,
  "Name=sap-charset", "Value=utf-8", ENDITEM,
  "Name=sap-wd-secure-id", "Value=DC8465FD744BFB313B118EADD289F67F", ENDITEM,
  "Name=_client_url_", "Value=", ENDITEM,
  EXTRARES,
  "Url=/sap/public/bc/ur/nw5/1x1.gif", ENDITEM,
  "Url=/sap/public/bc/ur/nw5/themes/sap_tradeshow/common/combobox/ico12_combo.gif?7.11.7.23.0", ENDITEM,
  "Url=/sap/public/bc/webdynpro/ssr/wda_ls_integration_plugin.js?version=20111112-160344", ENDITEM,
  "Url=/sap/public/bc/ur/nw5/themes/sap_tradeshow/common/statusicons/msg/ico12_msg_info.gif?7.11.7.23.0", ENDITEM,
  "Url=/sap/public/bc/WebIcons/ur/default/l/Icon/WarningMessage.gif", ENDITEM,
  "Url=/sap/public/bc/webdynpro/ssr/wda_ls_Integration_Manager.js?version=20111112-160344", ENDITEM,
  "Url=/sap/public/bc/webdynpro/ssr/wda_ls_Integration_Epcm.js?version=20111112-160344", ENDITEM,
  "Url=/sap/public/bc/webdynpro/ssr/wda_ls_Integration_lSapi.js?version=20111112-160344", ENDITEM,
  "Url=/sap/public/bc/ur/nw7/js/classes/Link.js?941405946435", ENDITEM,
  "Url=/sap/public/bc/ur/nw7/js/classes/MatrixLayout.js?941405946435", ENDITEM,
  "Url=/sap/public/bc/ur/nw7/js/classes/Group.js?941405946435", ENDITEM,
  "Url=/sap/public/bc/ur/nw7/js/classes/ScrollContainer.js?941405946435", ENDITEM,
  "Url=/sap/public/bc/ur/nw7/js/classes/ScrollArea.js?941405946435", ENDITEM,
  LAST);

Visitor
davidcezon
Posts: 1
Registered: ‎04-17-2012
Message 8 of 10 (8,248 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Hi,

 

I have same error than you in my script, have you fixed it?

 

Regards,

 

David

Occasional Advisor
Ajay_SPE
Posts: 7
Registered: ‎09-26-2011
Message 9 of 10 (8,234 Views)

Re: HTTP Status Codes 403 and 500 during script replay

Hope you are correlating the session and state management variables properly.

 

Please check them again and try

 

Aj


davidcezon wrote:

Hi,

 

I have same error than you in my script, have you fixed it?

 

Regards,

 

David



davidcezon wrote:

Hi,

 

I have same error than you in my script, have you fixed it?

 

Regards,

 

David




Occasional Visitor
tommy33
Posts: 2
Registered: ‎05-02-2012
Message 10 of 10 (8,173 Views)

Re: HTTP Status Codes 403 and 500 during script replay

The response of that value sap-ext-sid might have a * symbol but this symbol is responded coded. you have to catch the value first with the below bounderies
LB=sap-ext-sid= and RB=&
then you have to use the web_convert_param() with HTML to URL
Remember that the only symbol that will be coverted to URL is the * symbol.
HSgqGbKfZjx23iTDL0ixiQ--Sg*pl*aW*KPJ63WnFzQdsw-
for the example you provide above, I would first copy a section lets say KPJ63WnFzQdsw- and go to the generation log, later I will search for its first occurrance. Here is where you will see the * symbol comes out different and you will also see your bounderies and where you should place your correlation.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.