cancel
Showing results for 
Search instead for 
Did you mean: 

Connect from SAP gateway to RFC server failed - Java StandAlone app X SAP RAC System

Former Member
0 Kudos

Dears,

I'm developing a Java application (RFC SERVER) with JCo3 and I need to connect to SAP RAC system.

I have configured the TCP/IP connection via transaction SM59, but when I try to start my server I face the error below (dev_jco_rfc.trc😞

==========================================================================================

**** Error file opened at 20140714 112024 Brasilia Time Rel 3.0.10 (2013-08-08) [720.440]

Error:  >Mon Jul 14 11:20:24,636<    RfcException: [null]

    message: Connect from SAP gateway to RFC server failed

Connection parameters: TYPE=A DEST=VSPAGUE ASHOST=cpe1601 SYSNR=01 SAPROUTER=/H/155.56.49.28 PCS=1

LOCATION    SAP-Gateway on host ld7624.dmzwdf.sap.corp / sapgw01

ERROR       hostname 'cpe1601' unknown

TIME        Mon Jul 14 16:20:25 2014

RELEASE     740

COMPONENT   NI (network interface)

VERSION     40

RC          -2

MODULE      /bas/740_REL/src/base/ni/nixxhl.cpp

LINE        193

DETAIL      NiHLGetNodeAddr: hostname cached as unknown

COUNTER     3

    Return code: RFC_FAILURE(1)

    error group: 102

    key: RFC_ERROR_COMMUNICATION

==========================================================================================

This problem happens when my app executes the line:

JCoServer myServer = JCoServerFactory.getServer(myServerName);

My system properties:

jco.client.lang=EN

jco.destination.peak_limit=10

jco.client.client=800

jco.client.passwd=********

jco.client.user=********

jco.client.sysnr=01

jco.destination.pool_capacity=3

jco.client.ashost=/H/155.56.49.28/H/cpe1601

jco.server.connection_count=3

jco.server.gwhost=/H/155.56.49.28/H/cpe1601

jco.server.progid=VSPAGUE

jco.server.gwserv=sapgw01

jco.server.repository_destination=VSPAGUE

Using SAP Logon i can connect to server cpe1601 system E16 without problems.

Please, I really need some help, because my knowledge on SAP platform is minimum.

Accepted Solutions (1)

Accepted Solutions (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rodrigo,

you are obviously using a SAPRouter, which means that the system you connect to is behind a firewall. From the error message it means that you're able to connect to the gateway on the application server, which is cpe1601, but the gateway does not manage to establish the connection to the application server itself. This means to me that the name cpe1601 is known by the host, on which the SAProuter instance is running. However, the gateway does not know this name. There, you need to use a different name. And as ld7624.dmzwdf.sap.corp is known by this gateway, I guess it will work with this name.

Hence, I suggest that you try out using this name instead of the cpe1601 name.

Best regards,

Markus

P.S.: One additional remark: The SAPRouter string should be provided as jco.client.saprouter for the destination and as jco.server.saprouter for the server. There is no need to include it in the other configuration parameters. JCo runtime will add it where needed.

Former Member
0 Kudos

Hi Markus,

Changing ASHOST=ld7624.dmzwdf.sap.corp as you have suggested, I got the error message: Connect to SAP gateway failed ...

As you could see, the host I'm connecting is from SAP RAC Service.

Here in our company we have only SAP Logon and my RFC Application, and I can connect to SAP remote system via SAP Logon with this settings:

System Connection Parameters

Description: SAP ECC 6.0

Application Server: cpe1601

Instance Number: 01

System ID: E16

SAProuter String: /H/155.56.49.28/H/

Below the connection information I received from SAP RAC SUPPORT for testing purposes:

    E16 System:

    **********

    SID: E16

    Client: 800

    System Number: 01

    Server: cpe1601

    Component Version: SAP ERP Central Component 6.0 Enhancement Pack 6 Suite on HANA

    User: ********

   Password: ********

   SAProuter String:

   If you don't plan to use SAPRouter at your end,

   /H/155.56.49.28/H/    

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rodrigo,

please try the following:

add the property jco.client.gwhost=cpe1601 and jco.client.gwserv=sapgw01 to the properties and keep ashost on ld7624.dmzwdf.sap.corp.. Also separate the SAPRouter string into the property I suggested before. Afterwards try again.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

I separate the SAPRouter string into the specific property.

Also, SAP RAC Service told me that AS_HOST should be changed.

After modifications were made, connection is working successfully.

Thanks..

Answers (0)