Is there a function to automatically restart when it is a "UNAVAILABLE" error?

157 views
Skip to first unread message

JIHoon Ock

unread,
Jun 14, 2023, 7:47:02 PM6/14/23
to Google Ads API and AdWords API Forum
Thank you for looking at my question.

Sometimes errors occur in the process of inquiring campaign information.

Error "NoRouteToHostException" and code "UNAVAILABLE" are returned.

However, I looked up the log and it seems to automatically retry in the "UNAVAILABLE" code error situation.


=======================================================
Response
--------
Headers: null
Body: null
Failure message: null
Status: Status{code=UNAVAILABLE, description=io exception, cause=io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: null: googleads.googleapis.com/2404:6800:4005:81c:0:0:0:200a:443
Caused by: java.net.NoRouteToHostException
at io.grpc.netty.shaded.io.netty.channel.unix.Errors.newConnectException0(Errors.java:147)
at io.grpc.netty.shaded.io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:128)
at io.grpc.netty.shaded.io.netty.channel.unix.Socket.connect(Socket.java:313)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel.doConnect0(AbstractEpollChannel.java:773)
at io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel.doConnect0(EpollSocketChannel.java:144)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel.doConnect(AbstractEpollChannel.java:758)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:600)
at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:548)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:533)
at io.grpc.netty.shaded.io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:54)
at io.grpc.netty.shaded.io.grpc.netty.WriteBufferingAndExceptionHandler.connect(WriteBufferingAndExceptionHandler.java:157)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:548)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.access$1000(AbstractChannelHandlerContext.java:61)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext$9.run(AbstractChannelHandlerContext.java:538)
at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391)
at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
}.
=======================================================
▶ WARN  2023-06-09 12:14:30.629 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:31.553 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:31.966 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:39.793 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:45.906 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:59.060 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:15:06.664 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:15:25.597 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ INFO  2023-06-09 12:15:44.210 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:157] - SUCCESS REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 1000997080, RequestID: N0kAGKKNa8VkcaRolWiWDw, ResponseCode: OK, Fault: null.

======================================================

If you look at the log, it looks like you're trying a total of nine times until you succeed.

Am I right in guessing?

If the guess is correct, can I know the maximum number of retries I try?

Google Ads API and AdWords API Forum

unread,
Jun 15, 2023, 3:32:38 PM6/15/23
to Google Ads API and AdWords API Forum
Re-posting the last inquiry (https://groups.google.com/g/adwords-api/c/cM45VpabyCU) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads API Team

Google Ads API Forum Advisor

unread,
Jun 20, 2023, 8:26:05 AM6/20/23
to adwor...@googlegroups.com

Hi,

Can you confirm if this is related to the issue you raised on another thread with subject "Is automatic retry possible if "UNAVAILABLE" error occurs?" to which we've already responded to? If yes, then please continue the discussion on the said thread for better tracking of your concern.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2mUIZ0:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages