You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/25 00:49:59 UTC
[GitHub] glasser opened a new issue #6912: google-extensions:
GoogleStorage.insert occasionally throws; retry?
glasser opened a new issue #6912: google-extensions: GoogleStorage.insert occasionally throws; retry?
URL: https://github.com/apache/incubator-druid/issues/6912
We are using the google-extensions extension, for (among other things) GoogleTaskLogs.
We've found that occasionally (once a day or so) the underlying TCP connection times out. (This is running on machines inside GCE itself.) eg, we see stack traces like
```
java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_181]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_181]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_181]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_181]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_181]
at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_181]
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673) ~[?:1.8.0_181]
at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:1.8.0_181]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:1.8.0_181]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:1.8.0_181]
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:1.8.0_181]
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:1.8.0_181]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:1.8.0_181]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) ~[?:1.8.0_181]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[?:1.8.0_181]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:1.8.0_181]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334) ~[?:1.8.0_181]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309) ~[?:1.8.0_181]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259) ~[?:1.8.0_181]
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77) ~[?:?]
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981) ~[?:?]
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:283) ~[?:?]
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) ~[?:?]
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384) ~[?:?]
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) ~[?:?]
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217) ~[?:?]
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868) ~[?:?]
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545) ~[?:?]
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequest(MediaHttpUploader.java:562) ~[?:?]
at com.google.api.client.googleapis.media.MediaHttpUploader.executeUploadInitiation(MediaHttpUploader.java:519) ~[?:?]
at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:384) ~[?:?]
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336) ~[?:?]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:427) ~[?:?]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) ~[?:?]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) ~[?:?]
at org.apache.druid.storage.google.GoogleStorage.insert(GoogleStorage.java:43) ~[?:?]
at org.apache.druid.storage.google.GoogleTaskLogs.pushTaskFile(GoogleTaskLogs.java:72) ~[?:?]
at org.apache.druid.storage.google.GoogleTaskLogs.pushTaskLog(GoogleTaskLogs.java:54) ~[?:?]
at org.apache.druid.indexing.overlord.ForkingTaskRunner$1.call(ForkingTaskRunner.java:448) [druid-indexing-service-0.13.0-incubating.jar:0.13.0-incubating]
at org.apache.druid.indexing.overlord.ForkingTaskRunner$1.call(ForkingTaskRunner.java:223) [druid-indexing-service-0.13.0-incubating.jar:0.13.0-incubating]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
```
(Other Java apps that write to GCS have also had various issues and we've found there that some retries are very helpful.)
The specific effect of this write failure is that even though the kafka indexing service task has actually run properly (and I believe the offsets are properly updated in SQL), the task ends up failing due to the inability to upload the logs, and then (because we currently run with replicas=1) the Kafka supervisor also kills and restarts the task that comes after it for the same partitions. We don't like our tasks to fail (we have monitors on it)! It also doesn't help that it's a bit hard to tell from the overlord console what happened — it's hard to understand that the new task's failure was driven by the supervisor as a result of the old task's failure, and it's hard to see that the old task failed due to uploading logs (without looking in middlemanager logs).
Because it does seem like GCS is kinda flaky, would it be reasonable to build a retry loop into GoogleStorage.insert or GoogleTaskLogs.pushTaskFile? Or figure out a way that GoogleStorageDruidModule could maybe configure the underlying API to retry on connect failures? Happy to work on a PR but curious what method is most likely to be approved.
cc @erikdubbelboer who initially implemented GoogleTaskLogs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org