The environment is ubuntu 12.04 + nginx + php-cgi on a lowend VPS. Fix was done by searching with Google, 🙂
For the error:
Jetpack could not contact WordPress.com: register_http_request_failed.
This usually means something is incorrectly configured on your web host.
Operation timed out after 15000 milliseconds with 0 bytes received
This can be resolved by setting the max_execution_time to 300 in php.ini file.
After restart the php-cgi and nginx, I got another error:
Your website needs to be publicly accessible to use Jetpack: site_inaccessible
Error Details: The Jetpack server was unable to communicate with your site
[IXR -32300: transport error: http_request_failed Operation timed out after 15000 milliseconds with 0 bytes received]
This can be solved by changing the “PHP_FCGI_CHILDREN” value from 1 to 2 in /etc/init.d/php-cgi script.