Integrating sonarqube (gradle project) with github actions---build is failing in github actions

Hi Team,

I am trying to onboard projects into github sonarqube servers, I have created github app and also integrated with sonarqube by enabling PR deocration,
I am using GithubAction as CI tool for the repositories and have added sonarqube plugins and properties in build.gradle file,
Whenever I push any code into git repo I could see github action is running in Action tab but Build and analyzing is failing with below error

FAILURE: Build failed with an exception.

*** What went wrong:**
Execution failed for task ‘:sonarqube’.
> java.util.ConcurrentModificationException (no error message)

I have attached build.gradle and logs file ,Could you please help

logs_7.zip (104.3 KB)

gradle.build_txt.txt (5.6 KB)

Hey there.

This is a funny configuration block.

sonarqube {
    properties {
        sonarqube {
    properties {
         property "sonar.projectKey", "project-holiday-calendar-batch"
         property "sonar.verbose", "true"
         property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
         property "sonar.exclusions", "src/main/java/com/sysco/holidaycalendar/common/**/*, src/main/java/com/sysco/holidaycalendar/bean/**/*"
    }

    }
}
}

Why are you declaring a properties block… within the properties block?

Hi, Sorry I sent you the wrong files, PFB updated files,


logs_5.zip (65.1 KB)
gradle.build_txt.txt (4.4 KB)

Okay. As noted in the logs:

2022-09-16T10:54:37.4177165Z > Run with --stacktrace option to get the stack trace.
2022-09-16T10:54:37.4177554Z > Run with --debug option to get more log output.
2022-09-16T10:54:37.4177897Z > Run with --scan to get full insights.

yes but it saying sonarqube server can’t be reached , I’m running it with Github Action and added all the configurations

Sorry if I wasn’t clear before. I would recommend following the instructions in the logs (adding --debug, --info, or --stacktrace) to see if you can find more detailed information about why the scanner couldn’t connect to your SonarQube server.