cancel
Showing results for 
Search instead for 
Did you mean: 

http -> XI -> R/3 (http2rfc) scenario giving 401 unauthorized error

Former Member
0 Kudos

Hi,

I am new to SAP world. I am following this blog to /people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit

to test http2rfc scenario to make a BAPI call in r/3. I am getting following error message:

<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>

<SAP:P1>401</SAP:P1>

<SAP:P2>Unauthorized</SAP:P2>

(Got this using SXMB_MONI) in XI system)

My congifuration of the scenario is correct as I tested in the configuration tool. Also, the request in SXMB_MONI looks correct.

Any help would be greatly appreciated.

Thanks,

Paresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Then supply details of any other service user which have APPL_SERV kind of Role

Former Member
0 Kudos

Hey Bipin,

Currently I have PIAPPLUSER for

Expand sap -- > xi -- > engine >logon data

I have checked that password is correct and user is unlocked. Also this user has the role of SAP_XI_APPL_SERV_USER role.

Former Member
0 Kudos

Still no luck...

Any more ideas?

Former Member
0 Kudos

Hi -

Use report 'rsusr006' in from SE38 to check for locked users - especially PIAFUSER which is used to make a connection from the integration engine to the adapter engine. Double check PIAFUSER's password as well - test that you can log on to the sapgui/abap stack with PIAFUSER.

Regards,

Jin

Former Member
0 Kudos

Hi Jim,

Thanks for your input. PIAFUSER was not locked (no users were locked) and I could log on to sap gui with PIAFUSER's credential.

In transaction SICF when I double click on

defualt_host > sap > xi > engine

I have following info under logon data:

Client: XI Server Client

User: PIISUSER

I have the same user in exchangeProfile under "Integration Server".

PIAFUSER is specified for "Adapter Framework"

Do you see anything wrong with this configuration?

Any help will be greatly appreciated.

Thanks,

Paresh

Former Member
0 Kudos

Hi Paresh -

Your SICF settings for the <i>.../sap/xi/engine</i> service should not have anything to do with this error since you're able to receive the message into the Integration Server and look at the message in SXMB_MONI. If there was a problem here, you wouldn't be able to monitor the message in MONI. Just curious, in MONI, in what pipeline step is the error occurring. Is it in Technical Routing or Call Adapter?

At this point, my guess is that your call to the adapter engine (where the rfc adapter resides) is where this error is occurring. Do you have access to the J2EE Visual Admin tool so that you can look at the defaultTrace files in the log viewer for any more clues. You can also access the defaultTrace files directly in the file system if you have access (under .../j2ee/cluster/server0/log).

Jin

Former Member
0 Kudos

Hi Jin,

I am getting error in Call Adapter section. Can you please tell me what exactly that means?

Thanks for your help

Following is the trace from the moni...

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">

<Trace level="1" type="T">Party normalization: sender</Trace>

<Trace level="1" type="T">Sender scheme external = XIParty</Trace>

<Trace level="1" type="T">Sender agency external = http://sap.com/xi/XI</Trace>;

<Trace level="1" type="T">Sender party external =</Trace>

<Trace level="1" type="T">Sender party normalized =</Trace>

<Trace level="1" type="B" name="CL_XMS_HTTP_HANDLER-HANDLE_REQUEST" />

- <!-- ************************************

-->

<Trace level="1" type="T">XMB was called with URL /sap/xi/engine?type=entry</Trace>

<Trace level="1" type="T">COMMIT is done by XMB !</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS" />

- <!-- ************************************

-->

<Trace level="1" type="B" name="CL_XMS_MAIN-SET_START_PIPELINE" />

- <!-- ************************************

-->

<Trace level="1" type="B" name="SXMBCONF-SXMB_GET_XMB_USE" />

<Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV" />

<Trace level="1" type="T">****************************************************</Trace>

<Trace level="1" type="T">* *</Trace>

<Trace level="1" type="T">* *</Trace>

<Trace level="1" type="T">XMB entry processing</Trace>

<Trace level="1" type="T">system-ID = XI</Trace>

<Trace level="1" type="T">client = 020</Trace>

<Trace level="1" type="T">language = E</Trace>

<Trace level="1" type="T">user = XISUPER</Trace>

<Trace level="1" type="Timestamp">2007-01-04T23:16:20Z CET</Trace>

<Trace level="1" type="T">* *</Trace>

<Trace level="1" type="T">* *</Trace>

<Trace level="1" type="T">****************************************************</Trace>

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE">

<Trace level="1" type="T">Message-GUID = 960DE4009C4911DBB8590017A4A7EA1A</Trace>

<Trace level="1" type="T">PLNAME = CENTRAL</Trace>

<Trace level="1" type="T">QOS = BE</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" />

- <!-- ************************************

-->

<Trace level="1" type="T">Get definition of external pipeline CENTRAL</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />

<Trace level="1" type="T">Corresponding internal pipeline SAP_CENTRAL</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

- <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">

- <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">

<Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>

<Trace level="1" type="T">Cache Content is up to date</Trace>

</Trace>

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

- <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">

- <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">

<Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>

<Trace level="1" type="T">Cache Content is up to date</Trace>

</Trace>

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

- <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">

- <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV">

<Trace level="1" type="T">number of receivers: 1</Trace>

<Trace level="1" type="T">Single-receiver split case</Trace>

</Trace>

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

- <Trace level="1" type="B" name="PLSRV_MAPPING_REQUEST">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">

- <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV">

<Trace level="1" type="T">Interface Mapping urn:http2rfc/xi IM_CompanyID_To_BAPI</Trace>

</Trace>

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

- <Trace level="1" type="B" name="PLSRV_OUTBOUND_BINDING">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">

