We've been using SonarQube for a long time, upgraded over many versions and now executed the long awaited LTS upgrade from version 5.6.6 to 6.7. Unfortunately, the database migration failed due to an SQLException "The table 'project_measures' is full".
Are there any guidelines about what do in such a case?
Is it not okay to upgrade directly from version 5.6.6 to 6.7? Should I first upgrade to some other intermediate version? I thought LTS-to-LTS upgrades should work out fine...
2017.11.15 00:49:38 INFO web[][DbMigrations] #1218 'Delete orphan measures without component': success | time=16143ms
2017.11.15 00:49:38 INFO web[][DbMigrations] #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable'...
2017.11.15 00:51:04 ERROR web[][DbMigrations] #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable': failure | time=85651ms
2017.11.15 00:51:04 ERROR web[][DbMigrations] Executed DB migrations: failure | time=1502042ms
2017.11.15 00:51:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=1502119ms
2017.11.15 00:51:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable' failed
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:590)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52)
at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:50)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Fail to execute ALTER TABLE project_measures MODIFY COLUMN component_uuid VARCHAR (50) NOT NULL
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:97)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:77)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:117)
at org.sonar.server.platform.db.migration.version.v60.MakeComponentUuidNotNullOnMeasures.execute(MakeComponentUuidNotNullOnMeasures.java:40)
at org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
... 11 common frames omitted
Caused by: java.sql.SQLException: The table 'project_measures' is full
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2444)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:82)
... 16 common frames omitted
SonarQube is installed on a RHEL7 host using MySQL (rh-mysql57-mysql-server). The database location is /var/opt/rh/rh-mysql57/lib/mysql/sonar and there is free disk space available (but maybe not enough?):
/dev/mapper/vg0-var_opt 20G 17G 3.1G 85% /var/opt
Upgrade 5.6.6 to 6.7 is supported. According to your stack trace you are using MySQL server.
Can you have a look at server log files and the free space available on MySQL (maybe there is no enough space on your MySQL server for the migration) ?
Related
After installing Liferay 7.0 and choosing the MySQL database, I get this error:
Starting Liferay DXP Digital Enterprise 7.0.10 GA1 (Wilberforce / Build 7010 / June 15, 2016)
05:39:54,652 INFO [localhost-startStop-1][StartupAction:121] The following patches are installed: de-32-7010
05:39:54,743 WARN [localhost-startStop-1][ReleaseLocalServiceImpl:229] Table 'lportal.Release_' doesn't exist
05:39:54,745 INFO [localhost-startStop-1][ReleaseLocalServiceImpl:126] Create tables and populate with default data
05:45:25,609 INFO [localhost-startStop-1][BaseDB:502] Database does not support case sensitive queries
05:45:25,807 INFO [localhost-startStop-1][UpgradeProcess:84] Upgrading com.liferay.portal.security.audit.storage.internal.upgrade.AuditStorageServiceUpgrade$1
05:45:25,809 INFO [localhost-startStop-1][UpgradeProcess:99] Completed upgrade process com.liferay.portal.security.audit.storage.internal.upgrade.AuditStorageServiceUpgrade$1 in 2ms
05:45:37,082 INFO [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProcessSuite
05:45:37,084 INFO [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProperties
05:45:37,085 INFO [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifySystemProperties
05:45:37,085 INFO [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifySystemProperties in 0 ms
05:45:37,085 INFO [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifyPortalProperties
05:45:37,102 INFO [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifyPortalProperties in 17 ms
05:45:37,102 INFO [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifyDocumentLibrary
05:45:37,102 INFO [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifyDocumentLibrary in 0 ms
05:45:37,102 INFO [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyProperties in 18ms
05:45:37,103 INFO [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyDB2
05:45:37,103 INFO [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyDB2 in 0ms
05:45:37,104 INFO [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyMySQL
05:45:37,104 INFO [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyMySQL#verifyTableEngine
05:45:37,265 INFO [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyMySQL#verifyTableEngine in 161 ms
05:45:37,266 INFO [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyMySQL#verifyDatetimePrecision
05:45:56,727 INFO [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyMySQL#verifyDatetimePrecision in 19461 ms
05:45:56,728 INFO [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyMySQL in 19624ms
05:45:56,728 INFO [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyProcessSuite in 19646ms
05:45:56,861 ERROR [localhost-startStop-1][DBUpgrader:253] Unable to execute verify process: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'lportal.columns_priv' doesn't exist
com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'lportal.columns_priv' doesn't exist
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:74)
at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:113)
at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:78)
at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:47)
at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:175)
at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:87)
at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:247)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:243)
at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:85)
at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1341)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:272)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The problem is that your MySQL/J connector is too recent, Liferay is not yet compatible with it.
Download the ZIP file at https://dev.mysql.com/downloads/connector/j/5.1.html and extract it.
Go to your Liferay server's liferay/tomcat-xxxxx/lib/ext folder and remove any mysql-connector-xxxxxxxxx.jar that you find inside
Instead, in that same folder, put the mysql-connector-java-5.1.xx-bin.jar that can be found inside the ZIP that you downloaded at step 1
Stop Tomcat
Drop the MySQL database and recreate it (In MySQL console: drop database lportal; then create database lportal character set utf8;).
Start Tomcat
Now it should work.
I am using apache drill in window 10 having latest version (1.9).
I want to start my drill in distributed mode.
I have configure zookeeper zoo.cfg file:-
tickTime=2000
initLimit=10
syncLimit=5
dataDir=F:/zookeepertest/data
clientPort=2181
server.1=192.589.XX.01:2888:3888
server.1=192.565.XX.02:2888:3888
And Drill folder inside drill-override.conf
drill.exec: {
cluster-id: "test",
zk.connect: "192.589.XX.01:2181,192.565.XX.02:2181"
}
And my zookeeper is running..
Now When i trying to start my drill using this command:-
sqlline.bat -u "jdbc:drill:zk=192.589.XX.01:2181"
Its thoughing following error:-
Error: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client. (state=,code=0)
java.sql.SQLException: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client.
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:161)
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:70)
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
at sqlline.Commands.connect(Commands.java:1083)
at sqlline.Commands.connect(Commands.java:1015)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:742)
at sqlline.SqlLine.initArgs(SqlLine.java:528)
at sqlline.SqlLine.begin(SqlLine.java:596)
at sqlline.SqlLine.start(SqlLine.java:375)
at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client.
at org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:245)
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:154)
... 18 more
Caused by: java.io.IOException: Failure to connect to the zookeeper cluster service within the allotted time of 10000 milliseconds.
at org.apache.drill.exec.coord.zk.ZKClusterCoordinator.start(ZKClusterCoordinator.java:123)
at org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:243)
... 19 more
Can anyone tell how to start drill in distributed mode in window.??
From Drill documentation
To start drill in distributed mode, use drillbit.sh not sqlline i.e.
drillbit.sh start
Since drillbit.sh is a shell script (not a windows batch job) you'll need a 3rd party shell scripting tool such as Cygwin or since you're using Windows 10, you can also enable Bash on Ubuntu.
I am upgrading from Sonarqube 4.5.2 to 5.3 and the db migration failed. I am running on RH-Linux using MySQL. After running for 7 hours I got the following stacktrace. What is the state of the DB? What is my next step?
2016.02.29 18:36:16 INFO web[o.s.d.v.MassUpdate] 114749 issue_changes processed
(183 items/sec)
2016.02.29 18:37:09 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute databa
se migration: org.sonar.db.version.v51.FeedIssueChangesLongDates
java.lang.IllegalStateException: Error during processing of row: [created_at=201
5-07-01 23:54:59.0,updated_at=2015-07-01 23:54:59.0,issue_change_creation_date=2
015-07-01 23:28:45.0,id=1418038]
at org.sonar.db.version.SelectImpl.newExceptionWithRowDetails(SelectImpl
.java:89) ~[sonar-db-5.3.jar:na]
at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:81) ~[sonar-db
-5.3.jar:na]
at org.sonar.db.version.MassUpdate.execute(MassUpdate.java:76) ~[sonar-d
b-5.3.jar:na]
at org.sonar.db.version.v51.FeedIssueChangesLongDates.execute(FeedIssueC
hangesLongDates.java:49) ~[sonar-db-5.3.jar:na]
at org.sonar.db.version.BaseDataChange.execute(BaseDataChange.java:45) ~
[sonar-db-5.3.jar:na]
at org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(Data
baseMigrator.java:95) ~[sonar-server-5.3.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.
0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57) ~[na:1.7.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) ~[na:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(Ja
vaMethod.java:455) [jruby-complete-1.7.9.jar:na]
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [j
ruby-complete-1.7.9.jar:na]
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvo
ker.java:61) [jruby-complete-1.7.9.jar:na]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
168) [jruby-complete-1.7.9.jar:na]
:
:
:
2016.02.29 18:37:09 INFO web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=25048064ms
2016.02.29 18:37:09 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled:
Fail to execute database migration: org.sonar.db.version.v51
.FeedIssueChangesLongDates
You have to restore a backup. I hope you made one before starting the upgrade. Searching for FeedIssueChangesLongDates you can find the here the implementation. Look at the queries and the action executed on the records found. Based on that you can investigate the problematic records and correct/update in SQL directly.
"[GMQMsgConsumeThread:113.105.152.146:22300, queue:Q_COOMIX_IMG_META]" prio=10 tid=0x08431000 nid=0x774c runnable [0x6e6b5000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
- locked <0x83f593e0> (a com.mysql.jdbc.util.ReadAheadInputStream)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:379)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:1970)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1387)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1195)
- locked <0x83f596a0> (a java.lang.Object)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:693)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
- locked <0x83f596a0> (a java.lang.Object)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
.........
.........
Locked ownable synchronizers:
- None
The relational environment as follows:
mysql: 5.1.56
mysql jdbc driver: MySQL Connector/J 5.0.4
DBCP 1.4
Any ideas on what could be the cause?
thanks
This is caused by a deadlock. There is an uncommited data trying to be read. Im my case the data was on database schema, since the operations I was trying to do is an ALTER TABLE.
I changed my Sonar DB from Oracle to Default Derby. I successfully configured the Sonar Server, however I have error during the integration with Hudson.
Caused by: java.sql.SQLException: SQL driver not found oracle.jdbc.OracleDriver
at org.sonar.jpa.session.DriverDatabaseConnector.getConnection(DriverDatabaseConnector.java:91)
at org.sonar.jpa.session.AbstractDatabaseConnector.testConnection(AbstractDatabaseConnector.java:185)
... 41 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.sonar.jpa.session.DriverDatabaseConnector.getConnection(DriverDatabaseConnector.java:88)
... 42 more
Error states that I can't found OracleDriver, Which I should not use anymore.
In my Hudson configuration, I have removed my oracle configuration and replaced it with these :
Any idea on what I configured wrongly?
fixed by changing the driver to "org.apache.derby.jdbc.ClientDriver". Turns out that the remarks "Do not set if you use default embedded" is a misleading.