Azure / azure-storage-java

Microsoft Azure Storage Library for Java
https://docs.microsoft.com/en-us/java/api/overview/azure/storage
MIT License
190 stars 164 forks source link

readAddress(..) failed: Connection reset by peer for big file #562

Closed msangel closed 3 years ago

msangel commented 3 years ago

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

<properties>
    <netty.version>4.1.65.Final</netty.version>
    <reactor-bom.version>2020.0.7</reactor-bom.version>
</properties>
.....
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-storage-blob</artifactId>
    <version>12.11.1</version>
</dependency>
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-core-http-netty</artifactId>
    <version>1.10.0</version>
</dependency>

What problem was encountered?

During downloading a big file(3GB) using this code:

blobClient.downloadToFile(tempFile.toAbsolutePath().toString(), true);

This error occurs:

Caused by: reactor.core.Exceptions$ReactiveException: io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer
    at reactor.core.Exceptions.propagate(Exceptions.java:392)
    at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:97)
    at reactor.core.publisher.Mono.block(Mono.java:1703)
    at com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout(StorageImplUtils.java:128)
    at com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse(BlobClientBase.java:903)
    at com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse(BlobClientBase.java:873)
    at com.azure.storage.blob.specialized.BlobClientBase.downloadToFile(BlobClientBase.java:802)

Have you found a mitigation/solution?

No. Just looking for it.

msangel commented 3 years ago

Sorry, wrong location for the issue, moving there: https://github.com/Azure/azure-sdk-for-java/issues/22268