#5522 closed defect (fixed)
Upgrade failed: TracError: Missing "youngest_rev" in cache metadata
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | high | Milestone: | 0.10.5 |
Component: | general | Version: | 0.10.4 |
Severity: | major | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Hey there,
I recently tried an upgrade from 0.10 to 0.10.4, following the instructions in TracUpgrade. I installed the new version, ran trac-admin /var/lib/trac upgrade, and trac-admin /var/lib/trac wiki upgrade. When I restarted Apache, I continually receive the following error on each page request.
Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 406, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 191, in dispatch chosen_handler = self._pre_process_request(req, chosen_handler) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 263, in _pre_process_request chosen_handler = f.pre_process_request(req, chosen_handler) File "/usr/lib/python2.3/site-packages/trac/versioncontrol/api.py", line 73, in pre_process_request self.get_repository(req.authname).sync() File "/usr/lib/python2.3/site-packages/trac/versioncontrol/cache.py", line 97, in sync raise TracError('Missing "youngest_rev" in cache metadata') TracError: Missing "youngest_rev" in cache metadata
I've also tried removing /usr/share/trac and /usr/lib/python2.3/site-packages/trac and reinstalling. Same outcome. Any help is greatly appreciated. My trac installation is offline.
Attachments (0)
Change History (20)
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
comment:4 by , 18 years ago
It's nevertheless strange you had the error in the first place, as trac-admin ... upgrade
normally does insert this 'youngest_rev' value in the system table.
If someone has a reproducible recipe for this problem, please don't hesitate write it down here and to reopen the ticket.
comment:5 by , 18 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I just encountered the same problem when I upgraded our trac installations from 0.10.3 to 0.10.4. I followed the steps as detailed in the upgrade guide. After my first attempt, I started from scratch and removed the share/trac and python/site-packages/trac directories. Both attempts resulted in the same error.
We are currently using python 2.4.4 and sqlite 3.3.13. Inserting 'youngest_rev' into the database fixed the problem, although there was a typo in the above command. It should be
sqlite3 /var/lib/trac/db/trac.db "insert into system values ('youngest_rev', );"
comment:6 by , 18 years ago
After my last post, I discovered there is a bug in posts which include a single quote followed immediately by another single quote. That is why the first example was missing the empty quotes. I have added the example again, but this time wrapped in a code block. In a code block the single quotes remain.
sqlite3 /var/lib/trac/db/trac.db "insert into system values ('youngest_rev','');"
comment:7 by , 17 years ago
I just ran into the same problem moving a 0.10 dataset to another machine running 0.10.4 — even after running trac-upgrade. The above fix fixed the problem.
comment:8 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Sounds like we've got a fix. Closing again.
comment:9 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I got this same error on an upgrade from 0.10.3.1 to 0.10.4. The manual insert fixed it, but it seems like "trac-admin upgrade" has a bug.
comment:10 by , 17 years ago
Description: | modified (diff) |
---|---|
Keywords: | needinfo added |
Milestone: | → 0.10.5 |
Was the trac.versioncontrol.svn_fs component enabled during the upgrade? (and the repository_dir set?)
comment:11 by , 17 years ago
Had the same problem. In my case I first updated subversion, which broke some svn functionality after that i ran trac-admin upgrade.
In my case it seems like it was caused by my broken subversion install
comment:12 by , 17 years ago
Keywords: | needinfo removed |
---|
Ok, that makes sense. I should probably backport r5815 - thought I did, but apparently not.
comment:13 by , 17 years ago
I get the same error message. I have a fresh install "yum install trac" on RHEL5.1. The data is from another system running Trac 0.9 When I attempt to "fix" trac.db with the sqlite3 statement,
sqlite3 /var/lib/trac/db/trac.db "insert into system values ('youngest_rev', );"
I get the following; SQL error: near ")": syntax error
comment:14 by , 17 years ago
Due to formatting, the empty double-quotes are being dropped. Make sure you have two quotes before the final ) char.
sqlite3 /var/lib/trac/db/trac.db "insert into system values ('youngest_rev','');"
comment:15 by , 17 years ago
trac-admin upgrade won't be successful if repository location is invalid
for example, when I moved my trac/svn from windows to linux. I made svn-admin upgrade on linux, but didn't change repository_path in trac.ini.
You should correct svn repository_dir value before trac upgrade.
windows:
[trac] repository_dir = c:\svn\myproject
linux:
[trac] repository_dir = /var/lib/svn/myproject
comment:16 by , 17 years ago
Probably a cleaner way of fixing this is to perform a 'trac-admin … resync', which just worked for me.
comment:17 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
follow-up: 19 comment:18 by , 14 years ago
I had the same problem upgrading from 0.11 to 0.12. In my case the repository_dir does correctly point to the repository but we are using UNC paths e.g. repository_dir =
snap\svn\myproject
comment:19 by , 14 years ago
Replying to andrew.hardy@…:
I had the same problem upgrading from 0.11 to 0.12. In my case the repository_dir does correctly point to the repository but we are using UNC paths e.g. repository_dir =
snap\svn\myproject
\\snap\svn\myproject
comment:20 by , 14 years ago
[OT] should we make \\
more friendly with UNC paths? Matching for something like '\\\\(?:[^\w]|$)'
…
With a little bravery and some googling, this is resolved.
As suggested in another ticket, inserting the youngest_rev value into the trac.db file was the fix for this problem.
sqlite3 /var/lib/trac/db/trac.db "insert into system values ('youngest_rev', );"
Cheers, Tim Denike