Sonar: The current batch process and the configured remote server do not share the same DB configuration

10. July, 2012

You might see this error message when starting the Sonar client, for example via Maven (mvn sonar:sonar):

The current batch process and the configured remote server do not share the same DB configuration
- Batch side: jdbc:...
- Server side: check the configuration at http://.../system

The message is a bit misleading. Sonar doesn’t actually compare the database URL, it compares the ID which you can find in the database table properties under prop_key = sonar.core.id and this isn’t an ID, it’s the start time of the Sonar web server:

select * from properties where prop_key = 'sonar.core.id'

There are two reasons why there could be a mismatch:

  1. The database URL on the batch and the server side don’t match (just check it via the URL which the Sonar client gives you)
  2. There are two Sonar servers using this database. This can happen, for example, when you migrated the service from one host to another and forgot to shut down the old version properly.

Sonar

22. September, 2011

I just attended the Sonar presentation given by Olivier Gaudin of sonarsource. Some impressions.

A good definition of quality:

A well-written program is a program where the cost of implementing a feature is constant throughout the program’s lifetime

— Itay Maman

In Martin Fowler’s “Technical Debt Quadrant“, Sonar is in the upper right corner: It doesn’t solve your problems, it just helps you know what they are. Or as the guys at sonarsource put it: Sonar puts  your technical debt under control.

A good book which you may want to read in this area is “Clean Code – A Handbook of Agile Software Craftsmanship” by Robert C. Martin.

List of the 7 Deadly Sins:

  • Code duplication (cut&paste)
  • Bad distribution of complexity
  • Spaghetti design
  • Lack of unit tests
  • No coding standards
  • Potential bugs
  • Not enough or too many comments