404 error while using API call

  • which versions are you using (SonarQube) - 8.9.10
  • how is SonarQube deployed: Docker

Sonarqube users are facing 404 error while using API call in pipeline

2023-06-20 13:12:16] Request failed with following error: 404 Client Error: for urlhttps://sonarqube.xxxxx.com/api/measures/component?metricKeys=coverage&component=course-copilot-bff-appsync-service&branch=release/release1.0

scanning failures due to the sonar report processing is in pending state. urlhttps://sonarqube.xxxxx.com/api/ce/task?id=AYjUSugHmXLutnU0tjGe

Could you please assist us with the next step.

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9 → 10.0 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann

Hi Ann,

Thanks for the Suggestion , as of now user are not willing to upgrade to Latest version for a couple of months.
Is there any work around which we should follow during the issue happening , Because this is happening for entire sonarqube users.

Hi,

At a guess, the problem is the / in your branch name.

 
Ann

Hi Ann,

Most of the projects faced the same issue , the task is in pending for long time which caused this issue.
But all those pending task completed after 14 hours.

Is there any specific reason for task in pending state for long hours.

Hi,

It sounds like you had a long-running task ahead of everything else, blocking the queue. When that task finished, everything else could be processed (in the order it arrived).

 
HTH,
Ann


Hi Ann,

There are 291 task which is pending more than 20 hours , what is the next step? This is blocking more projects to do their activities.

May i know what will happen if i click Cancel pending task.

Hi,

I would probably cancel the current, long-running task instead of the pending ones. It would then be marked failed and the rest of the jobs in the queue should be processed.

I would be interested to know the details of the job that’s taking so long.

And BTW, if you’re still on SonarQube 8.9, you should prioritize your upgrade.

Additionally, you didn’t mention your edition, but in Enterprise Edition($$), you have the ability to configure multiple background task workers. So in this situation, while one worker is taken up handling your very long job, other workers could handle the rest of the queue.

 
HTH,
Ann


Hi Ann,

Data reload is taking more hours and we are using community edition so we cant assign more worker node to the instance. Please help us to cancel the long running task.
Screenshot attached for your reference.

Hi,

What are the options under the cog menu for that row?

 
Ann

its showing filter by component , when i click that its taking to the analysis completed before in the same project.

Hi,

Is there anything interesting in your server logs? Particularly the ce.log?

 
Ann

sonarqube_ce (2).log (23.0 MB)

Can you please check the Compute engine Log

Hi,

Okay, I was wrong. There’s no good way to cancel the current task. You’ll need to shut SonarQube down. That should stop the current background task, but be aware that it will likely put the project in a bad state.

I suggest that while you have SonarQube shut down, you go ahead & do the upgrade so you back bring it back up in a current, supported version.

I don’t know what’s going on with your instance and your incredibly-long analysis report processing. From the log, I have to guess that it’s hung. But there’s nothing more we can do to help you with this while you’re on an EOL version.

 
Ann