cancel
Showing results for 
Search instead for 
Did you mean: 

How to create sap router service in Windows 2012

Former Member
0 Kudos

Hi All

Can you help me to create a sap router service in Windows 2012 R2 Std 64 bit?

My SAP Router Version is 740.

SAPRouter.exe patch is D:\SAPRouter\USR\SAP\SAPRouter

Routtab path is D:\SAPRouter\USR\SAP\SAPRouter

And please clarify this saprouter will be compatible with our running SAP ECC6.0 7.0 ?

or  SAP Router version will be depended on SAP ECC6.0?

Note: We have installed and built SAP Router in separate stand lone machine with Windows 2012 R2 64 bit version. Previous it was in other machine with Windows 2003 R2 32 bit version.

Thanks in advance

Sel

Accepted Solutions (1)

Accepted Solutions (1)

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Sel,

Any saprouter version should be compatible with any ECC version.

Regarding creating the service, have you tried using the command below (see SAP note 30289)?

ntscmgr install SAProuter -b D:\SAPRouter\USR\SAP\SAPRouter\saprouter.exe -p "service -r -R D:\SAPRouter\USR\SAP\SAPRouter\saprouttab"

--> notice it should be all in one line;

--> execute it while logged on as a local administrator, and at a command prompt started as administrator

Regards,

Isaías

isaias_freitas
Advisor
Advisor
0 Kudos

Hi,

Forgot to mention. After that, you need to open the "services" and start the service.

If everything is well with the service, you can change its startup to automatic.

Regards,

Isaías

Former Member
0 Kudos

Hi Isaías

Thank you for your response.

I run the command, but it gives the following error. 

'ntscmgr' is not recognized as an internal or external command,

operable program or batch file.

I think there is sc.exe command in Windows 2012, Please confirm.

Thanks

Sel

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Sel,

I just tested this on a Win2012. It works for me.

Notice that:

- you need to use a command prompt (cmd), not a "power shell";

- the command prompt has to be started as administrator (right click, run as administrator).

Regards,

Isaías

Former Member
0 Kudos

Dear Isaías

I used cmd (command prompt) itself in Administartor mode(run as administrator).

Can you please check is there any option to install 'ntscmg' in Windows 2012 R2 Std 64 bit version.

Thanks

Sel

Matt_Fraser
Active Contributor
0 Kudos

Try "scmgr" instead of "ntscmgr".

isaias_freitas
Advisor
Advisor
0 Kudos

Hello,

This is strange...

One of the test systems runs Windows 2012, and the "ntscmgr" tool is present.

I checked on other two tests systems (Windows 2012 and 2012 R2), and they do not have the tool.

I'll try to find out how to install it on Win2012.

Regards,

Isaías

Matt_Fraser
Active Contributor
0 Kudos

Ah, I made a mistake in my earlier comment about "scmgr." It should be just "sc."

I always thought ntscmgr was something that came with the SAP installation. However, the equivalent tool that is native to Windows is sc. For instance, you can use "sc create" for much the same functionality as "ntscmgr -install."

So, on my Win2012R2 boxes that don't (yet) have anything from SAP installed, there is no ntscmgr, but there is sc. On my boxes where SAP is installed, ntscmgr exists.

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Matt,

You've nailed it .

I just confirmed... "ntscmgr" is at my SAP kernel folder.

"sc" is present at the "\windows\system32".

I always thought that "ntscmgr" was a Windows tool, like "sc".

OK, so, the "sc" command would be:

sc create SAPRouter binPath="D:\SAPRouter\USR\SAP\SAPRouter\saprouter.exe -r -R D:\SAPRouter\USR\SAP\SAPRouter\saprouttab"

(all in one line)

Regards,

Isaías

Former Member
0 Kudos

Thank You Isaías.

It is resolved now. The SAPRouter service is running fine now.

But the SAPOSS connection could not be established.

Steps to reproduce the issue:

logged into SAP

run the tcode SM59

select SAPOSS rfc

click on Test Connection

It gives the following error:

