cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SXPG_COMMAND_EXECUTE failed for BRTOOLS

Former Member
0 Likes
7,541

Hi experts,

I have my SAP ECC in a distributed system (CI and DB nodes are different) on Oracle 11G/ Solaris.

When I try to execute any action in db13, appear the following error:

SXPG_COMMAND_EXECUTE failed for BRTOOLS - Reason: program_start_error: For More Information, See SYS

I follow the SAP Note:  1974030 - How to configure DB13 to work with a standalone Oracle database in Unix/Linux

but I continue with the error

The RFC SAPXPG_DBDEST_HOSTDB works fine but I check in the trace of the proccess is:

LOCATION    SAP-Gateway on host adonis.blumaq.local / sapgw00

ERROR       timeout during allocate

TIME        Tue Sep  9 12:47:24 2014

RELEASE     721

COMPONENT   SAP-Gateway

VERSION     2

RC          242

MODULE      gwr3cpic.c

LINE        2164

DETAIL      no connect of TP sapxpg from host adonisdb after 20 sec

COUNTER     6595

Any idea?

Thanks in advance,

Regards,

View Entire Topic
narukurti
Explorer
0 Likes

1) Please be sure whether the executable sapxpg is located at /sapmnt/SID/exe/sapxpg or not?

2) check SAPXPG_DBDEST_HOSTDB from the application server, from which you are invoking BRTOOLS.

Former Member
0 Likes

1) yes

2) works fine

narukurti
Explorer
0 Likes

As you are sure that RFC is working but program is not executed, the problem seems to be with path only.check following points.

1.Check /usr/sap/<SID>/SYS/exe/run is in path or not ?( in DB host).To check, type set at prompt.

2.If it is in path, then check if you can run sapxpg from anywhere or not?. Simply type sapxpg at prompt.

3.If you can execute sapxpg in DB host simply by typing sapxpg at prompt, modify the RFC in application server(CI or App server) .As shown below

Target host is DB host name.

4) Also check .rhosts file in DB host for the entry <hostname of app server>   <SIDADM>.

5) Also check maximum connection for gateway in app server.

Former Member
0 Likes

Hi,

Thanks for your help.

All points yes, except the point 3)

If I want to work the RFC, I have to put the complete path: /sapmnt/BLP/exe/sapxpg or /usr/sap/BLP/SYS/exe/run/sapxpg

I can execite sapxpg with all users in every location, but, the rsh only work with the complete path too:

rsh <database host> -l <sid>adm /sapmnt/BLP/exe/sapxpg

works fine

rsh <database host> -l <sid>adm sapxpg

does not work


Any idea?


Thanks in advance,

Regards,

alwina_enns
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Victor,

you have already configured the path to sapxpg in the destination, it should be enough. If rsh is working on OS level, but not from SAP system, then it should be checked, if gateway starts rsh. You should activate RFC trace for the destination, activate trace level 2 for gateway, reproduce the error in DB13 and check the traces. You can try to set also the explicit path /usr/sap/BLP/SYS/exe/run/sapxpg to sapxpg in the destination and check if it makes any difference.

Regards,
Alwina

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Victor,

Make a soft link of sapxpg in home directory of SID to point to /usr/sap/BLP/SYS/exe/run/sapxpg

Try with rs command again.

Regards,

Divyanshu

Former Member
0 Likes

Hi,

I tried, and in these case, the problem is can not find the BRCONNECT...

I think the problem is clear, it is trying to execute the commands in a enviorenment without any PATH.

How can solve it? I think create an script sapxpg for load the PATH and execute the sapxpg... could work?

Regards,

alwina_enns
Product and Topic Expert
Product and Topic Expert
0 Likes

it could work, the note "

1842162 - Connection test SM59: Timeout during allocate

describes it

Former Member
0 Likes

I try with a script, but the script do not work with the RFC.

I try to copya the sapxpg and all br* files; and the error is:

BR0152E Environment variable ORACLE_SID is not set

So, the problem is the same, can not detect the PATH when I execute the db13.

Any other idea?

