SonarQube Community Build | Server upgrade and maintenance | Troubleshooting | Checking the server logs
Checking the server logs
On this page
If you're having trouble starting your server for the first time (or any subsequent time!) the first thing to do is check your server logs.
The following log files are created (log files rotate on a regular basis):
- One per SonarQube Community Build process (main process, compute engine, search engine, and web server).
- The access log.
- The deprecation log which stores the Web API requests that use deprecated Web API endpoints or parameters.
If you have a support contract, you can download your instance's current log files from the UI. To do so:
- Go to Administration > System and click Download logs in the top right corner.
Otherwise, you'll find them in <sonarqubeHome>/logs
:
sonar.log
: Log for the main process. Holds general information about startup and shutdown. You'll get overall status here but not details. Look to the other logs for that.web.log
: Information about initial connection to the database, database migration and reindexing, and the processing of HTTP requests. This includes database and search engine logs related to those requests.ce.log
: Information about background task processing and the database and search engine logs related to those tasks.es.log
: Ops information from the search engine, such as Elasticsearch startup, health status changes, cluster-, node- and index-level operations, etc.access.log
: access log.
Understanding the logs
When there's an error, you'll very often find a stacktrace in the logs. If you're not familiar stacktraces, they can be intimidatingly tall walls of incomprehensible text. As a sample, here's a fairly short one:
Unless you wrote the code that produced this error, you really only care about:
- the first line, which ought to have a human-readable message after the colon. In this case, it's Unable to blame file
**/**/foo.java
- and any line that starts with
Caused by
. There are often severalCaused by
lines, and indentation makes them easy to find as you scroll through the error. Be sure to read each of these lines. Very often one of them - the last one or next-to-last one - contains the real problem.
Related pages
Was this page helpful?