RFC call does not work on mac os using jco lib and java

952 views Asked by At

SAP RFC call doesnot work on mac os platform. Same code run on windows. There is interesting things that If I connect to sap using with SAP GUI, I successfully call RFC on mac. I use sap official jco lib for connection.

My local machine config:

 SAP Java Connector runtime information

 Java Runtime:
    Operating System    : Mac OS X 10.12.4 for x86_64
    Java VM             : 1.8.0_121 Oracle Corporation
    Default charset     : UTF-8

 Versions:
    JCo API             : 3.0.16 (2016-12-06)
    JCo middleware      : JavaRfc 2.2.19
    JCo library         : 721.800

 Library Paths:
    Path to JCo archive : /Users/**/sapcorejco/lib/sapjco3.jar
    Path to JCo library : /Users/**/lib/darwinintel64/libsapjco3.jnilib

My erorr is

ERROR [hybrisHTTP10] [DefaultSAPRFCDestinationService] com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Initialization of destination SQ2 failed: Connect to SAP gateway failed

Detail:

LOCATION    CPIC (TCP/IP) on local host
ERROR       timeout occured

I think, main problem related to MAC OS, because same code run in windows machine. Maybe we missing some library it come from sap gui? Is there anyone faced this issue?

2

There are 2 answers

0
katsu On BEST ANSWER

I finally resolved problem. Problem related VPN applications. I use for vpn Tunnelblick application. We use side to side vpn and tunnelblick default version doesnot fully support. We changed version of tunnelblick solved all problems.Tunnelblick default version: 2.4.6 but I use 2.3.18 for side to side vpn. Tunnelblick configuration screen.

0
Trixx On

The error "timeout occurred" from the local low-level CPIC layer of JCo is reported from the operating system's TCP/IP stack. It indicates that the partner host (the specified SAP gateway host) could not be reached or does not respond. The error happens below the SAP protocol layers, i.e. on some TCP/IP layer.

If the SAP system is in general reachable and accessible with other programs or from other hosts of the same network segment, I suggest to switch on CPIC trace level 2 (-Dcpic.trace=2) and look into it, if this trace can help in identifying the root cause. For example, also issues with initializing the CPIC library are possible because the own IP address or hostname cannot be determined, or the own hostname cannot be resolved. I think it is required that 'ping <ownhostname>' without domain has to work. A working 'ping <ownhostname>.local' would not be sufficient as far as I know. If this would be the root cause, maybe it helps to add the ownhostname to the etc/hosts file.

One can only guess here without having more details from the error message itself, the CPIC trace and knowledge about your network infrastructure and configuration. But you are for sure not lacking a library here.