SonarQube 7.1 Web服务器启动故障求助
Hey there, let's figure out why your SonarQube 7.1 web server won't stay running on Windows 10 64-bit. Looking at the logs you shared, I can see Elasticsearch starts up fine, but the web process immediately stops—taking Elasticsearch down with it. Here are the most likely issues and fixes to try:
Key Observations from Your Logs
2018.05.18 15:39:57 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ...]]
2018.05.18 15:39:58 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.05.18 15:39:58 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
The web process crashes almost instantly after launching, which points to a startup failure that isn't fully captured in the main app log. You'll want to check the logs/web.log file for detailed errors, but let's start with the most common fixes:
1. Boost Web Process Memory Allocation
SonarQube 7.1's default web JVM memory settings (512MB max heap) might be too tight for your Windows environment. Here's how to adjust it:
- Open
conf/sonar.propertiesin your SonarQube installation folder - Find the
sonar.web.javaOptsline and update it to:sonar.web.javaOpts=-Xmx1024m -Xms256m -XX:+HeapDumpOnOutOfMemoryError - Save the file and restart SonarQube
2. Fix Directory Permissions
Windows UAC restrictions or limited folder permissions often cause silent failures. Try these steps:
- Right-click your SonarQube folder (
C:\Users\-\Documents\sonarqube-7.1) and go to Properties > Security - Make sure your current user account has Full Control permissions for the folder and all subfolders
- Restart
StartSonar.batby right-clicking it and selecting Run as administrator
3. Validate SQL Server Database Configuration
Your log shows the MSSQL JDBC driver is loaded, but a misconfigured database connection will crash the web process:
- Open
conf/sonar.propertiesand verify these settings match your SQL Server setup:sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true sonar.jdbc.username=your_db_user sonar.jdbc.password=your_db_password - Ensure the
sonardatabase exists in SQL Server, and your credentials have access to it - If using Windows authentication, confirm the user running SonarQube has database permissions
4. Simplify Installation Path
The path C:\Users\-\Documents\sonarqube-7.1\sonarqube-7.1 has a placeholder (-) and nested folders, which can cause path resolution issues. Try:
- Moving SonarQube to a simpler path like
C:\sonarqube-7.1(no spaces or special characters) - Clear the
tempfolder in the installation directory before restarting—corrupted temp files can block startup
After trying these fixes, check the logs/web.log file again. If the web process still crashes, that log will have the exact error (like a database connection failure or missing dependency) that we can use to dig deeper.
内容的提问来源于stack exchange,提问作者Rose

