SonarQube server [http://localhost:9000] can not be reached


Im using SonarQube Developer edition version
On my machine with Windows 10 with Visual Studio 2019 e net core 3.1 , net framework 4.5

My project contains a web app ui written in javascript using vue js.
I did so:
I my folder (Main.Web) of javascript project front end I download and extracted, sonar-scanner-
So i have this structure on my disk:

src (where i have files to analize)
(others folders not to be analyzed)

Inside sonar scanner unzipped folder, into bin folder, i have created: and in this is the file:

sonar.exclusions=src//*.test.ts sonar.test.inclusions=src//.test.ts sonar.coverage.exclusions=src/**/.test.ts,src/**/.mock.ts,node_modules/,coverage/lcov-report/* sonar.javascript.lcov.reportPaths=coverage/ sonar.testExecutionReportPaths=coverage/test-reporter.xml

I had put in path the bin folder,so if i launch sonar-scanner.bat from bin
I get:

sonar-scanner -Dsonar.login=“token”
INFO: Scanner configuration file: C:\Program Files\sonar-scanner-\bin…\conf\
INFO: Project root configuration file: NONE
INFO: SonarScanner
INFO: Java Eclipse Adoptium (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\Aa.sonar\cache

Caused by: You must define the following mandatory properties for ‘Unknown’: sonar.projectKey

I dont understand the error.
Can anyone help me?

Hey there.

It would be really helpful if the error message in the title of your post matched the error message you’re… posting about.

The file should be in the folder from which you’re executing analysis (the folder you’re in when you execute sonar-scanner, probably the root of your project), not in the installation directory of the scanner

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.