{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/3476","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/3476/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/3476/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/3476/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/3476","id":341996377,"node_id":"MDU6SXNzdWUzNDE5OTYzNzc=","number":3476,"title":"RetrySetting problem with google storage java api","user":{"login":"tmoliveira","id":11090982,"node_id":"MDQ6VXNlcjExMDkwOTgy","avatar_url":"https://avatars2.githubusercontent.com/u/11090982?v=4","gravatar_id":"","url":"https://api.github.com/users/tmoliveira","html_url":"https://github.com/tmoliveira","followers_url":"https://api.github.com/users/tmoliveira/followers","following_url":"https://api.github.com/users/tmoliveira/following{/other_user}","gists_url":"https://api.github.com/users/tmoliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/tmoliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmoliveira/subscriptions","organizations_url":"https://api.github.com/users/tmoliveira/orgs","repos_url":"https://api.github.com/users/tmoliveira/repos","events_url":"https://api.github.com/users/tmoliveira/events{/privacy}","received_events_url":"https://api.github.com/users/tmoliveira/received_events","type":"User","site_admin":false},"labels":[{"id":175662348,"node_id":"MDU6TGFiZWwxNzU2NjIzNDg=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/api:%20storage","name":"api: storage","color":"f8f8f8","default":false},{"id":544203936,"node_id":"MDU6TGFiZWw1NDQyMDM5MzY=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/priority:%20p2","name":"priority: p2","color":"fef2c0","default":false},{"id":144595208,"node_id":"MDU6TGFiZWwxNDQ1OTUyMDg=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/type:%20question","name":"type: question","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-17T16:36:14Z","updated_at":"2018-07-20T01:14:05Z","closed_at":"2018-07-20T01:14:05Z","author_association":"NONE","body":"Hello,\r\n\r\nI am trying to understand how my application runs if it goes out of internet. However I am facing a behavior that I am sure that is not correct.\r\n\r\nI am setting the RetrySettings to \"1\" when creating the Storage client (google-cloud-storage, version 1.36.0) of google storage, however, the library perform always 10 attempts and then it blocks without returning to the client. \r\n\r\nThis is how I am creating the client.\r\n```java\r\nstorage = StorageOptions.newBuilder()\r\n      .setCredentials(ServiceAccountCredentials.fromStream(new FileInputStream(credentialsPath)))\r\n      .setRetrySettings(RetrySettings.newBuilder().setMaxAttempts(1).build())\r\n      .build()\r\n      .getService();\r\n```\r\n\r\nThen, if I try to perform any request (e.g.: delete or upload an object to a bucket) without an internet connection, I am getting this output 10 repeated times:\r\n\r\n```\r\njul 17, 2018 5:03:04 PM com.google.api.client.http.HttpRequest execute\r\nWARNING: exception thrown while executing request\r\njava.net.UnknownHostException: accounts.google.com\r\n\tat java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)\r\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)\r\n\tat java.net.Socket.connect(Socket.java:589)\r\n\tat sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)\r\n\tat sun.net.NetworkClient.doConnect(NetworkClient.java:175)\r\n\tat sun.net.www.http.HttpClient.openServer(HttpClient.java:463)\r\n\tat sun.net.www.http.HttpClient.openServer(HttpClient.java:558)\r\n\tat sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)\r\n\tat sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)\r\n\tat sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)\r\n\tat sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)\r\n\tat sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)\r\n\tat sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)\r\n\tat sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334)\r\n\tat sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309)\r\n\tat sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259)\r\n\tat com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)\r\n\tat com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)\r\n\tat com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:383)\r\n\tat com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:175)\r\n\tat com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:161)\r\n\tat com.google.auth.http.HttpCredentialsAdapter.initialize(HttpCredentialsAdapter.java:96)\r\n\tat com.google.cloud.http.HttpTransportOptions$1.initialize(HttpTransportOptions.java:161)\r\n\tat com.google.cloud.http.CensusHttpModule$CensusHttpRequestInitializer.initialize(CensusHttpModule.java:120)\r\n\tat com.google.api.client.http.HttpRequestFactory.buildRequest(HttpRequestFactory.java:93)\r\n\tat com.google.api.client.googleapis.services.AbstractGoogleClientRequest.buildHttpRequest(AbstractGoogleClientRequest.java:300)\r\n\tat com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)\r\n\tat com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)\r\n\tat com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)\r\n\tat com.google.cloud.storage.spi.v1.HttpStorageRpc.delete(HttpStorageRpc.java:519)\r\n\tat com.google.cloud.storage.StorageImpl$13.call(StorageImpl.java:388)\r\n\tat com.google.cloud.storage.StorageImpl$13.call(StorageImpl.java:385)\r\n\tat com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:89)\r\n\tat com.google.cloud.RetryHelper.run(RetryHelper.java:74)\r\n\tat com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:51)\r\n\tat com.google.cloud.storage.StorageImpl.delete(StorageImpl.java:385)\r\n\tat com.google.cloud.storage.StorageImpl.delete(StorageImpl.java:377)\r\n```\r\n\r\nAfter seeing 10 times this output the request do not returns, not even if I turn on my internet connection. It seems it stay blocked.\r\n\r\nCan someone help me on this or point me in the right direction.\r\n\r\nThanks in advance,\r\nRegards"}}
{"actor":{"display_login":"hzyi-google"}}