Having a strange issue with cURL and PHP on a couple of CentOS boxes.
Locally, I'm running CentOS 6.3. Remote is CentOS 5.9
Locally, the box receives a request, scp's a file to the remote server, then performs a cURL request via PHP to the remote server to send some info. The request always fails on the first attempt of the day. Subsequent requests work fine. Remote has a valid SSL cert -- even so, turning off cert and host verification does not fix the problem.
The logging has not been very helpful. Turning verbosity up to 11, the most meaningful entries are as such:
* About to connect() to www.example.com port 443 (#0)
* Trying 203.0.113.10... * connected
* Connected to www.example.com (203.0.113.10) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -5938
* Closing connection #0
* SSL connect error
Googling the error doesn't help much either. Looks like twitter was having a similar problem (https://dev.twitter.com/discussions/1549) which they apparently fixed, but didn't elaborate on how it got fixed.
Any ideas on where to look/what to do to mitigate the problem would be appreciated.