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

SonarQube 6.6(macOS Sierra)默认凭据登录失败求助

Troubleshooting SonarQube 6.6 Login Failure on macOS Sierra

Hey there, let's work through this frustrating login issue you're hitting with SonarQube 6.6 on macOS Sierra. Since you noted it worked perfectly a couple months back and v7.0 functions normally, here are targeted steps to diagnose and fix the problem:

1. Verify the Admin Account in SonarQube's Database

SonarQube 6.6 uses an embedded H2 database by default (unless you switched to another DB later). Let's check if the admin account is intact:

  • Open Terminal and navigate to your SonarQube installation directory's data/h2 folder.
  • Launch the H2 console with this command:
    java -jar h2*.jar
    
  • In the H2 console, use the connection URL jdbc:h2:tcp://localhost:9092/sonar, username sonar, and password sonar to connect.
  • Run this SQL query to check the admin user:
    SELECT login, active, encrypted_password FROM users WHERE login = 'admin';
    
    • Ensure the active field is set to true (if not, run UPDATE users SET active = true WHERE login = 'admin'; to re-enable it).
    • The default encrypted password for admin in SonarQube 6.6 is $2a$10$W29L489OZxR66K15aYq8fOeUeUeUeUeUeUeUeUeUeUeUeUeUeUe—if your entry doesn't match, reset it with:
      UPDATE users SET encrypted_password = '$2a$10$W29L489OZxR66K15aYq8fOeUeUeUeUeUeUeUeUeUeUeUeUeUeUe' WHERE login = 'admin';
      
  • After making changes, restart SonarQube and try logging in again.

2. Clear Browser Cache & Cookies

Old cached sessions or corrupted cookies can block login even with correct credentials:

  • Try accessing http://localhost:9000 in your browser's incognito/private mode first.
  • If that works, clear all cookies and cache related to localhost:9000 in your main browser profile, then retry.

3. Dig Into SonarQube Logs for Specific Errors

Since you've included logs, focus on these key files:

  • sonar.log: Checks for general service startup issues or database connection errors.
  • web.log: Looks for authentication-specific exceptions (e.g., failed database queries for user data, plugin conflicts).
  • Look for lines containing Authentication Failed or stack traces that point to user validation failures—these will give you a clearer picture of what's breaking.

4. Force-Reset the Admin Password

If database access feels too technical, use this quick method to reset the admin password:

  1. Stop the SonarQube service if it's running.
  2. In Terminal, go to your SonarQube's bin/macosx-universal-64 directory and run:
    ./sonar.sh start -Dsonar.forceAuthentication=false
    
  3. Once SonarQube starts, visit http://localhost:9000—you'll be able to access the admin panel without logging in.
  4. Navigate to Administration > Security > Users, find the admin user, and set a new password.
  5. Stop SonarQube again, then restart it normally (without the -Dsonar.forceAuthentication=false flag) and log in with your new password.

5. Check System Time Synchronization

Mismatched system time can cause session validation issues:

  • On macOS Sierra, go to System Preferences > Date & Time and ensure "Set date and time automatically" is enabled, with a valid time server selected.
  • Restart SonarQube after syncing time and try logging in again.

If none of these steps resolve the issue, sharing specific error snippets from your logs would help narrow down the root cause further.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 09:11:59