cancel
Showing results for 
Search instead for 
Did you mean: 

SAP JCo Error: service '0' in use (10048)

Former Member
0 Kudos

Hi,

I've written a small JAVA app, which connects to SAP via the SAP JCo connector and calls several ABAP function modules. Sometimes after being connected to SAP, I get this error message from JCo:


com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connection parameters: ...

LOCATION    CPIC (TCP/IP) on local host with Unicode
ERROR       service '0' in use
TIME        Fri Nov 27 18:36:36 2009
RELEASE     720
COMPONENT   NI (network interface)
VERSION     40
RC          -4
MODULE      nixxi.cpp
LINE        3255
DETAIL      NiICheckPendConnection
SYSTEM CALL select, getsockopt
ERRNO       10048
ERRNO TEXT  WSAEADDRINUSE: Address already in use
COUNTER     4978

The error occurred while invoking this code:


this.destination.getRepository().getFunction("MYFUNCTION")

Te strange thing is, that this only happens sometimes. Also the initial connection to SAP is always successful and this error only comes up after the app has been connected to SAP for while (varies, lets say about 30 minutes).

Can anybody give me a hint here?

Thanks, Samir.

Former Member
0 Kudos
Hi Samir, have you found fix for this? we are also getting the same issue "Service 0 in use" , Address already in Use....any help would be greatly appreaciated

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Experts,

I am also facing similar kind of a problem any help on this will be highly appreciated. We have a Java application which fetches data from SAP to SQL Server and this was working fine in production till last month and suddenly some problems started arising. So our ABAP programs wich transfer data from SAP to the JAva application is running longer than usual and the business is getting affeted because of this.

Following are the eroor message I can see in the Java RFC errol log files.

com.sap.rfc.exception.JRfcMiddlewareException:

RFC-function "RfcAccept" returns <1>.

Further information:

Error Group: 102

Error Key: RFC_ERROR_COMMUNICATION

Error Message: Connect to SAP gateway failed

Connect_PM TPNAME=xxxxx, GWHOST=xxxxx,

GWSERV=XXXXXX

LOCATION CPIC (TCP/IP) on local host

ERROR internal error (this retcode should be handled by caller of NI-layer)

TIME Tue Dec 15 01:19:52 2009

RELEASE 640

COMPONENT NI (network interface)

VERSION 37

RC -8

MODULE nixx.c

LINE 666

COUNTER 5

RFC-function "RfcAccept" returns <1>.

Please help.

Thank you.

Edited by: Sareesh P S on Dec 16, 2009 11:48 AM

former_member193379
Active Contributor
0 Kudos

Samir,

RFC_ERROR_COMMUNICATION exception occurred on a lower communication layer, have a look at the dev_jrfc.trc files. These files are written by JRFC and can be found in the directories j2ee/cluster/server* of the J2EE Application Server Installation.

Please let me know for any further query.

Thanks

Hamendra