Rest call timing out on Mid server, how do I set TLS 1.2 on the flow action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 06:40 PM
Hello Community, was hoping someone could help. I've reviewed many articles on TLS1.2 on the mid server and other related but nothing seems to be helping me answer my questions.
When I configure a rest flow action and run it, I get the following error. Same results with a similarly configured outbound rest message after running a test.
Request not sent to uri= <string to url endpoint> : java.net.SocketTimeoutException: connect timed out
I have checked every setting there is on the flow action and rest message, it's not working timing.
When I log onto the mid server directly, and run the following command from powershell with the same Authorization header per the API documentation to make the REST call.
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Basic <token>")
$response = Invoke-RestMethod <string to url endpoint> -Method 'POST' -Headers $headers
#$response| Set-Clipboard ConvertTo-Json -ErrorAction SilentlyContinue
$Auth = $response.access_token
#Device UID NQL Query
$headers=@{}
$headers.Add("Authorization", "$Auth")
$headers.Add("Accept", "application/json")
$headers.Add("Content-Type", "application/json")
$response2 = Invoke-RestMethod -Uri <string to url endpoint> -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"queryId": "#get_collector_uid",
"parameters": {
"some_parm":"value"
}
}'
$ColUid = $response2.data | Select-Object -ExpandProperty device.collector.uid
I get an error, but if I add the following as the first line to the full command to set TLS1.2, I get a response from the endpoint.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12
Is my endpoint requiring TLS1.2? How do I set TLS1.2 to make this call? Can I do this from the Flow Action?