# SonarQube Background Tasks gets canceled

**URL:** <https://community.sonarsource.com/t/sonarqube-background-tasks-gets-canceled/69705>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner\
**Created:** [August 12, 2022, 2:59am UTC](https://community.sonarsource.com/t/sonarqube-background-tasks-gets-canceled/69705 "2022-08-12T02:59:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayalakshmia](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jayalakshmia/32/34005_2.png) [@Jayalakshmia](https://community.sonarsource.com/u/Jayalakshmia)\
**Post date:** [August 12, 2022, 2:59am UTC](https://community.sonarsource.com/t/sonarqube-background-tasks-gets-canceled/69705/1 "2022-08-12T02:59:07Z")

</div>

Let’s discuss what you have in mind!

Try to describe the problem or opportunity you are seeing and why it matters. The closer you stick to this topic template, and the more information you provide, the better chance you have to generate a real discussion.

A few questions to help you:

- What are you trying to accomplish? - Sonarqube Integration with Postgresql in AWS  
Issue Background:  
Always the Sonarqube BG tasks going to CANCELED State whenever the projects gets analyzed via Jenkins pipeline.  
Sonarqube Developer Edition - 8.9.6 in AWS EC2  
Postgresql Version - 11.13 in Aurora Postgresql

Error seen in ce.log for BG task:

```auto
2022.08.11 19:26:32 ERROR ce[AYKMo3VGq9qcN_B0-nfn-test][o.s.c.t.CeWorkerImpl] Failed to finalize task with uuid 'AYKMo3VGq9qcN_B0-nfn-test' and persist its state to db
java.lang.IllegalStateException: Task does not exist anymore: CeTask{type=REPORT, uuid=AYKMo3VGq9qcN_B0-nfn-test, component=Component{uuid='AYJdGuuPDfXJ0mJNO1vO', key='sf-smt:BRANCH:SMT-Jenkins_Library_Test', name='sf-smt'}, mainComponent=Component{uuid='AXvzIA_0IQTxJco-TJEJ', key='sf-smt', name='sf-smt'}, submitter=User{uuid='AXVkLPN0Vy6y5LAkfGTy', login='user1'}}
2022.08.11 19:26:32 INFO ce[AYKMo3VGq9qcN_B0-nfn][o.s.c.t.CeWorkerImpl] Executed task | project=sf-smt | type=REPORT | branch=SMT-Jenkins_Library_Test | branchType=BRANCH | id=AYKMo3VGq9qcN_B0-nfn | submitter=user1 | status=SUCCESS | time=292135ms

```

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 12, 2022, 7:51am UTC](https://community.sonarsource.com/t/sonarqube-background-tasks-gets-canceled/69705/2 "2022-08-12T07:51:09Z")

</div>

Hey there.

Most often, this error is a result of multiple SonarQube application instances connecting to the same database. You should check to see if that’s happened (even by accident).
