Derby
  1. Derby
  2. DERBY-5266

Derby Database stored procedure is failing SYSCS_UTIL.SYSCS_BACKUP_DATABASE -urgent

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: None
    • Component/s: Services
    • Environment:
      We are using Windows 2003 server, Windows XP and Windows 7
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Data corruption, Seen in production

      Description

      We are facing the problem with derby Backup Database procedure function SYSCS_UTIL.SYSCS_BACKUP_DATABASE and
      this function failed to take the backup of the database and throws below error message.
      Below is the java code logic calling the procedure function.

      Connection conn = dataSource.getConnection();
      backupdirectory = dirLocation + "/" + DateUtils.formatDate(new Date(), DATE_FORMAT);
      CallableStatement stmt = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE");
      stmt.setString(1, backupdirectory);
      stmt.execute();
      stmt.close();
      } catch (SQLException exp)

      { log.error("Error in performing backup database :" + exp.getMessage()); }

      Pls see the Threaddump below.

      Job logger created for job 20110426115633543103
      Job execution started. Job program: [com.db.mbc.scheduler.jobs.DBBackupScheduleJob], Job parameters: [8501, 1942, 2011-04-26, 11:54:00, <parameter><dirLocator>d:/db/backup/test</dirLocator></parameter>, DBBP]
      Job Executer Signalling is not running...
      Job Executer Signalling is not running...
      Job Executer Signalling is not running...
      Job Executer Signalling is not running...
      Job Executer Signalling is not running...
      Job Executer Signalling is not running...
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      com.db.mbc.scheduler.jobs.JobExecutionException: Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.backUpDB(DBBackupScheduleJob.java:155)
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.executeJob(DBBackupScheduleJob.java:88)
      at com.db.mbc.scheduler.jobs.BaseScheduleJob.execute(BaseScheduleJob.java:97)
      at com.db.mbc.base.job.SpringAwareJobActionListener.actionFired(SpringAwareJobActionListener.java:73)
      at com.topgear.executer.impl.StdJobExecutionShell.run(StdJobExecutionShell.java:207)
      at com.topgear.threadpool.impl.StdThreadPool.run(StdThreadPool.java:168)
      at java.lang.Thread.run(Thread.java:595)
      Job execution COMPLETED with result [true]
      Job logger created for job 20110426115633543103
      Job execution started. Job program: [com.db.mbc.scheduler.jobs.DBBackupScheduleJob], Job parameters: [8501, 1942, 2011-04-26, 11:54:00, <parameter><dirLocator>d:/db/backup/test</dirLocator></parameter>, DBBP]
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      com.db.mbc.scheduler.jobs.JobExecutionException: Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.backUpDB(DBBackupScheduleJob.java:155)
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.executeJob(DBBackupScheduleJob.java:88)
      at com.db.mbc.scheduler.jobs.BaseScheduleJob.execute(BaseScheduleJob.java:97)
      at com.db.mbc.base.job.SpringAwareJobActionListener.actionFired(SpringAwareJobActionListener.java:73)
      at com.topgear.executer.impl.StdJobExecutionShell.run(StdJobExecutionShell.java:207)
      at com.topgear.threadpool.impl.StdThreadPool.run(StdThreadPool.java:168)
      at java.lang.Thread.run(Thread.java:595)
      Job execution COMPLETED with result [true]
      Job logger created for job 20110426115633543103
      Job execution started. Job program: [com.db.mbc.scheduler.jobs.DBBackupScheduleJob], Job parameters: [8501, 1942, 2011-04-26, 11:54:00, <parameter><dirLocator>d:/db/backup/test</dirLocator></parameter>, DBBP]
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      com.db.mbc.scheduler.jobs.JobExecutionException: Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.backUpDB(DBBackupScheduleJob.java:155)
      at com.db.mbc.scheduler.jobs.DBBackupScheduleJob.executeJob(DBBackupScheduleJob.java:88)
      at com.db.mbc.scheduler.jobs.BaseScheduleJob.execute(BaseScheduleJob.java:97)
      at com.db.mbc.base.job.SpringAwareJobActionListener.actionFired(SpringAwareJobActionListener.java:73)
      at com.topgear.executer.impl.StdJobExecutionShell.run(StdJobExecutionShell.java:207)
      at com.topgear.threadpool.impl.StdThreadPool.run(StdThreadPool.java:168)
      at java.lang.Thread.run(Thread.java:595)
      Job execution COMPLETED with result [true]
      Job logger created for job 20110426115633543103
      Job execution started. Job program: [com.db.mbc.scheduler.jobs.DBBackupScheduleJob], Job parameters: [8501, 1942, 2011-04-26, 11:54:00, <parameter><dirLocator>d:/db/backup/test</dirLocator></parameter>, DBBP]

        Activity

        Hide
        Rick Hillegas added a comment -

        I am closing this issue as not reproducible. This issue has been dormant for almost a year now. We can re-open it if more information becomes available.

        Show
        Rick Hillegas added a comment - I am closing this issue as not reproducible. This issue has been dormant for almost a year now. We can re-open it if more information becomes available.
        Hide
        Rick Hillegas added a comment -

        Hi Jayaprakash,

        Are you able to answer the questions which Mike proposed last June? Without more information, it will be hard to make any progress on this issue. Thanks.

        Show
        Rick Hillegas added a comment - Hi Jayaprakash, Are you able to answer the questions which Mike proposed last June? Without more information, it will be hard to make any progress on this issue. Thanks.
        Hide
        Rick Hillegas added a comment -

        Changing urgency to normal (this field belongs to the release manager). Marked this as a data corruption.

        Show
        Rick Hillegas added a comment - Changing urgency to normal (this field belongs to the release manager). Marked this as a data corruption.
        Hide
        Mike Matrigali added a comment -

        without seeing the database there is not much I can help with, other than the previous posts. The more you can tell us about
        the db, the more likely someone will be able to help. If you can't post the db, can you post a full directory listing of the log and
        seg0 directories including modify times and sizes of the files. ls -l does this if you have unix compatible tools.

        I still think you have a problem in the database and backup just happens to be finding it. Unfortunately the conisistency checker
        is not complete. It is strange that you got the error on a different container this time. Did you change the database since posting
        the original error? This time the error is on container 562448, page 5478. The hex dump shows that it is completely 0's, which
        is not a valid page for Derby. It would be interesting to tell if this page is at end of the file or not. The other issue I mentioned
        above describes a method for getting that information.

        If you run the backup twice in a row do you get the same container/page number with the error? Is there any disk problem
        going on? Is there anything unusual about the disk you are copying from?

        If it really is a problem in the db, and not a backup problem or an I/O problem on your machine - then one possible workaround
        would be to run offline compress on every table in your database. This may fail though, so I would execute this on a copy
        of the db, keeping your original. If the problem is a free page, rather than a used page then offline compress will likely
        work. If the problem is on some real page in a base table that the consistency checker does not look at, like a clob overflow
        chain then you will likely get a similar error. But determining this would also prove/disprove that backup is the issue or not.
        Running offline compress also will rebuild all your indexes so if there was a problem there, it will fix it. Unfortunately container
        562448 is a base table and not an index.

        Show
        Mike Matrigali added a comment - without seeing the database there is not much I can help with, other than the previous posts. The more you can tell us about the db, the more likely someone will be able to help. If you can't post the db, can you post a full directory listing of the log and seg0 directories including modify times and sizes of the files. ls -l does this if you have unix compatible tools. I still think you have a problem in the database and backup just happens to be finding it. Unfortunately the conisistency checker is not complete. It is strange that you got the error on a different container this time. Did you change the database since posting the original error? This time the error is on container 562448, page 5478. The hex dump shows that it is completely 0's, which is not a valid page for Derby. It would be interesting to tell if this page is at end of the file or not. The other issue I mentioned above describes a method for getting that information. If you run the backup twice in a row do you get the same container/page number with the error? Is there any disk problem going on? Is there anything unusual about the disk you are copying from? If it really is a problem in the db, and not a backup problem or an I/O problem on your machine - then one possible workaround would be to run offline compress on every table in your database. This may fail though, so I would execute this on a copy of the db, keeping your original. If the problem is a free page, rather than a used page then offline compress will likely work. If the problem is on some real page in a base table that the consistency checker does not look at, like a clob overflow chain then you will likely get a similar error. But determining this would also prove/disprove that backup is the issue or not. Running offline compress also will rebuild all your indexes so if there was a problem there, it will fix it. Unfortunately container 562448 is a base table and not an index.
        Hide
        Jayaprakash Kumar added a comment - - edited

        Hi Mike,

        I executed the system function SYSCS_UTIL.SYSCS_CHECK_TABLE as mentioned in the wiki, the result is all tables are OK, there is NO bad index error.

        After the above process i executed once again the BackUP function(SYSCS_UTIL.SYSCS_BACKUP_DATABASE) but still the same issue...

        ij> CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup');
        ERROR 08006: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there w
        as no architected message
        ij>

        Derby.log
        2011-06-10 09:38:08.187 GMT : Apache Derby Network Server - 10.5.3.0 - (802917) started and ready to accept connections on port 1527
        ----------------------------------------------------------------
        2011-06-10 09:38:34.436 GMT:
        Booting Derby version The Apache Software Foundation - Apache Derby - 10.5.3.0 - (802917): instance a816c00e-0130-78ea-708c-0000511839b4
        on database directory C:\DB\DBDIMB\Database\mbcdb

        Database Class Loader started - derby.database.classpath=''
        2011-06-10 09:45:03.259 GMT Thread[DRDAConnThread_3,5,main] (XID = 52854284), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.H129-938717739631323355

        {1}), Cleanup action starting
        2011-06-10 09:45:03.259 GMT Thread[DRDAConnThread_3,5,main] (XID = 52854284), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.H129-938717739631323355{1}

        ), Failed Statement is: CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup')
        ERROR XSDBB: Unknown page format at page Page(5478,Container(0, 562448)), page dump follows: Hex dump:
        00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00000080: 0000 0000 0000 0000 0000 0000 0000 0000..........00007f50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007f60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007f80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007f90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007fa0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007fb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007fc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007fd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
        00007ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................

        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
        at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
        at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source)
        at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source)
        at org.apache.derby.exe.acf81e0010x0130x78eax708cx0000511839b41.g0(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source)
        at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

        2011-06-10 09:45:03.369 GMT:
        Shutting down instance a816c00e-0130-78ea-708c-0000511839b4
        ----------------------------------------------------------------
        Cleanup action completed

        Please help, any Workaround or Permanent solution for this issue....

        Show
        Jayaprakash Kumar added a comment - - edited Hi Mike, I executed the system function SYSCS_UTIL.SYSCS_CHECK_TABLE as mentioned in the wiki, the result is all tables are OK, there is NO bad index error. After the above process i executed once again the BackUP function(SYSCS_UTIL.SYSCS_BACKUP_DATABASE) but still the same issue... ij> CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup'); ERROR 08006: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there w as no architected message ij> Derby.log 2011-06-10 09:38:08.187 GMT : Apache Derby Network Server - 10.5.3.0 - (802917) started and ready to accept connections on port 1527 ---------------------------------------------------------------- 2011-06-10 09:38:34.436 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.5.3.0 - (802917): instance a816c00e-0130-78ea-708c-0000511839b4 on database directory C:\DB\DBDIMB\Database\mbcdb Database Class Loader started - derby.database.classpath='' 2011-06-10 09:45:03.259 GMT Thread [DRDAConnThread_3,5,main] (XID = 52854284), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.H129-938717739631323355 {1}), Cleanup action starting 2011-06-10 09:45:03.259 GMT Thread [DRDAConnThread_3,5,main] (XID = 52854284), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.H129-938717739631323355{1} ), Failed Statement is: CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup') ERROR XSDBB: Unknown page format at page Page(5478,Container(0, 562448)), page dump follows: Hex dump: 00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000080: 0000 0000 0000 0000 0000 0000 0000 0000..........00007f50: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f60: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f90: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007fa0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007fb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007fc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007fd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source) at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source) at org.apache.derby.exe.acf81e0010x0130x78eax708cx0000511839b41.g0(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source) at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) 2011-06-10 09:45:03.369 GMT: Shutting down instance a816c00e-0130-78ea-708c-0000511839b4 ---------------------------------------------------------------- Cleanup action completed Please help, any Workaround or Permanent solution for this issue....
        Hide
        Mike Matrigali added a comment -

        also you could look at DERBY-5234 for the kind of information that you could provide that might help understand what is going
        on.

        Show
        Mike Matrigali added a comment - also you could look at DERBY-5234 for the kind of information that you could provide that might help understand what is going on.
        Hide
        Mike Matrigali added a comment -

        See this wiki entry for info on consistency checker, determining table name and recovering from a bad index. I believe that at least your current error is in an index so you should be able to recover from it.

        http://wiki.apache.org/db-derby/DatabaseConsistencyCheck

        Show
        Mike Matrigali added a comment - See this wiki entry for info on consistency checker, determining table name and recovering from a bad index. I believe that at least your current error is in an index so you should be able to recover from it. http://wiki.apache.org/db-derby/DatabaseConsistencyCheck
        Hide
        Mike Matrigali added a comment -

        the derby.log is indicating that there is a problem in the database, that is probably separate from
        the backup. To verify you should run the consistency checker across your whole database to
        get a better idea where the problem is.

        Often these issues happened sometime in the pas and can lie dormant until the specific page with the problem is referenced.
        Since backup visits every page in the database it is often uncovers these problems.

        The problem you are now seeing is in container id 1217, page 194123.

        You reported this against 10.5, but your derby.log indicates you are running 10.4.1.3 - (648739). Can you tell us about the
        history of this database. Do you know what version(s) of Derby have been run against it. Has it been soft or hard upgraded
        in the past. Have you every had previous boot problems on the database that you have "solved" by hand manipulating the
        files in either the log or seg0 directory.

        To diagnose the issue more can you make a copy of this database and run it against the latest version of Derby - 10.8.
        I don't expect this to fix this problem, but hope at least the diagnostics are better.

        What JVM are you using?

        Show
        Mike Matrigali added a comment - the derby.log is indicating that there is a problem in the database, that is probably separate from the backup. To verify you should run the consistency checker across your whole database to get a better idea where the problem is. Often these issues happened sometime in the pas and can lie dormant until the specific page with the problem is referenced. Since backup visits every page in the database it is often uncovers these problems. The problem you are now seeing is in container id 1217, page 194123. You reported this against 10.5, but your derby.log indicates you are running 10.4.1.3 - (648739). Can you tell us about the history of this database. Do you know what version(s) of Derby have been run against it. Has it been soft or hard upgraded in the past. Have you every had previous boot problems on the database that you have "solved" by hand manipulating the files in either the log or seg0 directory. To diagnose the issue more can you make a copy of this database and run it against the latest version of Derby - 10.8. I don't expect this to fix this problem, but hope at least the diagnostics are better. What JVM are you using?
        Hide
        Jayaprakash Kumar added a comment -

        Hi Kristian,

        The derby.log created in the server, below is the attached log.

        Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to accept connections on port 1527 at 2011-06-09 13:52:55.780 GMT
        ----------------------------------------------------------------
        2011-06-09 13:53:10.483 GMT:
        Booting Derby version The Apache Software Foundation - Apache Derby - 10.4.1.3 - (648739): instance a816c00e-0130-74ad-5909-fffffe3e043d
        on database directory C:\DB\DBDIMB\Database\mbcdb

        Database Class Loader started - derby.database.classpath=''
        2011-06-09 14:02:10.527 GMT Thread[DRDAConnThread_4,5,main] (XID = 821264864), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.G4EA-4197072070104639719

        {2}), Cleanup action starting
        2011-06-09 14:02:10.527 GMT Thread[DRDAConnThread_4,5,main] (XID = 821264864), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.G4EA-4197072070104639719{2}

        ), Failed Statement is: CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup')
        ERROR XSDB1: Unknown page format at page Page(194123,Container(0, 1217))
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
        at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
        at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source)
        at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source)
        at org.apache.derby.exe.ac48d7402ax0130x74adx5909xfffffe3e043d0.g0(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source)
        at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
        Caused by: ERROR XBM0U: No class was registered for identifier 0.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.classFromIdentifier(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.newInstanceFromIdentifier(Unknown Source)
        at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source)
        ... 31 more
        ============= begin nested exception, level (1) ===========
        ERROR XBM0U: No class was registered for identifier 0.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.classFromIdentifier(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.newInstanceFromIdentifier(Unknown Source)
        at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source)
        at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
        at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
        at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source)
        at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source)
        at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source)
        at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source)
        at org.apache.derby.exe.ac48d7402ax0130x74adx5909xfffffe3e043d0.g0(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source)
        at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
        ============= end nested exception, level (1) ===========

        2011-06-09 14:02:10.699 GMT:
        Shutting down instance a816c00e-0130-74ad-5909-fffffe3e043d
        ----------------------------------------------------------------
        Cleanup action completed

        Show
        Jayaprakash Kumar added a comment - Hi Kristian, The derby.log created in the server, below is the attached log. Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to accept connections on port 1527 at 2011-06-09 13:52:55.780 GMT ---------------------------------------------------------------- 2011-06-09 13:53:10.483 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.4.1.3 - (648739): instance a816c00e-0130-74ad-5909-fffffe3e043d on database directory C:\DB\DBDIMB\Database\mbcdb Database Class Loader started - derby.database.classpath='' 2011-06-09 14:02:10.527 GMT Thread [DRDAConnThread_4,5,main] (XID = 821264864), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.G4EA-4197072070104639719 {2}), Cleanup action starting 2011-06-09 14:02:10.527 GMT Thread [DRDAConnThread_4,5,main] (XID = 821264864), (SESSIONID = 1), (DATABASE = C:/DB/DBDIMB/Database/mbcdb), (DRDAID = NF000001.G4EA-4197072070104639719{2} ), Failed Statement is: CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('C:\DatabaseBackup') ERROR XSDB1: Unknown page format at page Page(194123,Container(0, 1217)) at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source) at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source) at org.apache.derby.exe.ac48d7402ax0130x74adx5909xfffffe3e043d0.g0(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source) at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) Caused by: ERROR XBM0U: No class was registered for identifier 0. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.classFromIdentifier(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.newInstanceFromIdentifier(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source) ... 31 more ============= begin nested exception, level (1) =========== ERROR XBM0U: No class was registered for identifier 0. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.classFromIdentifier(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.newInstanceFromIdentifier(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.getLatchedPage(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.privBackupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derby.impl.store.raw.data.RAFContainer.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.backupContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.backupDataFiles(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.backup(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.backup(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.backup(Unknown Source) at org.apache.derby.catalog.SystemProcedures.SYSCS_BACKUP_DATABASE(Unknown Source) at org.apache.derby.exe.ac48d7402ax0130x74adx5909xfffffe3e043d0.g0(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source) at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) ============= end nested exception, level (1) =========== 2011-06-09 14:02:10.699 GMT: Shutting down instance a816c00e-0130-74ad-5909-fffffe3e043d ---------------------------------------------------------------- Cleanup action completed
        Hide
        Kristian Waagan added a comment -

        Are there any messages in the Derby log on the server side, or has the log been redirected to another destination?
        (written to derby.log by default)

        Show
        Kristian Waagan added a comment - Are there any messages in the Derby log on the server side, or has the log been redirected to another destination? (written to derby.log by default)
        Hide
        Jayaprakash Kumar added a comment -

        Below is the error message....

        Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
        Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
        com.db.mbc.scheduler.jobs.JobExecutionException: Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message

        Show
        Jayaprakash Kumar added a comment - Below is the error message.... Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message com.db.mbc.scheduler.jobs.JobExecutionException: Error in performing backup database :A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message

          People

          • Assignee:
            Unassigned
            Reporter:
            Jayaprakash Kumar
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development