<Trace level="1" type="B" name="CL_XMS_PLSRV_OUTBINDING-ENTER_PLSRV" />

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

<Trace level="1" type="B" name="PLSRV_CALL_ADAPTER" />

- <!-- ************************************

-->

- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">

<Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />

- <!-- ************************************

-->

- <Trace level="1" type="B" name="CL_XMS_PLSRV_IE_ADAPTER-ENTER_PLSRV">

- <Trace level="1" type="B" name="CL_XMS_PLSRV_CALL_XMB-CALL_XMS_HTTP">

<Trace level="1" type="System_Error">HTTP-client: error response= <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Error Report</title> <style> td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;} A:link A:visited A:active </style> </head> <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>&nbsp;&nbsp;401 &nbsp Unauthorized</b></font></td> </tr> <tr bgcolor="#3F73A3"> <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td> <td height="23"><img width=1 height=1 border=0 alt=""></td> <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/7.00&nbsp;</b></font></td> </tr> <tr bgcolor="#9DCDFD"> <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td> </tr> </table> <br><br><br><br><br><br> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>&nbsp;&nbsp;Authentication did not succeed.</b></font></td> </tr> <tr bgcolor="#FFFFFF"> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><b>&nbsp;&nbsp;Details:</b></font></td> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><pre>&nbsp;&nbsp;No details available</pre></font></td> </tr> </body> </html></Trace>

</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

</Trace>

<Trace level="1" type="T">SystemError message generated. Guid: F4A40666B2A12449A7D4C0FFF841E1CD</Trace>

<Trace level="1" type="T">Error during execution of message : 960DE4009C4911DBB8590017A4A7EA1A</Trace>

<Trace level="1" type="T">ApplicationMessage was (=RefToMsgId): 960DE4009C4911DBB8590017A4A7EA1A</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

- <!-- ************************************

-->

</SAP:Trac

Former Member
0 Kudos

Hi Paresh -

The call to the adapter engine seems to be failing. I had it backwards before - it's the PIISUSER that is used to make the call from the integration engine (IE) to the adapter engine (AE). The PIAFUSER is used when the AE calls the IE.

Can you turn up the runtime TRACE_LEVEL to see if you get anymore info. Go to SXMB_ADM, then Integration Engine Configuration-->Change Specific Configuration Data. Then either change or add a new entry for category RUNTIME, parameter TRACE_LEVEL (no Subparameter), current value to 3.

When pasting the trace, you can just do it starting from the following line:

"<Trace level="1" type="B" name="PLSRV_CALL_ADAPTER" /> "

regards,

jin

Former Member
0 Kudos

Hi Jin,

WIth all the changes in the config, I think something got messed up and now I can not even see the log in SXMB_MONI. As soon as I fix that I will post the trace as per your recommendation.

Thanks,

Paresh

Former Member
0 Kudos

Hey Jin,

I just noticed something very interseting:

In RWB under message monitoring I see the status as successfull for both inbound and outbound messages that I tested today. How ever there is no record on SXMB_MONI.

Previous error messages (that were getting logged yesterday) in SXMM_MONI are there in RWB message mointoring with status of error.

Does this means that i have some setting in SXMB_MONI to not log successfull messages and my problem is solved or its just a false alarm? I did change the log/trace settings as per your recommedation, do you think it has something to with it. Just FYI I deleted it and still can not see any message.

Thanks,

Paresh

Former Member
0 Kudos

Hi Paresh -

Is this a sync scenario? If so, successful sync messages will not get logged in the message monitor (SXMB_MONI) unless the parameter RUNTIME|LOGGING_SYNC is set to 1.

So yes, it could be that your scenario is working if it's a sync scenario.

Jin

Message was edited by:

Jin Shin

Former Member
0 Kudos

Hey Jin,

Thanks a lot for your help. After making the changes, I could successfully see the processed message.

I would also like to thank all the other members for their suggestions.

Thanks,

Paresh

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Did you go through Krishna Moorthy's blog?

<a href="/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi:///people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi

Regards,

Smitha.

Former Member
0 Kudos

Hi Paresh,

Try the following .

Logon to your SAP GUI

Enter TCode SICF

Expand sap -- > xi -- > engine

Double click on engine

In the Anonymous logon data enter details of XIISUSER

Save and Exit.

Former Member
0 Kudos

Hi Bipin,

I just checked in the XI System and I do not have XIISUSER. Can i use XISUPER? If not, then I would greatly appreciate if you can let me know what roles/profiles this user would need.

Thanks,

Paresh

udo_martens
Active Contributor
0 Kudos

Hi Paresh,

i dont think, it is the HTTP connection to XI, coz you see the message in SXMB_MONI and not the RFC connection from XI connection, coz HTTP fault. Plz execute transaction SLDCHECK, to find out the reason.

Regards,

Udo

Former Member
0 Kudos

Hi UDO,

I ran the SLDCHECK and everything was successfull.

Can something be wrong in ICF settings?

Former Member
0 Kudos

Hi,

1. Try restarting the Queue

2. Check the parameters in the RFC adapter. Does the user have allt he authorization

Regards

vijaya

Former Member
0 Kudos

This blog may help you

/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi

Former Member
0 Kudos

Hi,

Try to test Using Compoenent Monitoring in your scenario.

go to RWB -> CC->Integration Engine -> Test messages

enter the input details and copy the payload and send the message ..try how it works.

HTTP_RESP_STATUS_CODE_NOT_OK - this is problem in your HTTP Client the User might locked or password may be wrong.

Regards,

Venu.

Former Member
0 Kudos

Hi Venu,

That's how I am testing and it is able to send the message. But when I check in the SXM_MONI I see that error.