jira is not indexing properly.

Sreenivasaraju P
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.
February 5, 2013

hi,

We are using Jira 5.1. We are facing some problem frecquently.

The status of some particular requests are showing differently in the issue navigator and in issue.

ex : JIRA-123 status is showing as STATUS A in the navigator ,but if we go the ticket, it is showing STATUS B(which is correct).

If we do re-indexing , then the status is showing correctly(STATUS B) in the issue navigator also.

Any idea on this.

6 answers

1 accepted

3 votes
Answer accepted
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.
February 5, 2013

So far, you've had two different answers. They are both correct, and complementary, but to be clear, what's going on is:

1. Something is corrupting your index (you say "We are using Jira 5.1. We are facing some problem frecquently." so it's not a one-off). See Renjith's answer

2. Once the index is damaged, you are seeing problems.

You need to fix both of these. Re-indexing and clearing the caches will repair the damage. But they won't fix the root cause. You need to identify what is causing the damage and fix that, otherwise it will simply continue to corrupt your index, and you'll need to keep repairing it.

Mizan
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.
February 5, 2013

Hi Nic ,

Can such issue occur after upgrading JIRA ? for us this use to happen after editing the issue .

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.
February 5, 2013

An upgrade will perform a re-index as part of the process. I'd expect a vanilla installation of Jira to be absolutely fine after upgrading.

Adding/upgrading plugins afterwards may cause problems, but that depends entirely on them and your system. The worst case is that you should allow time for a second re-indexing run after an upgrade.

However, an upgrade is only one possibility of a root-cause, and if you've re-indexed after it, then you should not be seeing any index issues. If you are getting them after re-indexing, then something else is doing the damage.

Mizan
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.
February 6, 2013

Thanks Nic ,

I am facing this same issue , I deleted the indexes folder but the issue still persisit , can you please help me in finding the root cause for this ? What can be the probable cause for this ?

I checked the post functions and the issues are reindexed .

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.
February 6, 2013

The root cause is usually plugins that aren't indexing, are doing things that break the index, or are running in the wrong place.

You can also have problems if there are core errors - out of memory, lucene locks etc.

Two things to start looking at:

1) The log, for ANY errors. Your errors may not mention indexing, but they can have knock-on effects

2) Can you reproduce it reliably? Is it always when editing an issue? Or on certain transitions? Are the effects limited to particular projects?

As an aside, do you have any listeners configured?

Mizan
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.
February 6, 2013

I see a null pointer exception given by a plugin , this went unnoticed till now. Can this be a reason ?

I cannot reporoduce this issue , its unpredictable and not limited to a single project .This issue have occured after editing and transitioning the issue .(not restricted to a certain transition)

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.
February 6, 2013

Ok, so it's generalised. Good to know, although that makes it more difficult to trace.

The NPE from a plugin could easily be hiding an indexing problem, but it depends on the plugin - what is it? Or what does it trying to do?

The question is can you nail it down to a single point. Is it the *edit* that breaks, or the *transition*?

Mizan
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.
February 6, 2013

The plugin does changes to the issue fields (customfields) copy and pastes values ,

It has a listener which works after the create issue event , a field value is then copied to another field.

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.
February 6, 2013

That really does sound like it is the culprit. If it's not, then you still need to do the work to eliminate it from the possibilities.

Try a basic test - create an issue and let it copy the values. Then do a search based on the field that was copied to. Then open up the issue-view. If the indexing is failing, then you should see that the value is set correctly on the issue-view, but you cannot search for it. If the value is not on the issue-view, then the plugin is failing completely.

Mizan
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.
February 18, 2013

Hi Nic ,

The listener was the culprit i guess :) not facing the issue anymore . Thanks

4 votes
Renjith Pillai
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.
February 5, 2013

Which means that you are modifying the issue either in plugins, script runner post functions, listeners etc. and not doing the step for individual issue reindex.

Sreenivasaraju P
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.
March 3, 2013

Yes ,we are using issueManager.updateIssue() in our post functions, it is causing problem

Like Salome Khaindrava likes this
Jordan Packer May 18, 2017

I seem to be experiencing something similar.... I'm updating some custom fields in a scripted listener, and ever since I started testing heavily with it our environment has been running into indexing and database corruption issues. What's the recommended way to make custom field updates in a scripted listener so that we don't run into these problems?

3 votes
Mizan
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.
February 5, 2013

May be the indexes have got corrupted .

Folllow the below steps:

Stop JIRA , delete the indexes directory under JIRA_HOME/caches/ then restart JIRA .

This most probably might solve the issue .

0 votes
Salome Khaindrava June 9, 2020

Chack known problems with 3rd party apps - https://confluence.atlassian.com/jirakb/known-major-problems-with-3rd-party-apps-in-jira-946618564.html

We had the same problem and the cause was plugin META-INF KFT - Email This Issue.

We disabled it and the problem was fixed. 

0 votes
DanielG
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.
February 5, 2013

I suggest you do the following:

1.- Stop Jira.

2.- Delete folder 'cache' in Jira Home.

3.- Start Jira.

4.- Reindex again (administration menu)

Hope it helps!

Daniel

0 votes
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2013

Hey there, prathighantam.

As mentioned by Mizan earlier on, clearing your JIRA caches might help. What I would propose is a complete clean up of your JIRA instance as per the following:

  1. Shutdown JIRA instance
  2. Delete the contents of the JIRA Home Directory\plugins\.osgi-plugins directory
  3. Delete the contents of the JIRA Home Directory\plugins\.bundled-plugins directory
  4. Delete the contents of the JIRA Installation Directory\work directory
  5. Restart JIRA instance
  6. Try to perform the re-indexing

Hope it helps.

Warm regards,

Danial

Sameer Kinra December 22, 2015

Works like a charm, and we did the this step 1st though, stop JIRA delete the indexes directory under JIRA_HOME/caches/ then do step 2 from your instructions.

Suggest an answer

Log in or Sign up to answer