LogonConnection Error
Error DetailsError when opening an RFC connection (LB: Hostname or service of the message ser
Error DetailsERROR: The connection to the specified message server (/H/172.16.7.10/S/sapdp
Error DetailsLOCATION: SAP-Server ASTASM_ASM_00 on host ASTASM (wp 6)
Error DetailsCOMPONENT: MS (message handling interface, multithreaded)
Error DetailsCOUNTER: 160
Error DetailsMODULE: msxxi.c
Error DetailsLINE: 2783
Error DetailsRETURN CODE: -35
Error DetailsSUBRC: 0
Error DetailsRELEASE: 721
Error DetailsTIME: Sat May 30 02:09:31 2015
Error DetailsVERSION: 4

Please help me to resolve this too.

Thanks

Sel

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Sel,

I believe it is better to create a new thread to ask for assistance with a different issue.

Otherwise, this thread will become "a mess" .

You should also mark this thread as answered...

Cheers!

Isaías

Former Member
0 Kudos

And Please clarify me if the distinguish name to be mentioned in the command?

Former Member
0 Kudos

Dear Isaías


Thank you for your quick responses and correct answers.

Can you please clarify me if the distinguish name to be mentioned in the command?


Thanks in advance

Sel

Answers (3)

Answers (3)

former_member185239
Active Contributor
0 Kudos

Hi Sel,

Have you check the sapnote http://service.sap.com/sap/support/notes/41054

With Regards

Ashutosh Chaturvedi

former_member185239
Active Contributor
0 Kudos

Hi del,

Follow the sapnote525751 - Installation of the SNC SAPRouter as NT Service

With regards

Ashutosh chaturvedi

frank_haecker
Discoverer
0 Kudos

Hi,

SAP "NOTE 525751 - Installation of SNC SAPRouter as NT Service" is a little bit buggy.

I faced the problem that the installed SAPRouter Service does not used the defined Environment Variables SECUDIR  and SNC_LIB for the User who shoud run the SAPRouter windows service. So I got an error by starting the SAPRouter Service.

*****************************************************************************

*

*  ERROR       SNC processing failed:

*              SncInit

*

*  TIME        Thu Jul 28 17:57:50 2016

*  RELEASE     742

*  COMPONENT   NI (network interface)

*  VERSION     40

*  RC          -17

*  MODULE      D:/depot/bas/742_REL/src/base/ni/nisnc.c

*  LINE        553

*  DETAIL      NiSncInit: sncrc=-1

*  COUNTER     4

*

*****************************************************************************

My solution at first was to set the Variable SNC_LIB as "System Variable" at the System Environment but this is a dirty solution so I searched for a better solution.

This is my solution:

<SAPROUTER-User>  ---> Windows Account which should be used to run the SAPRouter as Windows Service

Set at the User Environment  (Windows: "Advanced system settings" --> "System Properties" --> "Environment Variables") of the <SAPROUTER-User> the following Variables:

SECU_DIR=   e.g.  d:\usr\sap\saprouter\pse

SNC_LIB=     e.g.   d:\usr\sap\saprouter\nt-x86_64\sapcrypto.dll

delete old SAPROUTER Windows Service

c:\> sc delete SAPRouter

Install SAPROUTER Service with following Parameters

c:\> sc create SAPRouter type= own start= auto binPath= "<path>\saprouter\saprouter.exe service -r -W 60000 -R <path>\saprouter\saprouttab -G <path>\saprouter\log\log -T <path>\saprouter\log\trace -D  -K \"p:<your_distinguished_name> \" obj= "<Domain>\<SAPROUTER-User>" DisplayName= "SAPRouter" password= <Password-of-SAPROUTER-User>

e.g.

C:\> sc create SAPRouter type= own start= auto binPath= "D:\usr\sap\saprouter\saprouter.exe service -r -W 60000 -R d:\usr\sap\saprouter\saprouttab -G d:\usr\sap\saprouter\log\log -T d:\usr\sap\saprouter\log\trace -D -K \"p:CN=SAPROUTERSERVER, OU=SAPCUSTOMERNUMBER, OU=SAProuter, O=SAP, C=DE\" "  obj= "SAPROUTERSERVER\SAPROUTER-User" DisplayName= "SAPRouter" password= XXXXXXXX

And now the SAP Router Windows Service start without any failure.

By the way I figgured out that in newer Windows Server releases you can "Escape"  the Char ' " ' quotation with the at Unix and Linux good known Char '\'  (Backslash) .

The Problem with the "  for the SNC distinguished_name can be solved by using \"p:<your_distinguished_name> \"  at the sc create binPath String.

The "SAP Note 618053 - sc.exe replaces ntscmgr.exe" is buggy.

...

  • double quotation marks within a parameter need to be entered twice. Example:
    binPath= "c:\test.exe -p parameter""containing""quotationMarks"

...

It does not work for me  but

the following worked for me

binPath= "c:\test.exe -p parameter\"containing\"quotationMarks"

I faced the problems an find the solutions on Windows Server 2008R2 x86_64. 

Kind Regards

Frank Häcker

Sriram2009
Active Contributor
0 Kudos

Hi Sel

You can refer the SCN thread about your query's 

BR

SS