The last analysis has failed. More details available on the Background Tasks page

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube 7.7.0.23042
    SonarScanner [2.8.1]
  • what are you trying to achieve
    analyzing a project
  • what have you tried so far to achieve this
    Im new to sonarqube, for the past week i’ve been trying to get sonar to analyze my code, i’ve integrated Sonarqube with jenkins, installed sonarscanner and configured my Job, when jenkins is building, following the logs i see Sonarqube scanning my files and everything is runing as supposed, i even get this:
    [INFO] ANALYSIS SUCCESSFUL, you can browse http://192.168.2.106:30780/dashboard?id=tn.majustic%3AdigiTicket%3Adevelop

but when i click the Sonar project link that’s provided above, this is what i see:

in the “Show error details” this is what i get:

Error Details
org.sonar.ce.task.projectanalysis.component.VisitException: Visit failed for Component {key=tn.majustic:digiTicket:develop:persistence/src/main/java/tn/majustic/dto/OperationHistoriqueDTO.java,type=FILE}  located tn.majustic:digiTicket:develop:persistence/src/main/java/tn/majustic/dto(type=DIRECTORY)->tn.majustic:digiTicket:develop:persistence/src/main/java/tn/majustic(type=DIRECTORY)->tn.majustic:digiTicket:develop:persistence(type=DIRECTORY)->tn.majustic:digiTicket:develop(type=PROJECT)
	at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:52)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep.execute(PersistComponentsStep.java:110)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:207)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:189)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:156)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:131)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:83)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:51)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: unexpected data beyond EOF in block 2 of relation base/17370/17926
  Hint: This has been seen to occur with buggy kernels; consider updating your system.
### The error may involve org.sonar.db.component.ComponentMapper.insert-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: ERROR: unexpected data beyond EOF in block 2 of relation base/17370/17926
  Hint: This has been seen to occur with buggy kernels; consider updating your system.
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	at com.sun.proxy.$Proxy29.insert(Unknown Source)
	at org.sonar.db.component.ComponentDao.insert(ComponentDao.java:380)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep$PersistComponentStepsVisitor.persistComponent(PersistComponentsStep.java:244)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep$PersistComponentStepsVisitor.persistAndPopulateCache(PersistComponentsStep.java:236)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep$PersistComponentStepsVisitor.visitFile(PersistComponentsStep.java:214)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitNode(PathAwareCrawler.java:102)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:67)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	... 31 more
Caused by: org.postgresql.util.PSQLException: ERROR: unexpected data beyond EOF in block 2 of relation base/17370/17926
  Hint: This has been seen to occur with buggy kernels; consider updating your system.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
	at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
	at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:52)
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
	... 42 more

i even tried switching to another database but no luck

i’m really stuck here and i would appreciate any help
Thank you

this is kind of urgent

Hi,

When you say you tried with a different database, was that a different flavor/brand, a different Postgres instance, a different schema in the same Postgres instance?

The error message itself points to a problem in the underlying OS, as do Google results. OTOH, this result indicates a lack of memory. But whatever the cause, it looks like it’s in your database, not in SonarQube.

 
Ann

hello

So i have both sonarqube & postgres running in the same kubernetes cluster, each on a different container, the different database I’ve tried was on a different schema in the same instance indeed and I’ve done a bit of research on the problem, one of the solutions suggested to increase the max_wal_size, I did that but still got the same error

should i try running sonarqube on a diffrenet databse like mysql ?

Hi,

I’m not sure what to tell you, but you should not switch to MySQL:

 
:woman_shrugging:
Ann

Well thank you anyways
i appreciate it

1 Like