java.net.SocketException: Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry

Sakai JIRA | Tim Donohue | 3 years ago
  1. 0

    When performing a backup to DuraCloud using the Replication Task Suite, sometimes larger files (>400MB) will experience random "Caused by: java.net.SocketException: Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry at org.dspace.ctask.replicate.store.DuraCloudObjectStore.uploadReplica(DuraCloudObjectStore.java:193) at org.dspace.ctask.replicate.store.DuraCloudObjectStore.transferObject(DuraCloudObjectStore.java:159) at org.dspace.ctask.replicate.ReplicaManager.transferObject(ReplicaManager.java:259) at org.dspace.ctask.replicate.TransmitAIP.perform(TransmitAIP.java:68) at org.dspace.curate.ResolvedTask.perform(ResolvedTask.java:88) at org.dspace.curate.Curator$TaskRunner.run(Curator.java:563) Unfortunately, when this error is encountered (from commandline or Admin UI), the entire backup to DuraCloud fails/halts, and it needs to be restarted from the beginning. After talking with the DuraCloud team, it sounds like these are issues in Amazon S3 itself, and are essentially temporary timeouts (if you try the upload again, it almost always will succeed the second time). The recommended resolution is to attempt to catch the error and automatically "retry" the upload to DuraCloud (a set number of times). In addition, we should enhance the error handling in the Replication Task Suite so that it's possible to report individual backup failures, but continue the backup process. We should not always return a complete failure if a single error is encountered...instead we should backup what content we can and report which content failed to be backed up.

    Sakai JIRA | 3 years ago | Tim Donohue
    java.net.SocketException: Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry
  2. 0

    When performing a backup to DuraCloud using the Replication Task Suite, sometimes larger files (>400MB) will experience random "Caused by: java.net.SocketException: Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry at org.dspace.ctask.replicate.store.DuraCloudObjectStore.uploadReplica(DuraCloudObjectStore.java:193) at org.dspace.ctask.replicate.store.DuraCloudObjectStore.transferObject(DuraCloudObjectStore.java:159) at org.dspace.ctask.replicate.ReplicaManager.transferObject(ReplicaManager.java:259) at org.dspace.ctask.replicate.TransmitAIP.perform(TransmitAIP.java:68) at org.dspace.curate.ResolvedTask.perform(ResolvedTask.java:88) at org.dspace.curate.Curator$TaskRunner.run(Curator.java:563) Unfortunately, when this error is encountered (from commandline or Admin UI), the entire backup to DuraCloud fails/halts, and it needs to be restarted from the beginning. After talking with the DuraCloud team, it sounds like these are issues in Amazon S3 itself, and are essentially temporary timeouts (if you try the upload again, it almost always will succeed the second time). The recommended resolution is to attempt to catch the error and automatically "retry" the upload to DuraCloud (a set number of times). In addition, we should enhance the error handling in the Replication Task Suite so that it's possible to report individual backup failures, but continue the backup process. We should not always return a complete failure if a single error is encountered...instead we should backup what content we can and report which content failed to be backed up.

    Sakai JIRA | 3 years ago | Tim Donohue
    java.net.SocketException: Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry
  3. 0

    What's causing my java.net.SocketException: Connection reset?

    Stack Overflow | 8 years ago | Richard Everett
    java.net.SocketException: Connection reset errors in our logs for a component that calls a third party Web service that sends SMS messages. Our application is written in Java and is sat on top of Tomcat 5.5. It was written by contractors who are no longer with us. The current team has no real Java expertise, and we're unsure as to where the Connection reset error is actually coming from, and how to go about debugging. The issue appears to be completely intermittent, and unrelated to the messages we are attempting to send. Any suggestions on what the typical causes of this exception might be, and how we might proceed, are welcome. The whole call stack is included below for completeness. (com.companyname.mtix.sms is our component) java.net.SocketException: Connection reset
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CR failing to connect backend server which has SSL enabled

    GitHub | 7 months ago | mzico
    java.net.SocketException: Connection reset', diagnosticMessage='An error occurred while attempting to send the LDAP message to server company:636: java.net.SocketException: Connection reset')
  6. 0

    Deadlock -> Out of Threads -> Strange Exception -> OutOfMemory -> Server Death. Bug in org.apache.naming.resources.ProxyDirContext.cacheLoad?

    tomcat-users | 1 decade ago | Leon Rosenberg
    java.net.SocketException: Connection reset the out of memory error is repeated 41 times. After all the cpu load gone down to zero and the server stoped responding (no wonder without free threads or memory). The thread dump (can be submitted if someone is interested) contains 678 threads waiting on 9 JspServletWrapper Objects ( The nine looks like: "http-8580-Processor16777" daemon prio=1 tid=0xc40b5890 nid=0x236f waiting for monitor entry [0xc13fe000..0xc13ff840]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.SocketException

      Connection reset." errors from Amazon S3 storage. In the DSpace logs, these errors actually look like: Could not add content ITEM@123456-789.zip with type application/zip and size 466096426 to S3 bucket akiajpoktiep72aase4a.my-backup due to error: Encountered an exception and couldn't reset the stream to retry

      at org.dspace.ctask.replicate.store.DuraCloudObjectStore.uploadReplica()
    2. org.dspace.ctask
      TransmitAIP.perform
      1. org.dspace.ctask.replicate.store.DuraCloudObjectStore.uploadReplica(DuraCloudObjectStore.java:193)
      2. org.dspace.ctask.replicate.store.DuraCloudObjectStore.transferObject(DuraCloudObjectStore.java:159)
      3. org.dspace.ctask.replicate.ReplicaManager.transferObject(ReplicaManager.java:259)
      4. org.dspace.ctask.replicate.TransmitAIP.perform(TransmitAIP.java:68)
      4 frames
    3. DSpace Kernel :: API and Implementation
      Curator$TaskRunner.run
      1. org.dspace.curate.ResolvedTask.perform(ResolvedTask.java:88)
      2. org.dspace.curate.Curator$TaskRunner.run(Curator.java:563)
      2 frames