I have recieved this error when trying to index:

Eric Sebian August 28, 2012
org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
Task completed in 0 seconds with unexpected error.
Started Today 10:07 AM.
Finished Today 10:07 AM.
com.atlassian.jira.util.RuntimeIOException: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
	at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:145)
	at com.atlassian.jira.index.DefaultManager.deleteIndexDirectory(DefaultManager.java:44)
	at com.atlassian.jira.issue.index.DefaultIssueIndexer.deleteIndexes(DefaultIssueIndexer.java:170)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:219)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70)
	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
	at $Proxy56.reIndexAll(Unknown Source)
	at com.atlassian.jira.util.index.IndexLifecycleManager$Composite.reIndexAll(IndexLifecycleManager.java:113)
	at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:30)
	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:55)
	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:24)
	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:358)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
	at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:247)
	at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:173)
	at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1614)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1079)
	at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:141)


Please advise.

2 answers

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2012

You won't see any issues until you've got a working index. Similarly for imports - the index needs to be usable.

The error you are seeing tells you that your index is completely broken. In some applications, this would be a serious issue, but in Jira, it's not painful because you can actually throw away the whole index and rebuild it from scratch, simply by clicking "re index"

However, you've got a serious error blocking that. As it's starting immediately, I'd say there's a critical problem with the index files - either you're out of space, the Jira user doesn't have read AND write AND delete permissions on the index directory, or you've got a damaged file system or disk. Simple fix -

  1. Check the permissions on the index directory
  2. Check the physical disk if possible
  3. Stop Jira
  4. Delete everything in the index directory from the operating system
  5. Start Jira
  6. Go re-index Jira

(If I were to lay a bet on this, I'd say it's going to be "not enough delete permissions")

Eric Sebian August 28, 2012

still not working. And I changed the permissions:

[root@integration logs]# cd /opt/jira/releases/ProdJIRA/caches/indexes/
[root@integration indexes]# ls -lr
total 16
drwxrwxrwx 2 root root 4096 Aug 29 10:49 issues
drwxrwxrwx 2 root root 4096 Aug 29 10:49 entities
drwxrwxrwx 2 root root 4096 Aug 29 10:49 comments
drwxrwxrwx 2 root root 4096 Aug 29 10:49 changes

running out of options.

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2012

root# df -k ?

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2012

Sorry for the stupid question, but are you on the correct JiraHome ? Have you fsckd ?

0 votes
Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2012

You need to reindex your Jira.

Steps available here: https://confluence.atlassian.com/display/JIRAKB/Unable+to+Rebuild+JIRA+Index

Check first the drive for errors, though

Eric Sebian August 28, 2012

I tried the steps listed in the above link but I'm getting the same problem when I try to re-index.

org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
Task completed in 0 seconds with unexpected error.
... 22 more
And there are NO issues showing in JIRA at all. It also wont let me do a restore from a prior backup for the same reason. 

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2012

Eric,

There's something really nasty on your disk. It can be permissions, for instance (you start jira as root, then as another user which has no perms to write to that dir). There can be a physical fault.

Edit: Saw that Nic just answered you, too. I fully agree with him.

Eric Sebian August 28, 2012

there is plenty of space and there are no errors of the disk.

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20161204 6245120 12891944 33% /
/dev/sda1 1019864 49460 918596 6% /boot
/dev/sda8 637354280 346303368 258675120 58% /data
/dev/sda6 10080488 5591648 3976772 59% /home
none 4097840 0 4097840 0% /dev/shm
/dev/sda5 15116836 3795356 10553576 27% /usr
/dev/sda3 15116868 1087708 13261256 8% /var

Eric Sebian August 28, 2012

catalina out. please let me know if you see anything .

Eric Sebian August 28, 2012

I'm pretty sure that its not the server because I have other applications running there using mysql.

Eric Sebian August 28, 2012

can I drop the database and recreate it and then do a restore from a backup?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2012

The database is not the problem, it is the index, which is usually kept under the "jira home" directory.

I'm 99% sure it is the server. It's possible that the index is erroring because of something else, but as the log is basically saying "I can't clear the index to proceed with rebuilding it", I am almost certain it's that, which means it's something on the server.

Could you please find the index directory and delete it's contents completely, check the permissions on it, check the user who is running Jira and then restart Jira. Then re-index.

Eric Sebian August 28, 2012

and the folders that I newly created remain empty.

Eric Sebian August 29, 2012

here is the directory:

drwxrwxrwx 2 root root 4096 Aug 29 10:49 changes
drwxrwxrwx 2 root root 4096 Aug 29 10:49 comments
drwxrwxrwx 2 root root 4096 Aug 29 10:49 entities
drwxrwxrwx 2 root root 4096 Aug 29 10:49 issues
[root@integration indexes]# pwd
/opt/jira/releases/ProdJIRA/caches/indexes

I have removed them. recreated them. And given them 777 permission:

/opt/jira/releases/ProdJIRA/caches/indexes
[root@integration indexes]# rm -rf *
[root@integration indexes]#
[root@integration indexes]#
[root@integration indexes]# mkdir comments entities issues
[root@integration indexes]# ls
comments entities issues
[root@integration indexes]# ls -ltr
total 12
drwxr-xr-x 2 root root 4096 Aug 29 14:42 issues
drwxr-xr-x 2 root root 4096 Aug 29 14:42 entities
drwxr-xr-x 2 root root 4096 Aug 29 14:42 comments
[root@integration indexes]# chmod 777 *
[root@integration indexes]# ls -ltr
total 12
drwxrwxrwx 2 root root 4096 Aug 29 14:42 issues
drwxrwxrwx 2 root root 4096 Aug 29 14:42 entities
drwxrwxrwx 2 root root 4096 Aug 29 14:42 comments

i restarted the instance and tried re-indexing but the problem is still happening.

Eric Sebian August 29, 2012

i think that I have figured out what my problem was. The app was set for an alternate indexing path. I was cleaning up the default index path. I finally checked that and switched it to the default. The re-index finally ran successfully and the issues are showing again. Thanks for all of your help!

Suggest an answer

Log in or Sign up to answer