cancel
Showing results for 
Search instead for 
Did you mean: 

Connect JCO using the SAPRouter string

Former Member
0 Kudos

Actually I am trying to connect from JCO to SAP using SAP Router, but I have the following message :

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed

Connect_PM GWHOST=200.106.139.84, GWSERV=sapgw00, ASHOST=200.106.139.84, SYSNR=00

LOCATION CPIC (TCP/IP) on local host

ERROR partner not reached (host 200.106.139.84, service 3300)

TIME Fri Apr 28 10:06:20 2006

RELEASE 640

COMPONENT NI (network interface)

VERSION 37

RC -10

MODULE nixxi_r.cpp

LINE 8634

DETAIL NiPConnect2

SYSTEM CALL SiPeekPendConn

ERRNO 10060

ERRNO TEXT WSAETIMEDOUT: Connection timed out

COUNTER

I really appreciate if someone can help me because I need to solve this problem as soon as possible.

Thanks

Marta Colmenares

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Juan,

Go to <Localdrive>:/windows/system32/drivers/etc/services.

Open the services notepad and add the message server name <b>sapms<SID> 3600/tcp</b> in the notepad.

Give this as i have given.Replace the SID with yours.

Try restarting the cluster. This will solve ur problem.

Hope it helps,

Regards,

Nagarajan.

Former Member
0 Kudos

Nagarajan,

Thanks for your help. I changed the message service as you tell me, however I have other mistake :

I am attaching the JAVA source code, the message error and the line that I chance in the service. I try with 3600 first and then I change to 3300.

        • Source Code *******

public static final String SAP_CLIENT = "150";

public static final String USER_ID = "CORGXXX";

public static final String PSWD = "XXXXXX";

public static final String LANGUAGE = "ES";

public static final String APP_SERVER_HOST = "192.168.1.132";

public static final String SAP_ROUTER = "200.106.139.84";

public static final String SYS_NUMBER = "00";

public void conexion3() {

String IP = "/H/" + SAP_ROUTER + "/W/sapprracc/H/" + APP_SERVER_HOST;

try {

JCO.Client conn = JCO.createClient(SAP_CLIENT,USER_ID,PSWD,LANGUAGE,IP,SYS_NUMBER);

System.out.println("gonna connect ...");

conn.connect();

System.out.println("successfully connected:\n" + conn.getAttributes());

conn.disconnect();

} catch (Throwable e) {

System.out.println(e.getMessage());;

System.exit(1);

}

}

*error compiling the source**

gonna connect ...

Connect to SAP gateway failed

Connect_PM GWHOST=/H/200.106.139.84/W/sapprracc/H/192.168.1.132, GWSERV=sapgw00, ASHOST=/H/200.106.139.84/W/sapprracc/H/192.168.1.132, SYSNR=00

LOCATION SapRouter on www03

ERROR timeout occured

TIME Wed May 03 11:29:27 2006

RELEASE 620

COMPONENT NI (network interface)

VERSION 36

RC -93

COUNTER 609

lines that we have in the service :

sapmg <00> 3300/tcp

sapmS <00> 3300/tcp

Thansk again for your help

Regards,

Marta C

Former Member
0 Kudos

Hi Juan,

Welcome to SDN!!

"ERROR timeout occured" indicates that your logon request didnt make it to the SAP server..

Can u skip the router and connect directly to the server?? Try whether that works..

If yes,

then the problem is with routing..

Is your request routed to the server is to checked..

These are network issues and nothin pertaining to your code..

Regards,

Tanveer.

Please mark helpful answers

Answers (0)