Illegal character at cache access after update 3.13

64 views
Skip to first unread message

Martin Wölfle

unread,
Jan 15, 2026, 5:12:30 AM (4 days ago) Jan 15
to Repo and Gerrit Discussion
What steps will reproduce the problem?
1. Update from 3.11 to 3.12 to 3.13
2. After Update Gerrit runs but shows error 500
3. Error_log shows following entries:

[2026-01-14T12:01:52.656+01:00] [DiskCache-Store-0] WARN  com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot put into cache jdbc:h2:file:///C:/Gerrit/cache/web_sessions-v2;DB_CLOSE_DELAY=-1
org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit/cache/web_sessions-v2" [50000-240]

[2026-01-14T12:01:52.780+01:00] [HTTP GET /changes/?O=5000081&S=0&q=has%3Adraft%20limit%3A10&q=attention%3Aself%20limit%3A25&q=is%3Aopen%20owner%3Aself%2 (username from xx.xx.xx.xx)] WARN  com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot read cache jdbc:h2:file:///C:/Gerrit/cache/accounts-v2;DB_CLOSE_DELAY=-1 for Key{accountId=15, id=AnyObjectId[f8bbbe424a88482e4291fb0f5bec3a183bed4e91]}
org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit/cache/accounts-v2" [50000-240]

Nothing is written to cache folder. In Gerrit version 3.11 cache was written and Gerrit runs correctly.

Dennis W

unread,
Jan 15, 2026, 5:21:06 AM (4 days ago) Jan 15
to Repo and Gerrit Discussion
Hi,

in 3.12 the storage backend for the persistent caches was changed. see [1]
Did you migrate or complete rebuild the cache after your upgrade?

I also missed that when I was testing 3.12 (see my question [2]). The fix for me was deleting the caches and completely reindexing. 
But if you have a big Gerrit setup, you might want to think about using the H2 migration tool mentioned in [1].

 

Martin Wölfle

unread,
Jan 15, 2026, 5:46:45 AM (4 days ago) Jan 15
to Repo and Gerrit Discussion
Hi, 

yes I have done it with deleting the caches and completely reindexing while init process.
The reindexing tooks long and finished successfully.

BR

Martin Wölfle

unread,
Jan 15, 2026, 7:31:22 AM (4 days ago) Jan 15
to Repo and Gerrit Discussion
After further investigation, I think this behavior is a bug of Gerrit running in Windows environment. In gerrit.config the entry cache is set to directory = cache. In the log file Gerrit write c:/Gerrit/cache. with illegal character [:]. But this is set by Gerrit itself.
Can anybody confirm this?

Matthias Sohn

unread,
Jan 15, 2026, 8:12:44 AM (4 days ago) Jan 15
to Dennis W, Repo and Gerrit Discussion
On Thu, Jan 15, 2026 at 11:21 AM 'Dennis W' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Hi,

Martin Wölfle schrieb am Donnerstag, 15. Januar 2026 um 11:12:30 UTC+1:
What steps will reproduce the problem?
1. Update from 3.11 to 3.12 to 3.13
2. After Update Gerrit runs but shows error 500
3. Error_log shows following entries:

[2026-01-14T12:01:52.656+01:00] [DiskCache-Store-0] WARN  com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot put into cache jdbc:h2:file:///C:/Gerrit/cache/web_sessions-v2;DB_CLOSE_DELAY=-1
org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit/cache/web_sessions-v2" [50000-240]

[2026-01-14T12:01:52.780+01:00] [HTTP GET /changes/?O=5000081&S=0&q=has%3Adraft%20limit%3A10&q=attention%3Aself%20limit%3A25&q=is%3Aopen%20owner%3Aself%2 (username from xx.xx.xx.xx)] WARN  com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot read cache jdbc:h2:file:///C:/Gerrit/cache/accounts-v2;DB_CLOSE_DELAY=-1 for Key{accountId=15, id=AnyObjectId[f8bbbe424a88482e4291fb0f5bec3a183bed4e91]}
org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit/cache/accounts-v2" [50000-240]

Nothing is written to cache folder. In Gerrit version 3.11 cache was written and Gerrit runs correctly.

in 3.12 the storage backend for the persistent caches was changed. see [1]
Did you migrate or complete rebuild the cache after your upgrade?

I also missed that when I was testing 3.12 (see my question [2]). The fix for me was deleting the caches and completely reindexing. 

Deleting the caches doesn't require reindexing. 
Gerrit 3.12 uses different file names for the caches with the postfix "-v2"
hence you could have simply started Gerrit after the upgrade and then delete 
the old caches (the files without the "-v2" postfix) which aren't used anymore in 3.12.
Migrating the old caches to h2 v2 before the upgrade can avoid the performance dip
caused by starting with empty v2 caches.
 
But if you have a big Gerrit setup, you might want to think about using the H2 migration tool mentioned in [1].

 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/81c283ab-46f1-4b76-bfcd-7b34ee7f22den%40googlegroups.com.

Dennis W

unread,
Jan 15, 2026, 8:29:09 AM (4 days ago) Jan 15
to Repo and Gerrit Discussion
Martin Wölfle schrieb am Donnerstag, 15. Januar 2026 um 13:31:22 UTC+1:
After further investigation, I think this behavior is a bug of Gerrit running in Windows environment. In gerrit.config the entry cache is set to directory = cache. In the log file Gerrit write c:/Gerrit/cache. with illegal character [:]. But this is set by Gerrit itself.
Can anybody confirm this?

You are correct. I just tried to initialize a completely fresh Gerrit 3.13 on Windows and it failed with basically the same message.

C:\Gerrit313Test>"%JDK21_LTS%\bin\java" -jar gerrit-3.13.1.war init --batch
[2026-01-15 14:15:25,677] [main] INFO  com.google.gerrit.server.config.GerritServerConfigProvider : No C:\Gerrit313Test\.\etc\gerrit.config; assuming defaults
Auto-configured "receive.autogc = false" to disable auto-gc after git-receive-pack.
Generating SSH host key ... rsa... ed25519... ecdsa 256... ecdsa 384... ecdsa 521... done
Initialized C:\Gerrit313Test
Jan. 15, 2026 2:15:28 PM org.apache.lucene.internal.vectorization.VectorizationProvider lookup
WARNUNG: Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
Reindexed 0 documents in accounts index in 0,0s (0,0/s)
Index accounts in version 15 is ready
Reindexing groups:      100% (3/3)
Reindexed 3 documents in groups index in 0,2s (15,1/s)
Index groups in version 12 is ready
Reindexing changes: Slicing projects: 100% (2/2), done
Reindexed 0 documents in changes index in 0,0s (0,0/s)
Index changes in version 87 is ready
Reindexing projects:    100% (2/2)
Reindexed 2 documents in projects index in 0,0s (55,6/s)
Index projects in version 10 is ready
ERROR com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot shutdown cache jdbc:h2:file:///C:/Gerrit313Test/cache/accounts-v2;DB_CLOSE_DELAY=-1
org.h2.jdbc.JdbcSQLNonTransientException: Allgemeiner Fehler: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit313Test/cache/accounts-v2"
General error: "java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: ///C:/Gerrit313Test/cache/accounts-v2" [50000-240]
 
The same with version 3.12.3 worked without issues on Windows.
Reply all
Reply to author
Forward
0 new messages