cancel
Showing results for 
Search instead for 
Did you mean: 

[JCO] Sap Connection

Former Member

JCO 3.0 seems to cache connection with SAP. So if the connection fails one time, impossible to connect after. Have to restart the Application Server/JVM

Here is the scenario :

0 - Start TOMCAT application Server

1 - SAP server is down

2 - Connection with JCO is K.O

3 - SAP server is up

2 - Connection (2nd try) is K.O

Is there a way to flush the cache ? so we don't have to restart the ApplicationServer/JVM.

Below the log we have from the connection :


LOCATION    CPIC (TCP/IP) on local host MyLaptop with Unicode
ERROR       hostname 'MySapServer' unknown

TIME        Mon Oct 04 15:55:55 2010
RELEASE     711
COMPONENT   NI (network interface)
VERSION     39
RC          -2
MODULE      ninti.c
LINE        895
DETAIL      NiPGetHostByName: 'df-sq-as-vdev.dlti.mdp' not found
SYSTEM CALL getaddrinfo
COUNTER     1

The second Connection :


LOCATION    CPIC (TCP/IP) on local host MyLaptop with Unicode
ERROR       hostname 'MySapServer' unknown

TIME        Mon Oct 04 15:57:06 2010
RELEASE     711
COMPONENT   NI (network interface)
VERSION     39
RC          -2
MODULE      nixxhsl.cpp
LINE        233
DETAIL      NiHsLGetNodeAddr: hostname cached as unknown
COUNTER     3

Thank you for any helps,

Regards.

Edited by: ORFILA Pascal on Oct 7, 2010 11:48 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Please use the latest JCo patch level. This one is quite old!

Furthermore why do you assume that this has something to do with your SAP server running or not?

It is your DNS that cannot resolve the hostname, therefore it is a network configuration error or a DNS failure.

If you would like to, you may disable the NI caching completely. Please see note [1425520|https://service.sap.com/sap/support/notes/1425520].

But I don't recommend to do this because of performance reasons.