You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SonarQube 6.7.1在CentOS 7.3服务器无法启动,请求排查故障原因

Troubleshooting SonarQube 6.7.1 Startup Failure on CentOS 7.3

Hey there, let's dig into why your SonarQube instance won't start up! Since you mentioned you have Elasticsearch and SonarQube logs but haven't shared the actual content yet, I'll walk you through the most common troubleshooting steps tailored to your setup, plus what to look for once you provide those logs.

1. Verify User Permissions & System Basics

  • SonarQube cannot run as the root user—this is a hard requirement. Make sure you're using a dedicated non-root user (like sonarqube) to manage the service. Check which user is attempting to run it with:
    ps aux | grep sonar
    
  • Ensure the SonarQube user has full read/write access to the installation directory and its subfolders (especially data, logs, and temp):
    chown -R sonarqube:sonarqube /path/to/your/sonarqube
    

2. Elasticsearch-Specific Checks (Critical for SonarQube 6.7.x)

SonarQube 6.7.1 uses an embedded Elasticsearch instance, so these settings often cause startup failures:

  • File Descriptors Limit: Elasticsearch needs at least 65535 open file descriptors. Check the current limit for your SonarQube user:
    su - sonarqube -c "ulimit -n"
    
    If it's lower, update /etc/security/limits.conf with these lines:
    sonarqube soft nofile 65535
    sonarqube hard nofile 65535
    
  • Virtual Memory Limit: Elasticsearch requires vm.max_map_count to be set to at least 262144. Check and adjust this:
    sysctl vm.max_map_count
    sysctl -w vm.max_map_count=262144
    
    To make this change permanent, add vm.max_map_count=262144 to /etc/sysctl.conf.
  • When you share your Elasticsearch logs, look for lines starting with ERROR—common issues here include port conflicts (SonarQube's Elasticsearch uses port 9001 by default), insufficient heap memory, or corrupted data in the data/es subfolder.

3. SonarQube Configuration & Log Checks

  • Open $SONARQUBE_HOME/conf/sonar.properties and verify:
    • Database connection details are correct (if using an external DB like PostgreSQL/MySQL—note that SonarQube 6.7.1 does not support MySQL 8+, so stick to MySQL 5.7 or lower).
    • The default HTTP port (sonar.web.port=9000) isn't being used by another service. Check with:
      netstat -tulpn | grep 9000
      
  • Scan SonarQube's core logs (usually in $SONARQUBE_HOME/logs/sonar.log or web.log) for ERROR or WARN entries—these often point to missing dependencies, failed database connections, or invalid configuration values.

4. Service & System Log Validation

  • Check the SonarQube service status directly:
    systemctl status sonarqube
    
  • Also, pull real-time system logs related to the SonarQube service to catch transient issues:
    journalctl -u sonarqube -f
    

Once you share the actual content of your Elasticsearch and SonarQube logs, we can zero in on the exact cause of the startup failure!

内容的提问来源于stack exchange,提问作者fashuser

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 10:08:22