Help on REST with error : Request not sent to uri = :org.apache.commons.httpclient.HttpException: javax.net.ssl.SSLPeerUnverifiedException: peer not

sriramsaishasha
Tera Contributor

Hi,

In Rest message I'm using POST method and I need to get 200 response. But I facing the following issue

HTTP Status: 0

Error Message: "Request not sent to uri= : org.apache.commons.httpclient.HttpException: javax.net.ssl.SSLPeerUnverifiedException: peer not" 

Error code: 1

 

Could anyone please help in to resolve the above issue.

Thanks in advance.

 

Regards,

Shashank

8 REPLIES 8

Community Alums
Not applicable

Set this property to false :

 com.glide.communications.httpclient.verify_hostname

 

Cheers,

Joro

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

How are you consuming the REST Message?

Is it direct or via Mid Server?

You can try consuming the endpoint from Postman tool. If that works fine from Postman then it should work from ServiceNow as well with direct endpoint

refer below link

Can't get a REST message to connect to HTTPS

Outbount rest api got ssl error

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

We are not using mid server, we are using basic authentication profile.

 

Regards,

Shashank

Hi,

Did you try to check by consuming the API from Postman?

Did you try setting this property to false

com.glide.communications.httpclient.verify_hostname -> false

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader