Skip to Content

Semi-random 20 seconds "WSAETIMEDOUT: Connection timed out" on invalid system number

I do have the right bit-ness of assemblies installed. I am able to reach SAP and do RFCs, BAPIs, iDOCs with a correct connection configuration. When the provided system number is incorrect, I expect a "

100 is not a valid system number

" or a "

WSAECONNREFUSED: Connection refused

" (system number -> 0). And sometimes I do get exactly those responses, sometimes I get 20 seconds timeout instead. I noticed the following old thread with a similar question but no helpful answer:

https://archive.sap.com/discussions/thread/1818138

LOCATION CPIC (TCP/IP) on local host daviburg-bizapi with Unicode
ERROR partner '10.138.157.143:3399' not reached
TIME Thu Mar 08 14:49:30 2018
RELEASE 721
COMPONENT NI (network interface)
VERSION 40
RC -10
MODULE nixxi.cpp
LINE 3289
DETAIL NiPConnect2: 10.138.157.143:3399
SYSTEM CALL connect
ERRNO 10060
ERRNO TEXT WSAETIMEDOUT: Connection timed out
COUNTER 2

You may ask why I am knowingly providing an invalid system number. This is because our application permits its users to input their connection configuration parameters. When they make a mistake, we need to display for them an actionable and helpful error messages that guides them to correct the configuration mistake rather than call tech support. For that, "

100 is not a valid system number

" is a very helpful response from SAP. "

WSAECONNREFUSED: Connection refused

" is not as helpful but at least comes quickly. Random "

WSAETIMEDOUT: Connection timed out

" with 20 seconds delays... Not helpful and quite painful.

Furthermore once such timeout error occurs, even with the customer providing a corrected system number the new connection attempts to SAP fail with the same error until we recycle our application process.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 05 at 08:47 PM

    Dear David,

    Please try the following options I hope one of these help:

    1. Maybe it’s firewall issue.Try to telnet to port 4800 from your network and from the external app location.


    2. Verify if the AS Java is able to reach the hostname using OS commands (i.e. ping, traceroute, nslookup) from the affected system. If not, please ask for internal IT team assistance to verify the resolution for the hostname issue at OS level.

    3. If everything seems ok, try connect to hostabc2 and sapgw02 from where the error occurs (hostabc1):
    niping -c -H hostabc2 -S 3302
    Check also if the host and port are resolved to the correct value
    (also on the host where the error occurs - in this example hostabc1)
    > niping -v -H hostabc2
    > niping -v -S sapgw02
    If these tests are not successful then the config of the ports/services that are used must be checked


    4. If all above steps do not help check and find the "service" of the affected R/3 message server (sapms<SID>, SID: System-ID), of the affected R/3 dispatcher (sapdpxx) or of the affected SAP gateway (sapgwxx) and please add the missing entry in the "services" file on your host:
    (UNIX: /etc/services, NT: <windir>/system32/drivers/etc/services),
    AS/400: WRKSRVTBLE)

    The following are valid as defaults:
    sapdp00 3200/tcp
    ...
    sapdp99 3299/tcp

    sapgw00 3300/tcp
    ...
    sapgw99 3399/tcp

    sapms<SID> starts from 3600/tcp.
    IMPORTANT:
    **********
    When inserting this into this file, pleas ensure that the last entry is always terminated with a <return>. For some platforms, this may cause problems, as the last entry may not be recognized.

    Regards,

    Barnabás

    Add comment
    10|10000 characters needed characters exceeded