Problem during database upgrade from 2.2 to 3.0.4

I start to be crazy with the upgrading of youtrack beetween version 2.2 and 3.0.4.

The content of my last youtrack backup :

ll teamcity:

-rw-r--r--   1 root root 8388586 2010-11-05 00:48 00000005.jdb

-rw-r--r--   1 root root 8388568 2011-02-07 17:22 00000006.jdb

-rw-r--r--   1 root root 8388581 2011-05-26 23:26 00000007.jdb

-rw-r--r--   1 root root 8388163 2011-09-29 14:10 00000008.jdb

-rw-r--r--   1 root root  716830 2011-09-29 14:12 00000009.jdb

drwxr-xr-x 258 root root   16384 2011-09-30 17:07 blobs

when I execute :

java -jar moses.jar ./teamsysdata ./teamsysdatanew

It ends with :

Exception in thread "main" com.jetbrains.teamsys.database.persistence.exceptions.PhysicalLayerException: com.sleepycat.je.EnvironmentFailureException: (JE 4.1.7) ./teamsysdata fetchTarget of 0x3/0x5e92c3 parent IN=344773 IN class=com.sleepycat.je.tree.DBIN lastFullVersion=0x8/0x4f8ac7 parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.

        at com.jetbrains.teamsys.database.je.JEDataEnvironment.checkLockRetry(JEDataEnvironment.java:265)

        at com.sleepycat.je.JEStatefulStoreCursor.checkLockRetry(JEStatefulStoreCursor.java:188)

        at com.sleepycat.je.JEStatefulStoreCursor.getNext(JEStatefulStoreCursor.java:130)

        at jetbrains.dnq.moses.Moses.copyStores(Moses.java:63)

        at jetbrains.dnq.moses.Moses.main(Moses.java:173)

Caused by: com.sleepycat.je.EnvironmentFailureException: (JE 4.1.7) ./teamsysdata fetchTarget of 0x3/0x5e92c3 parent IN=344773 IN class=com.sleepycat.je.tree.DBIN lastFullVersion=0x8/0x4f8ac7 parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.

        at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1337)

        at com.sleepycat.je.tree.BIN.fetchTarget(BIN.java:1367)

        at com.sleepycat.je.dbi.CursorImpl.fetchCurrent(CursorImpl.java:2499)

        at com.sleepycat.je.dbi.CursorImpl.fetchCurrent(CursorImpl.java:2526)

        at com.sleepycat.je.dbi.CursorImpl.getCurrentAlreadyLatched(CursorImpl.java:1545)

        at com.sleepycat.je.dbi.CursorImpl.getNextWithKeyChangeStatus(CursorImpl.java:1692)

        at com.sleepycat.je.dbi.CursorImpl.getNext(CursorImpl.java:1617)

        at com.sleepycat.je.Cursor.retrieveNextAllowPhantoms(Cursor.java:2485)

        at com.sleepycat.je.Cursor.retrieveNext(Cursor.java:2304)

        at com.sleepycat.je.Cursor.getNext(Cursor.java:1013)

        at com.sleepycat.je.JEStatefulStoreCursor.getNext(JEStatefulStoreCursor.java:122)

        ... 2 more

Caused by: java.io.FileNotFoundException: ./teamsysdata/00000003.jdb (No such file or directory)

        at java.io.RandomAccessFile.open(Native Method)

        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)

        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)

        at com.sleepycat.je.log.FileManager$1.<init>(FileManager.java:995)

        at com.sleepycat.je.log.FileManager.openFileHandle(FileManager.java:994)

        at com.sleepycat.je.log.FileManager.getFileHandle(FileManager.java:890)

        at com.sleepycat.je.log.LogManager.getLogSource(LogManager.java:1074)

        at com.sleepycat.je.log.LogManager.getLogEntry(LogManager.java:778)

        at com.sleepycat.je.log.LogManager.getLogEntryAllowInvisibleAtRecovery(LogManager.java:742)

        at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1320)

12 comments
Comment actions Permalink

I gave up and used my backup to go back on the 2.2 version which is working without problem. It's been very frustrating as I never had such problem with jetbrains products (I upgraded yesterday my Teamcity from 5 to 6.4 without any problem).

0
Comment actions Permalink

Hi replix,

Most likely this rollback won't help. Do you have any backup file containing

00000003.jdb? If yes please restore 00000003.jdb from the latest backup file

and repeat upgrade procedure. Looking forward to know about the result.

--

Best regards,

Vyacheslav Lukianov

Software Developer

JetBrains, Inc.

http://www.jetbrains.com

"Develop with pleasure!"

I gave up and used my backup to go back on the 2.2 version which is

