Hi,

When calling userListService.mutateMembers, the following error appears.
Is there a way to fix this error?

2018-02-20T12:58:17.575 WARN [pool-4-thread-38] 
com.google.api.ads.adwords.lib.client.AdWordsServiceClient.requestInfoLogger 
[RemoteCallLoggerDelegate.java:148] Request made: Service: 
AdwordsUserListService Method: mutateMembers clientCustomerId: *** URL: 
https://adwords.google.com/api/adwords/rm/v201710/AdwordsUserListService 
Request ID: null ResponseTime(ms): null OperationsCount: null IsFault: true 
FaultMessage: javax.net.ssl.SSLException: Connection has been shutdown: 
javax.net.ssl.SSLException: java.net.SocketException: Broken pipe
2018-02-20T12:58:17.588 ERROR [pool-4-thread-38] 
***.ws.clients.GoogleApiClient [GoogleApiClient.java:281] cannot send emais 
error={}
org.apache.axis.AxisFault: ; nested exception is:
javax.net.ssl.SSLException: Connection has been shutdown: 
javax.net.ssl.SSLException: java.net.SocketException: Broken pipe
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at 
com.google.api.ads.adwords.axis.v201710.rm.AdwordsUserListServiceSoapBindingStub.mutateMembers(AdwordsUserListServiceSoapBindingStub.java:1175)
at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
com.google.api.ads.common.lib.soap.SoapClientHandler.invoke(SoapClientHandler.java:100)
at 
com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:234)
at 
com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(SoapServiceClient.java:63)
at 
com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(SoapServiceClient.java:93)
at com.sun.proxy.$Proxy92.mutateMembers(Unknown Source)
at 
***.ws.clients.GoogleApiClient.sendEmailAddresses(GoogleApiClient.java:279)
at 
***.services.GoogleAudienceService$AddCustomerTask.sendEmailAddresses(GoogleAudienceService.java:262)
at 
***.services.GoogleAudienceService$AddCustomerTask.addUserToUserList(GoogleAudienceService.java:249)
at 
***.services.GoogleAudienceService$AddCustomerTask.call(GoogleAudienceService.java:209)
at 
***.services.GoogleAudienceService$AddCustomerTask.call(GoogleAudienceService.java:186)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: Connection has been shutdown: 
javax.net.ssl.SSLException: java.net.SocketException: Broken pipe
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1529)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
at 
org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
... 27 common frames omitted
Caused by: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1894)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1858)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1803)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:128)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265)
at org.apache.axis.Message.writeTo(Message.java:539)
at 
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 27 common frames omitted
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
at 
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:864)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:835)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
... 33 common frames omitted



The code looks something like this.

// Split target emails (10000)
List<String> sendEmails = new ArrayList<>(10000);
emails.forEach(email -> {
sendEmails.add(email);
if (sendEmails.size() >= 10000) {
try {
    sendEmailAddresses(sendEmails);
} catch (GoogleApiClient.GoogleException e) {
    new RuntimeException(e);
}
sendEmails.clear();
}
});

// call AdWords API
// Send email address to user list (user list is Already created)
private void sendEmailAddresses(List<String> sendEmails, String 
refreshToken, String customerId, String userListId) throws 
GoogleApiClient.GoogleException {
MutateMembersOperand operand = new MutateMembersOperand();
operand.setUserListId(Long.valueOf(userListId));
operand.setMembersList(emails.stream().map( s -> {
    Member member = new Member();
    member.setHashedEmail(getSha256(s.trim().toLowerCase()));
    return member;
}).collect(Collectors.toList()).toArray(new Member[emails.size()]));
MutateMembersOperation operation = new MutateMembersOperation();
operation.setOperand(operand);
operation.setOperator(Operator.ADD);
AdwordsUserListServiceInterface userListService = 
getUserListService(refreshToken, customerId);
userListService.mutateMembers(new MutateMembersOperation[]{operation});
}

best regards.
(Sorry I'm bad at English, google translation is wonderful !!)


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bbc15d72-bd73-4895-ab63-55b3a6457e76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Java Library ... 竹田祥
    • Re: Java... 竹田祥
      • Re: ... 'Luis Xander Talag (AdWords API Team)' via AdWords API Forum
        • ... 竹田祥

Reply via email to