Regards,

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Victor,

In that case you have to set the PATH for exe. The sapxpg soft link should point to the actual in exe for sidadm. Consider checking the .profiles of sidadm user.

Regards,

Former Member
0 Likes

Sorry, I do not understand.

How can add the PATH?

Regards,

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Victor,

1st echo $PATH to see what all locations are added to PATH for sidadm.

To set any new path usr/sap/XYZ, use below commands,

PATH=$PATH:/usr/sap/XYZ

export PATH
By this way you are tell the OS to search for executable at $PATH locations.

Regards

narukurti
Explorer
0 Likes

Hi,

1.Delete the RFC SAPXPG_DBDEST_HOSTDB

2.execute DB13. It will automatically create RFC. If the RFC is created, then test it. If it works, it will work for scheduling.

3. Also check /sapmnt /<SID> is shared on app server or not?

Former Member
0 Likes

but the path is ok for the users blpadm and orablp; the problem is the path when SAP execute db13 by rsh... it does not detect the PATH

Former Member
0 Likes

I did it, but the RFC does not work, because only appear sapxpg and not the complete path.

Reagan
Product and Topic Expert
Product and Topic Expert
0 Likes

If possible do a quick restart of the SAP system and see if that helps.

Regards

RB

alwina_enns
Product and Topic Expert
Product and Topic Expert
0 Likes

DB13 uses the destination SAPXPG_DBDEST_HOSTDB, and to understand, which information is wrong in this destination you should activate traces (RFC and gateway) and check, which information from this destination is used by the gateway and what is missing...

Former Member
0 Likes

It is impossible, the work is 24x7...

I do not think the problem is a restart, I think the problem is the path por rsh

Former Member
0 Likes

Hi,

I activated the trace, where can I check the logs?

Regards,

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Victor,

Then left find the PATH for rsh.

Use; rsh DBHOST echo $PATH


In this way we know where we need to make adjustments.


Regards,

alwina_enns
Product and Topic Expert
Product and Topic Expert
0 Likes

in ST11 transaction on the instance, where you have activated the trace and where you have reproduced the error in DB13, gateway trace is dev_rd and RFC trace dev_rfc. Or in SMGW transaction "Goto --> Trace --> Gateway --> Display File"

Former Member
0 Likes

rsh adonisdb -l blpadm "/usr/bin/echo my path is \$PATH"


the result is "my path is /usr/bin:"

divyanshu_srivastava3
Active Contributor
0 Likes

so, you know why rsh cannot execute sapxpg directly.

Can you try making a softlink from here and see if this helps ?

Former Member
0 Likes

The trace is the same.

GwIRemoteShell: start programm sapxpg on host adonisdb (/bin/rsh)

GwStartProgram: started /bin/rsh, pid=7497

[ 0]: /bin/rsh

[ 1]: adonisdb

[ 2]: sapxpg

[ 3]: adonis.blumaq.local

[ 4]: sapgw00

[ 5]: 66122614

[ 6]: GWHOST=adonis.blumaq.local

[ 7]: GWSERV=sapgw00

[ 8]: CONVID=66122614

[ 9]: pf=/usr/sap/BLP/SYS/profile/BLP_DVEBMGS00_adonis

[10]: CPIC_TRACE=2

[11]: IDX=2

[12]: DT_ROOT_ID=00000000000000000000000000000000

[13]: DT_CONNECTION_ID=540F3DA5EE5F5392E1000000C0A8018E

[14]: DT_CREATOR_ID=

[15]: SNC_MODE=0

*** trace switched off ***

bash: sapxpg: command not found

bash: sapxpg: command not found

Can not find sapxpg if I not put the complete PATH... or the same, can not find sapxpg because it have not the variable PATH

Former Member
0 Likes

I try it, and the error is can not find the brconnect

If I do a softlink of all br* the problem is

BR0152E Environment variable ORACLE_SID is not set

because seems does not load the enviornment of blpadm

alwina_enns
Product and Topic Expert
Product and Topic Expert
0 Likes

