Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCO3 connect to load balancer not working

Hi,

i used the example "StepByStepClient" from JCO3 to connect to a SAP backend directly with this connectProperties:

DestinationDataProvider.JCO_ASHOST,

DestinationDataProvider.JCO_SYSNR,

DestinationDataProvider.JCO_CLIENT,

DestinationDataProvider.JCO_USER, 

DestinationDataProvider.JCO_PASSWD,

DestinationDataProvider.JCO_LANG,

every thing works fine.

Now i want to connect to a sap system with load balancing and i try to connect with this connectProperties:

DestinationDataProvider.JCO_R3NAME,

DestinationDataProvider.JCO_SYSNR,

DestinationDataProvider.JCO_MSHOST,

DestinationDataProvider.JCO_MSSERV,

DestinationDataProvider.JCO_GROUP,

DestinationDataProvider.JCO_CLIENT,

DestinationDataProvider.JCO_USER, 

DestinationDataProvider.JCO_PASSWD,

DestinationDataProvider.JCO_LANG,

and get this error:

Attributes:

Exception in thread "main" com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Connect to message server host failed

Connection parameters:..................................

LOCATION    SAProuter 39.3 (SP4) on 'XXXXXX'

ERROR       internal error

TIME        Fri Feb  6 15:57:20 2015

RELEASE     710

COMPONENT   NI (network interface)

VERSION     39

RC          -93

MODULE      nirout.cpp

LINE        2685

DETAIL      NiRClientHandle: route expected

COUNTER     3312453

  at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:681)

  at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1376)

  at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:736)

  at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:107)

  at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:316)

  at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:46)

  at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:290)

  at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:873)

  at com.sap.conn.jco.rt.RfcDestination.getAttributes(RfcDestination.java:551)

  at com.sap.conn.jco.rt.RfcDestination.getAttributes(RfcDestination.java:33)

  at jcoTest.Client.step1Connect(Client.java:142)

  at jcoTest.Client.main(Client.java:129)

Caused by: RfcException: [null]

    message: Connect to message server host failed

I searched for the problem and found this explanation:

Background and Further Analysis:

The client program sends incorrect data to the SAProuter. This is usually the case if the client assumes that it is already communicating with the target system but the connection was actually established to an SAProuter that has to wait for a route first. Check the parameters for the connection setup on the client.

But how can i fix the Problem?

Thanks, André

Tags:
Former Member
replied

Hi Andre,

yes, you do. ;-)

As said before you addressed the router instead of the message server.

The correct "translation" should use the following JCo properties:

jco.client.mshost=scscif
jco.client.msserv=3605
jco.client.group=group_name
jco.client.saprouter=/H/XXX.XX.X.XXX/S/3299

As 3299 is the default router port it should also be possible to omit it:

jco.client.saprouter=/H/XXX.XX.X.XXX

SAP Routers should only be used if there is a firewall between JCo and the targeted ABAP system. So I assume that this is the case here. Otherwise you should omit the jco.client.saprouter property completely.

But if you need a SAP Router, you should always specify it separately with the saprouter property.

I hope this helps.

Best regards,
Stefan

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question