Handshake failure error

Can someone please suggest a solution
Am calling an API using below
test <- GET("https://impi.co.f.com/in_da/api/f/Ations?Date(s)=2020-08-02&Response%20Type=csv&Async=false",
add_headers(c(Accept = "application/json",
Authorization = "06-0c-4-b9-73")))

However it fails with error :

Error in curl::curl_fetch_memory(url, handle = handle) :
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).

Same code works fine on my windows 10 laptop with R version 4.0.2

however it fails on the server which is running on the same R version

Also tried including
httr::set_config( config(ssl_verifypeer = 0L) )

config = httr::config(ssl_verifypeer = FALSE)

but it still fails on the server


I'll start by stating that I am not very familiar with these things, but I've had similar experiences. You say that the issue is only happening when running on the server, and I think that might be the clue to the answer. At my work, running scripts on the server is ok, but when they need outside access (e.g. to the internet) there are server-side restrictions and users need to get special permission to set proxys to be able to have their code talk to the outside. If not all traffic will be blocked.

If this should be the case, you have to contact the admins and ask them how you can have your code use the API.

Maybe this helps...

Thanks , checked internally but there are traffic blocking being done

Strange thing is on the server when i use POSTMAN to call the API , it fails but when i disable SSL verification in POSTMAN , the request goes through
Wondering can i do something in R to disable SSL verfication

Sorry i meant no firewall or blocking being done


That;s beyond my knowledge :stuck_out_tongue: I am not good when it comes to networking and connectivity so hopefully some other folk on here could answer that question. At least it seems you've got more of an idea now where the issue might be.


thanks PJ
We got it fixed by allowing the server subnet to api subnet

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.