The storage lib doesn't currently consider SSLHandshakeException retryable.
From BaseServiceException:
protected boolean isRetryable(boolean idempotent, IOException exception) {
boolean exceptionIsRetryable = exception instanceof SocketTimeoutException
|| exception instanceof SocketException
|| "insufficient data written".equals(exception.getMessage());
return idempotent && exceptionIsRetryable;
}
But the following type of exception should be retried in the same way a SocketException is retried.
Exception in thread "main" com.google.cloud.storage.StorageException: Remote host closed connection during handshake at com.google.cloud.storage.spi.DefaultStorageRpc.translate(DefaultStorageRpc.java:202) at com.google.cloud.storage.spi.DefaultStorageRpc.list(DefaultStorageRpc.java:294) at com.google.cloud.storage.StorageImpl$8.call(StorageImpl.java:297) at com.google.cloud.storage.StorageImpl$8.call(StorageImpl.java:294) at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:179) at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:244) at com.google.cloud.storage.StorageImpl.listBlobs(StorageImpl.java:293) at com.google.cloud.storage.StorageImpl.access$300(StorageImpl.java:74) at com.google.cloud.storage.StorageImpl$BlobPageFetcher.getNextPage(StorageImpl.java:249) at com.google.cloud.PageImpl.getNextPage(PageImpl.java:124) at com.google.cloud.PageImpl$PageIterator.computeNext(PageImpl.java:66) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at LoadSldToSpanner.main(LoadSldToSpanner.java:63) Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:953) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:93) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:972) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) 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 com.google.cloud.storage.spi.DefaultStorageRpc.list(DefaultStorageRpc.java:286) ... 12 more Caused by: java.io.EOFException: SSL peer shut down incorrectly at sun.security.ssl.InputRecord.read(InputRecord.java:482) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934) ... 24 more
The storage lib doesn't currently consider SSLHandshakeException retryable.
From BaseServiceException:
But the following type of exception should be retried in the same way a SocketException is retried.
Exception in thread "main" com.google.cloud.storage.StorageException: Remote host closed connection during handshake at com.google.cloud.storage.spi.DefaultStorageRpc.translate(DefaultStorageRpc.java:202) at com.google.cloud.storage.spi.DefaultStorageRpc.list(DefaultStorageRpc.java:294) at com.google.cloud.storage.StorageImpl$8.call(StorageImpl.java:297) at com.google.cloud.storage.StorageImpl$8.call(StorageImpl.java:294) at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:179) at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:244) at com.google.cloud.storage.StorageImpl.listBlobs(StorageImpl.java:293) at com.google.cloud.storage.StorageImpl.access$300(StorageImpl.java:74) at com.google.cloud.storage.StorageImpl$BlobPageFetcher.getNextPage(StorageImpl.java:249) at com.google.cloud.PageImpl.getNextPage(PageImpl.java:124) at com.google.cloud.PageImpl$PageIterator.computeNext(PageImpl.java:66) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at LoadSldToSpanner.main(LoadSldToSpanner.java:63) Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:953) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:93) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:972) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) 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 com.google.cloud.storage.spi.DefaultStorageRpc.list(DefaultStorageRpc.java:286) ... 12 more Caused by: java.io.EOFException: SSL peer shut down incorrectly at sun.security.ssl.InputRecord.read(InputRecord.java:482) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934) ... 24 more