Uploaded image for project: 'NetarchiveSuite'
  1. NetarchiveSuite
  2. NAS-2008

ReplicaCacheDatabase doesn't realise the connection is down (TEST11A)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.18.0
    • None
    • Archive
    • None
    • Hide

      Install NAS-system
      Start small selective harvest (e.g. of netarkivet.dk)
      Wait for the harvest to go in STARTED mode.
      Shutdown admin database
      Wait for the first upload to commence, and that the Arcrepository fails to connect to the admin database, and then waits 6 minutes before retrying..
      Start admin database
      Verify that all files belonging to the harvest is uploaded correctly.

      Show
      Install NAS-system Start small selective harvest (e.g. of netarkivet.dk) Wait for the harvest to go in STARTED mode. Shutdown admin database Wait for the first upload to commence, and that the Arcrepository fails to connect to the admin database, and then waits 6 minutes before retrying.. Start admin database Verify that all files belonging to the harvest is uploaded correctly.

    Description

      In TEST11A, we initiate a harvest, and then shutdown the archive database.
      The arcrepository doesn't seem to realise that the connection is down.
      Instead, we see SQLException like

      The returned message 'ID:116-130.226.228.8(cf:c7:d4:d2:35:19)-45924-1323263619664: To TEST11A_COMMON_THE_REPOS ReplyTo TEST11A_COMMON_THIS_REPOS_CLIENT_130_226_228_8_HCS_HIGH Error: dk.netarkivet.common.exceptions.IOFailure: SQL error preparing statement SELECT COUNT(*) FROM file WHERE filename = ? args [500-1-20111207130333-00000-kb-test-har-002.kb.dk.arc]
      SQLException trace:
      SQL State:08006
      Error Code:40000
      java.sql.SQLNonTransientConnectionException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes.  The connection has been terminated.
      	at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
      	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      	at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
      	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
      	at dk.netarkivet.common.utils.DBUtils.prepareStatement(DBUtils.java:243)
      	at dk.netarkivet.common.utils.DBUtils.selectIntValue(DBUtils.java:111)
      	at dk.netarkivet.archive.arcrepositoryadmin.ReplicaCacheDatabase.existsFileInDB(ReplicaCacheDatabase.java:639)
      	at dk.netarkivet.archive.arcrepositoryadmin.DatabaseAdmin.hasEntry(DatabaseAdmin.java:109)
      	at dk.netarkivet.archive.arcrepository.ArcRepository.store(ArcRepository.java:243)
      	at dk.netarkivet.archive.arcrepository.distribute.ArcRepositoryServer.visit(ArcRepositoryServer.java:87)
      	at dk.netarkivet.archive.arcrepository.distribute.StoreMessage.accept(StoreMessage.java:78)
      	at dk.netarkivet.archive.distribute.ArchiveMessageHandler.onMessage(ArchiveMessageHandler.java:83)
      	at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.deliverAndAcknowledge(MessageConsumerImpl.java:338)
      	at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.onMessage(MessageConsumerImpl.java:273)
      	at com.sun.messaging.jmq.jmsclient.SessionReader.deliver(SessionReader.java:113)
      	at com.sun.messaging.jmq.jmsclient.ConsumerReader.run(ConsumerReader.java:186)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: org.apache.derby.client.am.DisconnectException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes.  The connection has been terminated.
      	at org.apache.derby.client.net.Reply.fill(Unknown Source)
      	at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Unknown Source)
      	at org.apache.derby.client.net.Reply.readDssHeader(Unknown Source)
      	at org.apache.derby.client.net.Reply.startSameIdChainParse(Unknown Source)
      	at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
      	at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
      	at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
      	at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
      	at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
      	at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
      	at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
      	at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
      

      Attachments

        Issue Links

          Activity

            People

              svc Søren Vejrup Carlsen (Inactive)
              svc Søren Vejrup Carlsen (Inactive)
              Colin Rosenthal Colin Rosenthal
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: