I am developing a HTTP protocol with a POST request. However, when I run the element, it went into timeout and in the stream viewer and in the logs I see the following error.
STREAM VIEWER
POST https://{{HOST}}/api/2.0/sql/statements
-> 12:40:52 - Error : 12002. [ERROR_WINHTTP_TIMEOUT]
-> 12:40:52 - Get for ResponseContent () had error : Error : 12002. [ERROR_WINHTTP_TIMEOUT]
-> 12:40:52 - Continuing get for ResponseContent ()
Logs
CProtocol::HandleAnotherTelnetClient|DBG|0|Telnet clients connected Primary = 1, Derived = 0 CProtocol::ProcessSNMPError|CRU|-1|-> 13:19:33 - Get for ConnectionStatus () had error : Error : 12002. [ERROR_WINHTTP_TIMEOUT] CProtocol::ProcessSNMPError|CRU|-1|-> 13:19:33 - Continuing get for ConnectionStatus () CProtocol::HandleAnotherTelnetClient|DBG|0|Telnet clients disconnected **********
I tried using POSTMAN to try to reach the end point in the DMA where dataminer is hosting and with POSTMAN it works (status 200 OK) after I set the browser settings to use a proxy server.
Here is the url used in POSTMAN: https://{{HOST}}/api/2.0/sql/statements.
May I know why does the element failed to connect to the end point?
I even used the proxyServer attribute in the HTTP session tag in the protocol.
I believe this is a follow-up from POST HTTP request protocol no response – element goes into timeout so for sake of being thorough, I'll copy the summary here of what I believe is the root cause of the timeouts.
From your explanation I understood that the requests only work if you configure them to go through the proxy server which is why you have added the proxyServer attribute to the Session tag.
However if you then set the bypassproxy value in the bus address of the connection, you’re overriding that setting again configuring all the requests to be sent straight to the webserver.
The DataMiner docs mention the following:
Bus address: The bus address of the device. This is not always required. If the proxy server has to be bypassed, specify bypassproxy.
If you remove the bypassproxy value from the bus address input field, I believe your requests will stop timing out.
Hi Jeroen, thank you so much for your reply!
The timeout issue has been fixed, it was indeed due to the bypassproxy value in the bus address.
Very thankful for your answer!