Skip to Content

JCo - Can someone tell me how the GWHOST and GWSERV values are derived?

We have successfully been using JCo for some years now in a web application. However, recently on our TST server this has started failing.

The exception is this:$Exception: (102) RFC_ERROR_COMMUNICATION: SAP_CMINIT3 : rc=20 > Connect to SAP gateway failed

Connect_PM GWHOST=, GWSERV=3301, SYSNR=01

I can see why this is failing ... because the GWHOST and GWSERV are incorrect! However, I don't know why they are wrong when we have the correct logon properties specified and the correct entry in the "services" file on our Windows server.

Can someone tell me how the GWHOST and GWSERV values are derived?

For information our logonProperties file contains:







Services file contains this entry:

sapmsTST 3601/tcp

We establish a connection using

JCO.addClientPool("R3", 10, logonProperties ) ;

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 14, 2009 at 11:29 AM

    hi stephen,

    those will come from the r3 side

    those properties will be given the while installing the r3

    gwhost Gateway host

    gwserv Gateway service

    host and service will be taken from the r3

    if u check dynaimically u an refer this link for more details

    let me know u need anyfurther information


    Add a comment
    10|10000 characters needed characters exceeded

    • Stephen Burr Venkata Ravindra Bollapalli

      Thanks again for your posts.

      Forgetting the application programming as I know this is correct (because our DEV and PRD systems work!), I'm trying to ascertain why, when my logon properties contain the correct gateway and mshost, the application server doesn't try to connect to our TST SAP system (instead it goes to the local host on port 3301, for a reason I don't understand).

      In other words, what is JCo doing to establish a connection?

      Are there any tests I can run manually to prove the same connectivity?

      e.g. an obvious one is that I need to be able to see the TST SAP server (ecctst in my example above), so "ping ecctst" has to work. Which it does.

      I've also tried "telnet <ip address> 3601" and that works fine too.

      The "services" file looks correct.

      I strongly believe this is network related issue but can't think or run a test to prove or explain it!

      From the posts so far, I'm going to try 2 things:

      1) Put on the JCo trace using "jco.server.trace Enable/disable RFC trace (1 or 0)"

      2) Try connecting from our DEV application to our SAP TST system (to prove it isn't the application or SAP TST system that is causing the problem)


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.