I am using maven's sonar:sonar goal to generate Sonar reports in one of my Jenkins job.
My Jenkins host name is : jenhost.tst.com and My Sonar host is sonhost.tst.com and My Sonar jdbc url is : jdbc:mysql://sonhost.tst.com:3306/sonar, this database has a user names sonar created with proper permissions.
Now While running the Maven goal, I am getting the error:
Cannot open connection to database: Access denied for user 'sonar'@jenhost.tst.xxxx.com' (using password: YES)
The weird thing in the above error is that the sonar user is trying to access my Jenkins host as a database name and not the sonar host.
I have checked my Maven settings.xml and the database URL of Sonar is mentioned correctly there, and it is mentioned correctly in Jenkins too.
Does any one have any clue regarding this one?