SonarQube 8.9 doesn't start, it's blocked in loading page after login

Hi, i need help with SonarQube.
I’m trying to use the latest verions (8.9), i did all but i’m not able to see the main page because it gets stuck in the loading page after login.
There aren’t error in log file, the unique “error” that i found, if i inspect the source, is:
Application failed to start! SyntaxError: Unexpected token x in JSON at position 556.

Any suggest??

Error

Hi dede. Welcome to the SonarSource community.

The next step is to inspect your Server Logs for clues at what went wrong. What are you seeing in there?

Hi Monty.
I have already seen the Server Logs but it’s all perfectly, no error are present.
The application is correctly up but as you can see it’s gets stuck on loading page after login.

Try disabling your (privacy & ad blocker, especially) browser extensions. And clear your cookies. (Is that Vivaldi or Brave or Chrome?) Which OS version are you on, and what is your antivirus software?

Change your sonar.log.level to DEBUG, restart the server, and check the logs again.

SonarQube is on CentOS 7, i’m triying to reach it from windows 10. I already tried different browser but i have always the same result.
The antivirus is Sophos, i dont’t know the problem just now but i have the 7.9 LTS version fully functional while 8.9 has this problem.

I tried again with sonar.log.level to DEBUG as your suggest. Here some rows from web.log:

2021.05.13 16:32:25 INFO web[o.s.s.p.Platform] WebServer is operational
2021.05.13 16:32:25 DEBUG web[o.s.s.p.Platform] Background initialization of SonarQube done
2021.05.13 16:33:16 DEBUG web[AXlmk0CSqR8V8m1XAAAA][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP||][login|]
2021.05.13 16:33:18 DEBUG web[AXlmk0CSqR8V8m1XAAAD][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP||][login|]
2021.05.13 16:33:19 DEBUG web[AXlmk0CSqR8V8m1XAAAE][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP||][login|]
2021.05.13 16:33:19 DEBUG web[AXlmk0CSqR8V8m1XAAAJ][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP||][login|]
2021.05.13 16:33:20 DEBUG web[AXlmk0CSqR8V8m1XAAAM][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP||][login|]
2021.05.13 16:33:25 DEBUG web[AXlmk0CSqR8V8m1XAAAT][auth.event] login success [method|FORM][provider|LOCAL|local][IP||][login|admin]

  • Which database is your old SQ 7.9 running on?
  • Which database is your new SQ 8.9 running on?
  • Have you tried another web browser like Firefox or Edge?

SQ 7.9 is running on sql2016 (MSSQL Server 13.0), i tried to upgrade this version of SQ with the latest 8.9 so the version of Database is the same.
By the way i tried also with embedded DB and i have always the same result, it’s always stuck at loading page after login.
I’ve tried with different browser like Chrome, Firefox, Edge and Opera with no result.

To allow me to troubleshoot your issue, attach your sonar properties, server logs, and system info.

I haven’t changed the properties, and i can’t attach the file with system info because i’m not able to reach the sonorqube’s home page.

The log are so clear with no error and if i delete them after service’s restart and i try to reach the home page no one log it’s created.

Hi Dede:

Because of your upgrade attempt, the Elasticsearch cache needs to be cleared.
Follow the steps in Troubleshooting: Failed tasks during reindexing i.e.

  1. Stop SonarQube
  2. Delete the data/es7 directory
  3. Restart SonarQube

Is there a proxy between your CentOS7 (SonarQube) server and your Windows 10 desktop? The page in SonarQube which (by default) loads immediately after login is the Projects page. Building it involves API calls to URL’s that are long; this could exceed the default maximum URL length of some proxy servers (for IIS see Request Limits <requestLimits> | Microsoft Docs).

I deleted the data/es7 directory and i restarted the server but nothing is changed, i have always the same problem. By the way it’s always stuck at loading page for reset password (/account/reset_password) if i haven’t changed nothing in properties file, otherwise if i change the jdbc string on connection properties (and other stuff) it’s stuck on loading page before Projects page; Anyway it doesn’t work in both cases.

There aren’t proxy between CentOS7 and Windows10.

I don’t know how to resolve this damn problem, the unique error that i can see is in html page:
Application failed to start! SyntaxError: Unexpected token x in JSON at position 556.

The sonarqube 7.9 work perfectly.

What is the full URL to your SonarQube instance from your laptop’s browser?

sonarqube:9000 or ip:9000 is the same.

That is a part of the URL. Please paste the full URL here for me.

I try to explain it better:

  1. I start it from : http://sonarqube:9000 or http://sonarqube:9000/setup (if it’s a first startup)
  2. The new URL from the login page is: http://sonarqube:9000/sessions/new?return_to=%2F
  3. After the submit of credentials it’s stuck on infinite loading (it could also be days) at this URL: http://sonarqube:9000/ or http://sonarqube:9000/account/reset_password (if it’s a first startup)
  4. Now i can’t do nothing and there aren’t error in logs, the unique error that i can see if i inspect the code from browser is:

I wonder if this could be a character encoding concern.

  • Middle: Are you in a corporate environment where there could be a reverse proxy intercepting and continuing your http requests?
  • Back: If you were using Postgres (like w/ SQ 7.9) you could check
    psql my_database_name -c 'SHOW SERVER_ENCODING'
  • Front: Give me a screen shot of the devTools Network tab with the JSON file (showing headers) that is causing this problem, and copy (or zip) the JSON and paste (or upload) here.

Hi Monty i know that this is only a community and not a ufficial support but more than a week has passed and it seems that we say always the same things; i’m trying to use the latest version of sonarqube in a corporate environment but it doesn’t work correctly and i don’t know why but if i put the source of sonarqube in a clear machine whitout touch any file and it’t doesn’t work… i don’t think is my problem.

As i already told you there isn’t proxy and the DB is sqlserver (but i tried also with embedded db and the result was the same).

I will send in pm the information about json.

Hi Monty,
i solved it, the problem was a request blocked by the firewall.

Thanks for all the support.

Hi Dede,

Excellent! Enjoy using your SonarQube.

1 Like