SoapFault Could not connect to host

410 views
Skip to first unread message

shean

unread,
Nov 21, 2017, 4:16:11 AM11/21/17
to AdWords API Forum
Dear all:

I can use AdWords SDK get report successful before 11/14, that version is 31.0.0. but sometime it got could not connect to host start on 11/15.

then i get latest version on github on 11/18, and upgarde to 32.0.0
but issue not solved, and it become to everytime

in test use SoapSettingsBuilder()->disableSslVerify(), i can get campaigns
but use SoapSettingsBuilder()->withSslCaFile('/usr/lib/ssl/cacert.pem'), i get "Could not connect to host"

and i try to use 

PHP Warning:  file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:

error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed in Command line code on line 1

PHP Warning:  file_get_contents(): Failed to enable crypto in Command line code on line 1

PHP Warning:  file_get_contents(https://adwords.google.com/api/adwords/cm/v201710/CampaignService?wsdl): failed to open stream: operation failed in Command line code on line 1


pem

ls /usr/lib/ssl/cacert.pem

/usr/lib/ssl/cacert.pem


could on connect to host soap log (the time is on docker container)
[2017-11-07 00:10:53] AW_SOAP.WARNING: clientCustomerId=938-753-8514 operations= service=CampaignService method=get responseTime= requestId= server= isFault=1 faultMessage=Could not connect to host  
[2017-11-07 00:10:53] AW_SOAP.NOTICE: 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201710"><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>938-753-8514</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>koodata-api (AwApi-PHP, googleads-php-lib/32.0.0, PHP/7.1.9)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:get><ns1:serviceSelector><ns1:fields>Id</ns1:fields><ns1:fields>Name</ns1:fields><ns1:predicates><ns1:field>CampaignId</ns1:field><ns1:operator>IN</ns1:operator><ns1:values>646</ns1:values></ns1:predicates><ns1:ordering><ns1:field>Name</ns1:field><ns1:sortOrder>ASCENDING</ns1:sortOrder></ns1:ordering><ns1:paging><ns1:startIndex>0</ns1:startIndex><ns1:numberResults>500</ns1:numberResults></ns1:paging></ns1:serviceSelector></ns1:get></SOAP-ENV:Body></SOAP-ENV:Envelope>

disable ssl soap log(only can use GetCampaign not Report)
[2017-11-06 23:01:14] AW_SOAP.WARNING: Disabling SSL verification is not recommended.  
[2017-11-06 23:01:16] AW_SOAP.INFO: clientCustomerId=938-753-8514 operations=1 service=CampaignService method=get responseTime=370 requestId=00055e7942cc14f10a6295c1a502bd0f server=adwords.google.com isFault=0 faultMessage=  

so what can i do?

Thanks

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Nov 21, 2017, 12:13:01 PM11/21/17
to AdWords API Forum
Hi, 

The message that you are getting is a warning. The API should still return results and I see that there are no errors in the API SOAP response. Could you take a look at the similar discussion here and see if that fixes the warning? If not, could you please log a new issue in the library tracker

The client customer Id in your request is that of a manager account, you will need to target a client account while using the CampaignService.get() to get the campaigns in that client account. Also, please make sure that the campaignId specified in the predicate is a valid Id. Could you please give that a try and let me know if you are able to get the results? 

Thanks,
Sreelakshmi, AdWords API Team

shean

unread,
Nov 24, 2017, 5:16:29 AM11/24/17
to AdWords API Forum
Hello @Sreelakshmi Sasidharan

thank you

i found what's happend and solved

it's docker server version too old (i don't know why that download DMG from official)

Thanks
Reply all
Reply to author
Forward
0 new messages