Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to properly re-index self hosted Jira

I'm trying to perform re-index Jira, using this topic
https://confluence.atlassian.com/jirakb/reindex-jira-server-using-rest-api-via-curl-command-663617587.html

but i get next output. 

A task could not be found for the given task id

Any variants how to solve this problem ?

I could perform this action by hands, but i can't. I have to implement Jenkins job which will make a curl request, or resort to any other options for automating this process.
Thanks

1 answer

0 votes
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 09, 2021

Hi @Vitalii Malii 

Are you sending a GET request? That will try to return details of current indexing job.

You need to POST to start an reindex.

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 09, 2021

Hi @Vitalii Malii 

I set off a test POST via PostMan tool as https://new-staging-log.blah.com/rest/api/2/reindex?type=FOREGROUND

and got a json response

{ 
"progressUrl": "/secure/admin/jira/IndexProgress.jspa?taskId=44500",
"currentProgress": 1,
"currentSubTask":
"Currently working on: Issue index",
"type": "FOREGROUND",
"submittedTime": "2021-08-09T15:05:15.097+0000",
"startTime": "2021-08-09T15:05:15.119+0000",
"success": false}

If I check the server an indexing process is running.

So the article is correct.

Via curl I get the same

AST0004352:~ tom.lister$ curl -u tom.lister:password -X POST https://new-staging-log.blah.com/rest/api/2/reindex?type=FOREGROUND

{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=44500","currentProgress":4,"currentSubTask":"Currently working on: Issue index","type":"FOREGROUND","submittedTime":"2021-08-09T15:05:15.097+0000","startTime":"2021-08-09T15:05:15.119+0000","success":false}AST0004352:~ tom.lister$

AST0004352:~ tom.lister$

I'm think something subtly different about your curl call.
have you got screenshots to share?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events