Hello All,
I'm building a script for Orion and I tried to use API and I have a weird issue with it. I used SWQL studio (where queries are working fine) and from there Edit -> Copy Query As -> Curl (cmd) I copy pasted in windows CMD and it worked like a charm, then I tried to do the same in Linux and suddenly I have an error message:
$ curl -u USER:PASSWORD https://{IP}:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+NodeCaption,+MachineType,+AgentIP,+Data_Center+as+Location,+Environment,+Vendor,+TransferProtocol+FROM+NCM.Nodes+WHERE+Infrastructure_Type+like+'Network'+order+BY+Data_Center --verbose
* Trying {IP}:17778...
* TCP_NODELAY set
* Connected to {IP} ({IP}) port 17778 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: Connection reset by peer in connection to {IP}:17778
* Closing connection 0
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to {IP}:17778
It was pretty weird as the same query in windows worked without any problem, I decided to rewrite this query to python with get request with requests library and I got an error:
Exception has occurred: SSLError
HTTPSConnectionPool(host='{IP}', port=17778): Max retries exceeded with url: /SolarWinds/InformationService/v3/Json/Query?query=SELECT+NodeCaption%2C+MachineType%2C+AgentIP%2C+Data_Center+as+Location%2C+Environment%2C+Vendor%2C+TransferProtocol+FROM+NCM.Nodes+WHERE+Infrastructure_Type+like+%27Network%27+order+BY+Data_Center (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
So I tried my last chance and downloaded OrionSDK library and made simple script in python and the very same error appears even for simple query with orionsdk library:
Exception has occurred: SSLError
HTTPSConnectionPool(host='{IP}', port=17778): Max retries exceeded with url: /SolarWinds/InformationService/v3/Json/Query (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
I will appreciate any clue on what can cause such behaviour as I'm running out of ideas (I tried older TLS version but no luck).