This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RMNet - Errorneous TimeOut Message

Good Morning 

I am getting misleading TIMEOUT Message.

What I am doing:  I have transaction, run 24*7*365, calls COBOL program which in turn calls API using RMNet.

Initially, when transaction is started RESPONSE-STATUS from RMNet functions [NETINIT, HttpSetConnectTimeout, HttpSetTimeout, HTTPPOST]  is 0. And NetGetError gave Message = "no error, don't panic!".

 

After sometime RESPONSE-STATUS from RMNet functions is 0. But at same time, NetGetError gave Message = "Timeout was reached". 

Response is proper but getting misleading message. Using CONNECITON TIMEOUT =1 sec and RESPONSE timeout = 1 SEC.

Am I doing something wrong ? Something missed in coding. 

Log

INITIALLY

20210921-07063002 ENDPOINT=http://xxx:nnnn/performapicall
20210921-07063002 RESPONSE CODE FOR NETINIT=000
20210921-07063002 RESPONSE MESSAGE FOR NETINIT=no error, don't panic!===> from NetGetError
20210921-07063002 HTTPSETCONNECTTIMEOUT=000
20210921-07063002 RESPONSE MESSAGE FOR HTTPSETCONNECTTIMEOUT=no error, don't panic!===> from NetGetError
20210921-07063002 HTTPSETTIMEOUT=000
20210921-07063002 RESPONSE MESSAGE FOR HTTPSETTIMEOUT=no error, don't panic!===> from NetGetError
20210921-07063036 HTTPPOST=000
20210921-07063036 RESPONSE MESSAGE FOR HTTPPOST=no error, don't panic!===> from NetGetError
20210921-07063036 HTTP-RESPONSE CODE: 200

AFTER SOMETIME

|

|

20210921-12031415 ENDPOINT=http://xxx:nnnn/performapicall
20210921-12031415 RESPONSE CODE FOR NETINIT=000
20210921-12031415 RESPONSE MESSAGE FOR NETINIT=Timeout was reached===> from NetGetError
20210921-12031415 HTTPSETCONNECTTIMEOUT=000 
20210921-12031415 RESPONSE MESSAGE FOR HTTPSETCONNECTTIMEOUT=Timeout was reached===> from NetGetError
 20210921-12031415 HTTPSETTIMEOUT=000
20210921-12031415 RESPONSE MESSAGE FOR HTTPSETTIMEOUT=Timeout was reached===> from NetGetError
20210921-12031422 HTTPPOST=000
20210921-12031422 RESPONSE MESSAGE FOR HTTPPOST=Timeout was reached===> from NetGetError
20210921-12031422 HTTP-RESPONSE CODE: 200
|

|

  • Suggested Answer

    0  

    Actually, it looks like you've uncovered a problem in RM/Net. It appears to keep around a copy of the last error code that it returns, but, subsequent successful returns won't over write that code. It is only overridden by the next error return. So, I recommend only calling NetGetError immediately after an error return. I'm guessing that it does this so that the COBOL program won't accidentally lose the error code by calling other RMNet API's.

  • 0 in reply to   

    Thanks Mike.  I will modify my code as per discussion. 

    I noticed this is not consistent behavior. I pulled below log where 3 calls were success but messages by NetGetError are: [ In roder. please check date and time as first field in each row]

    1. no error, don't panic!

    2. Timeout was reached

    3. no error, don't panic!

    Shall I raise a support ticket for MicroFocus to look ?

    |
    |
    20210921-07210666 ENDPOINT=http://endpoint
    20210921-07210666 RESPONSE CODE FOR NETINIT=000
    20210921-07210666 RESPONSE MESSAGE FOR NETINIT=no error, don't panic!
    20210921-07210666 HTTPSETCONNECTTIMEOUT=000
    20210921-07210666 RESPONSE MESSAGE FOR HTTPSETCONNECTTIMEOUT=no error, don't panic!
    20210921-07210666 HTTPSETTIMEOUT=000
    20210921-07210666 RESPONSE MESSAGE FOR HTTPSETTIMEOUT=no error, don't panic!
    20210921-07210674 HTTPPOST=000
    20210921-07210674 RESPONSE MESSAGE FOR HTTPPOST=no error, don't panic!
    20210921-07210674 HTTP-RESPONSE CODE: 200
    |
    |
    |
    20210921-07210755 ENDPOINT=http://endpoint
    20210921-07210755 RESPONSE CODE FOR NETINIT=000
    20210921-07210755 RESPONSE MESSAGE FOR NETINIT=Timeout was reached
    20210921-07210755 HTTPSETCONNECTTIMEOUT=000
    20210921-07210755 RESPONSE MESSAGE FOR HTTPSETCONNECTTIMEOUT=Timeout was reached
    20210921-07210755 HTTPSETTIMEOUT=000
    20210921-07210755 RESPONSE MESSAGE FOR HTTPSETTIMEOUT=Timeout was reached
    20210921-07210766 HTTPPOST=000
    20210921-07210766 RESPONSE MESSAGE FOR HTTPPOST=Timeout was reached
    20210921-07210766 HTTP-RESPONSE CODE: 200
    |
    |
    |
    20210921-07210786 ENDPOINT=http://endpoint
    20210921-07210786 RESPONSE CODE FOR NETINIT=000
    20210921-07210786 RESPONSE MESSAGE FOR NETINIT=no error, don't panic!
    20210921-07210786 HTTPSETCONNECTTIMEOUT=000
    20210921-07210786 RESPONSE MESSAGE FOR HTTPSETCONNECTTIMEOUT=no error, don't panic!
    20210921-07210786 HTTPSETTIMEOUT=000
    20210921-07210786 RESPONSE MESSAGE FOR HTTPSETTIMEOUT=no error, don't panic!
    20210921-07210795 HTTPPOST=000
    20210921-07210795 RESPONSE MESSAGE FOR HTTPPOST=no error, don't panic!
    20210921-07210795 HTTP-RESPONSE CODE: 200
    |
    |
    |

  • 0   in reply to 

    You may if you wish. We're going to need some idea of what you're COBOL program is doing in order to replicate the problem. I must admit that I'm hesitant to change much in this area for fear of breaking existing applications. Might just add a new entry point that the COBOL program can call to clear the error code.