working without problem. It's been very frustrating as I never had

such problem with jetbrains products (I upgraded yesterday my Teamcity

from 5 to 6.4 without any problem).

---

Original message URL:

http://devnet.jetbrains.net/message/5320994#5320994

0
Comment actions Permalink

My backup has succeed and I have my YouTrack 2.2.0 (build #802) up and runing again.

Here an ls on /home/youtrack/teamsysdata :

total 33620

-rw-r--r--   1 youtrack youtrack 8388586 2010-11-05 00:48 00000005.jdb

-rw-r--r--   1 youtrack youtrack 8388568 2011-02-07 17:22 00000006.jdb

-rw-r--r--   1 youtrack youtrack 8388581 2011-05-26 23:26 00000007.jdb

-rw-r--r--   1 youtrack youtrack 8388163 2011-09-29 14:10 00000008.jdb

-rw-r--r--   1 youtrack youtrack  795009 2011-10-04 01:01 00000009.jdb

drwxr-xr-x 258 youtrack youtrack   16384 2011-09-30 17:14 blobs

-rw-r--r--   1 youtrack youtrack       0 2011-09-30 17:34 je.info.0

-rw-r--r--   1 youtrack youtrack       0 2011-09-30 17:34 je.info.0.lck

-rw-r--r--   1 youtrack youtrack       0 2011-09-30 17:34 je.lck

drwxr-xr-x   2 youtrack youtrack    4096 2011-09-30 17:34 textindex

No 00000003.jdb file!!!

And the version 2.2 is working with all my datas.

0
Comment actions Permalink

Please clarify have you ever performed backing up from within YouTrack (Database

Backup page in Administration)?

My backup has succeed and I have my  YouTrack 2.2.0 (build #802) up

and runing again.

Here an ls on /home/youtrack/teamsysdata :

total 33620

-rw-rr   1 youtrack youtrack 8388586 2010-11-05 00:48 00000005.jdb

-rw-rr   1 youtrack youtrack 8388568 2011-02-07 17:22 00000006.jdb

-rw-rr   1 youtrack youtrack 8388581 2011-05-26 23:26 00000007.jdb

-rw-rr   1 youtrack youtrack 8388163 2011-09-29 14:10 00000008.jdb

-rw-rr   1 youtrack youtrack  795009 2011-10-04 01:01 00000009.jdb

drwxr-xr-x 258 youtrack youtrack   16384 2011-09-30 17:14 blobs

-rw-rr   1 youtrack youtrack       0 2011-09-30 17:34 je.info.0

-rw-rr   1 youtrack youtrack       0 2011-09-30 17:34

je.info.0.lck

-rw-rr   1 youtrack youtrack       0 2011-09-30 17:34 je.lck

drwxr-xr-x   2 youtrack youtrack    4096 2011-09-30 17:34 textindex

No 00000003.jdb file!!!

And the version 2.2 is working with all my datas.

---

Original message URL:

http://devnet.jetbrains.net/message/5321222#5321222

0
Comment actions Permalink

My backups are done every night using the cron feature :

Backup location: /home/youtrack/teamsysdata-backup
Cron expression: 0 0 1 * * ?

0
Comment actions Permalink

Ok, there should a list of .tar.gzip files. Does any of these files contain

00000003.jdb?

My backups are done every night using the cron feature :

Backup location: /home/youtrack/teamsysdata-backup *Cron

expression:* 0 0 1 * * ?

---

Original message URL:

http://devnet.jetbrains.net/message/5321227#5321227

0
Comment actions Permalink

Yes, there are some but I did not keep all the daily backups from the first installation of YouTrack. As I do full backups, I have not thought it was necessary to keep old backups.

Obviously I was wrong.

Is there a workaround to build theses missing files or am I stucked with youtrack 2.2?

0
Comment actions Permalink

None of the remaining backups contain the 00000003.jdb file, right?

Yes, there are some but I did not keep all the daily backups from the

first installation of YouTrack. As I do full backups, I have not

thought it was necessary to keep old backups.

Obviously I was wrong.

---

Original message URL:

http://devnet.jetbrains.net/message/5321311#5321311

0
Comment actions Permalink

If it is possible to share your database with us (in order to try to restore

it) contact me at lvo@intellij.net.

--

Best regards,

Vyacheslav Lukianov

Software Developer

JetBrains, Inc.

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Thanks a lot Vyacheslav,

Every is working now with the repair you've done on the database.

Best Regards,

Gaetan,

0
Comment actions Permalink
I am having this same issue. I am (sadly) just now trying to upgrade from 2 to 4. Is there anything I can do to fix my database?
0

Please sign in to leave a comment.