and if you logon to DB server, can you see (access) sapxpg program in the path /sapmnt/BLP/exe/sapxpg ?

divyanshu_srivastava3
Active Contributor
0 Likes

When you do rsh.. what is the shell used ?

What are the env variables ?

Regards,

Former Member
0 Likes

how can check it?

Former Member
0 Likes

of course!!

divyanshu_srivastava3
Active Contributor
0 Likes

echo $SHELL is standard unix/linux command.

Former Member
0 Likes

blpadm> rsh adonisdb -l blpadm echo $SHELL

/usr/bin/bash

divyanshu_srivastava3
Active Contributor
0 Likes

The Victor,

The Shells are same, can you check again that again ?

As session in not interactive, I would say check dot .profile of sidadm user and look for ORACLE_SID variable. If It't not there then set it.

Regards,

Former Member
0 Likes

In the .profile there are not any variable related with ORACLE neither SAP

Regards,

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Victor,

Check the .profile of sidadm user for bash shell, should be in /home/sidadm and add the above parameter and see if this helps.

Make sure you tale a backup of this .profile before editing.

Regards

Former Member
0 Likes

I added the ORACLE_SID but the error is the same...

divyanshu_srivastava3
Active Contributor
0 Likes

Echo $ORACLE_SID using rsh

Former Member
0 Likes

in blank... it does not return nothing:

blpadm> rsh adonisdb -l blpadm "/usr/bin/echo \$ORACLE_SID"

blpadm> rsh adonisdb -l blpadm "/usr/bin/echo \$PATH"

/usr/bin:

Regards,

divyanshu_srivastava3
Active Contributor
0 Likes

now set ORACLE_SID using rsh.. see if that helps

Former Member
0 Likes

how??

divyanshu_srivastava3
Active Contributor
0 Likes

2 options.

1st goto /etc/environment and set the ORACLE_PID

2nd execute export ORACLE_SID=BLP using rsh.

Regards

Former Member
0 Likes

I have not the first option.

The second option, how export ORACLE_SID using rsh? I do not undertand your goai.

divyanshu_srivastava3
Active Contributor
0 Likes
rsh adonisdb -l blpadm "export ORACLE_SID=BLP; echo $ORACLE_SID"


I am not sure the above syntax is 100% correct. However,by doing this I am trying to set ORACLE_PID in env for rsh.

Former Member
0 Likes

blpadm> rsh adonisdb -l blpadm "export ORACLE_SID=BLP; echo $ORACLE_SID"

BLP

divyanshu_srivastava3
Active Contributor
0 Likes

Now check the blpadm> rsh adonisdb -l blpadm "echo $ORACLE_SID"

and same for sapxpg.

Former Member
0 Likes

Not, appear:

blpadm> rsh adonisdb -l blpadm "export ORACLE_SID=BLP; echo $ORACLE_SID"

BLP

blpadm> rsh adonisdb -l blpadm "/usr/bin/echo \$ORACLE_SID"

blpadm>

divyanshu_srivastava3
Active Contributor
0 Likes

Hi Vicotr,

We have to set this in either ~/.bash_profile,  ~/.bash_login,~/.profile or ~/.bashrc.  

If this is set, everything will work.

You can test this with below command:


blpadm> rsh adonisdb -l blpadm "export ORACLE_SID=BLP; sapxpg"

Regards,

Divyanshu

Former Member
0 Likes

But is it in solaris? I have any files... only I have .profile in the $HOME

divyanshu_srivastava3
Active Contributor
0 Likes

One more try.

Goto /etc/profile and add export ORACLE_SID=BLP.

This would be global in nature.

Former Member
0 Likes

Nothing:

blpadm> rsh adonisdb -l blpadm "echo \$ORACLE_SID"

blpadm> rsh adonisdb -l blpadm "echo \$TERM"

dumb

blpadm> rsh adonisdb -l blpadm "echo \$SHELL"

/usr/bin/bash

divyanshu_srivastava3
Active Contributor
0 Likes

..

Let me check with some UNIX admin.

Former Member
0 Likes

Lot of thanks!!!!