Uncaught exception 'Google_IO_Exception' with message 'HTTP Error: Unable to connect

微笑、不失礼 提交于 2019-12-10 15:54:16

问题


I have a task (query) running some php code that retrieves data from gmail mailboxes. It has been working fine until last friday (April 10th, 2015) and now I'm getting this error log:

E 11:58:26.094 2015-04-15  200   3.38 KB   14.2s /code.php
  0.1.0.2 - - [15/Apr/2015:07:58:26 -0700] "POST /code.php HTTP/1.1" 200 3462 "https://xxxxxxxxx.appspot.com/start.php?email=test@email.com" "AppEngine-Google; (+http://code.google.com/appengine)" "mailroof-test.appspot.com" ms=14201 cpu_ms=407 cpm_usd=0.001221 queue_name=worker task_name=13657588804765054031 instance=00c61b117c031f6c5ded2e3d1653abac0f4b87fa app_engine_release=1.9.19
    E 11:58:26.088 PHP Fatal error:  Uncaught exception 'Google_IO_Exception' with message 'HTTP Error: Unable to connect: 'fopen(https://www.googleapis.com/gmail/v1/users/me/messages?maxResults=100&labelIds=INBOX&pageToken=12866883594511227777): failed to open stream: Unsupported SSL context options are set. The following options are present, but have been ignored: cafile
      Fetch error'' in /base/data/home/apps/xxxxxxxxx/1.383623356139435513/google-api-php-client/src/Google/IO/Stream.php:140
      Stack trace:
      #0 /base/data/home/apps/xxxxxxxxx/1.383623356139435513/google-api-php-client/src/Google/IO/Abstract.php(133): Google_IO_Stream->executeRequest(Object(Google_Http_Request))
      #1 /base/data/home/apps/xxxxxxxxx/1.383623356139435513/google-api-php-client/src/Google/Http/REST.php(61): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
      #2 [internal function]: Google_Http_REST::doExecute(Object(Google_Client), Object(Google_Http_Request))
      #3 /base/data/home/apps/xxxxxxxxx/1.383623356139435513/google-api-php-client/src/Goo in /base/data/home/apps/xxxxxxxxx/1.383623356139435513/google-api-php-client/src/Google/IO/Stream.php on line 140

This is becoming an issue since it happens once every so often.

If anyone has any idea what might be going on or how to catch the error, that will be most appreciated.


回答1:


Use the latest version of the API as of 25 April I think, and do this action: https://stackoverflow.com/a/30719310/1834922.

I´m testing it right now as I have the same issue but for a Drive app. So far it's working but a 10 GB file takes a long time to really know. Will update.



来源:https://stackoverflow.com/questions/29655069/uncaught-exception-google-io-exception-with-message-http-error-unable-to-con

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!