Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

SonarQube server [http://localhost:8233] can not be reached #86

Closed
Abd-ksr opened this issue Apr 3, 2020 · 1 comment
Closed

SonarQube server [http://localhost:8233] can not be reached #86

Abd-ksr opened this issue Apr 3, 2020 · 1 comment

Comments

@Abd-ksr
Copy link

Abd-ksr commented Apr 3, 2020

I have followed all the steps to install

  1. npm install -g sonarqube-scanner
  2. created sonar-project.js as follows
    My react project runs on http://localhost:8237
const sonarqubeScanner = require('sonarqube-scanner'); 
sonarqubeScanner(
  {
    serverUrl : 'http://localhost:8237',
    token : "",
    options: {
      'sonar.projectName': 'My App',
      'sonar.projectDescription': 'Description for "My App" project...',
      'sonar.sources': 'src'
    }
  },
  () => process.exit()
)

while running 'sonar-scanner' i am getting following error

ERROR: SonarQube server [http://localhost:8233] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.035s
INFO: Final Memory: 2M/14M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
        at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
        at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
        at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
        ... 7 more
Caused by: java.lang.IllegalStateException: Status returned by url [http://localhost:8233/batch/index] is not valid: [404]
        at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:116)
        at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
        ... 10 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Can any one please help me.......
Thanks in advance

@Abd-ksr
Copy link
Author

Abd-ksr commented Apr 6, 2020

Found solution => Need to run sonarqube server followed the link
https://docs.sonarqube.org/latest/setup/get-started-2-minutes/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant