Sonar-runner Exception Caused by: Unknown database status: FRESH_INSTALL - sonar-runner

I'm running Sonarqube4.0 and PostgreSQL9.3 database and the sonarqube-runner2.3 on different servers.
Connectivity between Sonarqube and Postgresql database is fine as I can get to the console http://[sonar-host]:9000, login change password and do all activities. I can also see the tables created under my schema in the database
The issue I have is with the sonar-runner. When I run sonar-runner from my source directory I get the below Exception:
09:52:21.736 DEBUG - To prevent a memory leak, the JDBC Driver [org.postgresql.Driver] has been forcibly deregistered
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 2.791s
Final Memory: 5M/220M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: Unknown database status: FRESH_INSTALL
I know there is a similar post on stack overflow but, all the properties file have the correct URLs usernames and passwords
sonar-project.properties:
sonar.host.url=http://[sonar-host]:9000
sonar.jdbc.url=jdbc:postgresql://[dbhost]:5432/sonarqube-sit
sonar.jdbc.username=sonarqube-sit
sonar.jdbc.password=xEgIVeyr0kw1
sonar.jdbc.schema=sonarqubesit
sonar.jdbc.driverClassName=org.postgresql.Driver
sonar.login=admin
sonar.password=7nQ36mrnk0UCsX1
sonar.properties:
sonar.jdbc.username=sonarqube-sit
sonar.jdbc.password={aes}ftWqQkON7XUqwNmJyHqzJA==
sonar.jdbc.url=jdbc:postgresql://[dbhost]:5432/sonarqube-sit
sonar.jdbc.schema=sonarqubesit
pg_hba.conf has entry for each of the servers and users
I also get some error in postgres log as below when I run the sonar-runner:
2014-01-22 09:52:21 GMT ERROR: relation "schema_migrations" does not exist at character 15
2014-01-22 09:52:21 GMT STATEMENT: select * from schema_migrations
Firstly, I can see the schema_migartions table in the database under sonarqubesit schema. And Secondly, I don't know why its trying to use schema_migrations? as I'm not migrating to a different schema?
Can anyone help me resolve this please. I'm assuming it is something to do with the way the schema is defined in sonar-runner properties, but I can't see anything obvious.

I resolved the issue by deleting the database and re-creating it. But didn't create a new schema.
Also re-installed Sonarqube and used the default 'public' schema i.e. left the property sonar.jdbc.schema commented(#) under sonar.properties

Related

SqlPackage cannot import permission 'EAES'

When I try to deploy an SQL Server Database using SqlPackage I get a strange error.
The call is:
SqlPackage.exe /Action:Publish /SourceFile:myDb.dacpac /TargetServerName:myServer /TargetDatabaseName:myDb /OverwriteFiles:True /Diagnostics:True
The error is:
Microsoft.Data.Tools.Diagnostics.Tracer Error: 1 : Error detected when
reverse engineering the database. Severity:'Warning' Prefix:'' Error
Code:'0' Message:The permission 'EAES' was not recognized and was not
imported. If this problem persists, contact customer support.
Microsoft.Data.Tools.Diagnostics.Tracer Error: 1 : Error detected when
reverse engineering the database. Severity:'Warning' Prefix:'' Error
Code:'0' Message:The permission 'EAES' was not recognized and was not
imported. If this problem persists, contact customer support.
Microsoft.Data.Tools.Diagnostics.Tracer Error: 19 :
Microsoft.SqlServer.Dac.DacServicesException: An error occurred during
deployment plan generation. Deployment cannot continue. Error
SQL72018: Permission could not be imported but one or more of these
objects exist in your source.
---> Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException:
Errors occurred while modeling the target database. Deployment can
not continue.
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.ThrowIfErrors(String
message, ErrorManager errors, Object category)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnLoad(ErrorManager
errors, DeploymentEngineContext context)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.PrepareModels()
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.InitializePlanGeneratator()
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateController(Action`1
msgHandler)
at Microsoft.SqlServer.Dac.DacServices.CreateController(SqlDeployment
deploymentEngine, ErrorManager errorManager)
--- End of inner exception stack trace ---
Initializing deployment (Failed)
Microsoft.Data.Tools.Diagnostics.Tracer Information: 0 : SqlPackage completed
When I do a schema compare in Visual Studio Data Tools, only one column is changed, but no permissions. When I use SSMS to look for that permission 'EAES', I cannot find it.
This solution worked for a while without problems.
What is that permission 'EAES' or how can I make the SqlPackage execution succeed again?
This is a bug in Visual Studio. See https://feedback.azure.com/forums/908035-sql-server/suggestions/32896864-grant-execute-any-external-script-not-recognised-b
It will work again if you revoke the permission to execute R scripts in SQL Server
REVOKE EXECUTE ANY EXTERNAL SCRIPT TO [myUser]
Try to update your SQLPackage.exe, my problem was solved when I did this.
I got this problem when I was trying to publish in a SQL Server 2019 database, got the latest version from it in https://learn.microsoft.com/pt-br/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15 and it worked like a charm.

SSIS 08 job runs a SSRS 08 report but fails when ran in SQL Server

I have created an SSIS package (08) that has a script task which runs an SSRS report (08) with given parameters. The report creates a pdf version of the file on a file share drive of my choosing.
When I run the SSIS manually it works perfectly, however, when I upload SSIS into SQL and then run it from the job agent it fails. It gives a long error message but the basic piece is;
(0xC0016016 Source: Description: Failed to decrypt
protected XML node "DTS:Property" with error 0x8009000B "Key not valid
for use in specified state.". You may not be authorized to access
this information. This error occurs when there is a cryptographic
error. Verify that the correct key is available. End Error
Error: 2018-01-15 16:09:58.28 Code: 0xC001600C
Source:
PackageSchedule Connection manager "ReportServer08"
Description:
Server authentication failed. This error occurs when login credentials
are not provided, or the credentials are incorrect. )
I have tried to change the "ProtectionLevel" to "EncryptSensitiveWithPassword" and also "Donset upSensitive".
I setup a subscription to the report just to make sure it wasn't a read/write error to the specific folder and the subscription ran without error as well.
Any help on this would be greatly appreciated.
According to this SO answer the issue was related to a date type issue. You could be experiencing the same thing
Thank-you for the feedback. I was able to figure it out. On Import of the package to SQL itself I changed the 'Protection Level' to 'Rely on server storage and roles for access control'. This allowed the job to execute successfully and everything looks great!

SQL Server Management Tools Installation fails with registry Wow6432Node key's (default) value

On Windows 7 x64, SQL Server 2014(x64) Management Tools installation fails with the following error;
Feature: Management Tools - Complete
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Management Services
Component error code: 1406
Component log file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140719_170948\sql_ssms_Cpu64_1.log
Error description: Could not write value to key \SOFTWARE. Verify that you have sufficient access to that key, or contact your support personnel.
I monitored installation with Process Monitor and find that it is trying to write(RegSetValue) HKLM\SOFTWARE\Wow6432Node\(Default) value which results in "Access Denied".
So, when i try to change that key's default value within regedit, it is not allowed too;
Cannot edit : Error writing the value's new contents..
For Wow6432Node key, i grant permissions to following users/groups; Everyone, Current Admin Account, Administrators, System but that did not help to change that default value even with regedit.
I could only think about registry corruption or some windows bug or may be some other program intervention, so, i disabled antivirus app. What might it be and how could i solve it?
After trying several things, finally, i applied the following and it worked. Restart may be required after applying it.
regdacl HKLM\SOFTWARE\Wow6432node /gga:F /ggu:F /ggs:F
Download regdacl here
http://www.heysoft.de/en/software/regtools.php?lang=EN

Oracle Linux Database Configuration Warning

I am trying to install a database for my database admin class. Our teacher had us install a database from scratch and now we are to load a new database that he created instead of starting from scratch. The problem I am having is at the end of the database configuration I receive a warning from the database configuration assistant stating the following:
Enterprise manager configuration failed due to the following error -
Failed to allocate port(s) in the specified range(s) for the following
process(es): JMS [5540-5559], RMI[5520-5539], Database Control
[5500-5519],EM Agent [3938]|[1830-1849]
refer to the log file at
/u01/app/oracle/cfgtoollogs/dbca/Lab3/emConfig.log for more details.
You can retry configuring this database with Enterprise Manager later
by manually running /u01/app/oracle/product/11.2.0/bin/emca script.
I ran the said script and don't know if it completed successfully seeing as I did not
receive any message saying so. If you can help I would greatly appreciate the help.

Generating an Entity Framework model - There is insufficient system memory in resource pool 'internal' to run this query

I'm just trying to right click then select "Generate Model from database." and I get the error:
Unable to generate the model because of the following exception:
'An error occurred while executing the command definition. See the inner
exception for details.
There is insufficient system memory in
resource pool 'internal' to run this query. '.
Loading metadata from
the database took 00:00:04.0661492. Generating the model took
00:00:01.7104861.
I'm running SQL Server 2008 express, and only trying to generate 10 tables.
It looks like there is a bug in SQL Server and they have fixed it. Try downloading the fix.
Temporary fix :
Go to services.msc and stop and start SQL Server (MSSQLSERVER) and you are good to go!

Resources