6

Trying to make a curl https request to Twitter API and get this error.

I've tried from another server and it works with no problem.

Does anyone know the reason for this error?

[root@webscoming httpdocs]# curl -v https://api.twitter.com
* About to connect() to api.twitter.com port 443 (#0)
*   Trying 199.16.156.199... connected
* Connected to api.twitter.com (199.16.156.199) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -5990
* Closing connection #0
* SSL connect error
curl: (35) SSL connect error

Updated:

My server is running CentOs 6.5

Looks like Twitter could be blocking the connection since I can correctly connect to encrypted.google.com

  • Describe your server. – Michael Hampton Jun 18 '14 at 15:56
  • Could there be some type of web proxy in place that is causing it to fail? – user247200 Oct 8 '14 at 17:55
18

I saw a similar kind of problem, yet not accessing twitter.
Problem I saw was on RHEL 6.1 -> RHEL 6.4, using curl to access a REST API. curl showed error: curl: (35) SSL connect error

Issue ended up being that our server running the REST API was RHEL 6.6, using a newer version of NSS. Once we upgraded the client NSS version curl was successful.

We upgraded the client from: nss-3.12.10-2.el6_1.x86_64

to: nss-3.16.1-14.el6

  • 1
    This is a winner. Had a nearly identical scenario, this was the resolution. – Tim Jun 3 '15 at 16:40
  • ditto. (Satellite) server had been upgraded between runs from the (RHEL 6.5) client; couldn't update anything until this was done. – Otheus Feb 1 '17 at 17:10
4

According to the source code that error means a time out. Your network connection to that host is most likely faulty. It might also be that Twitter filters out your IP for whatever reason.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.