3

I am running SonarQube 5.4 on Azure / Windows Server 2012 (SP2) and MySQL MySQL 5.7.12 Community Server.

Everything works fine with version 5.4. I followed the upgrade steps from this link: http://docs.sonarqube.org/display/SONARNEXT/Upgrading.

I am able to install SonarQube 5.5, run it with default database and install my plugins (except for Views which is not available for some reasons).

Then I stop the server and update the information in sonar.properties so it uses my MySQL database.

I restart the server and go to the database upgrade page. I launch the upgrade and it eventually says the upgrade failed.

When I look at the log file, I see the following:

2016.05.18 10:22:16 INFO  web[DbMigration]    -> 0.8130s
2016.05.18 10:22:16 INFO  web[DbMigration]    -> 0 rows
2016.05.18 10:22:16 INFO  web[DbMigration] ==  AddIndexCeActivityIslastStatus: migrated (0.8130s) ========================
2016.05.18 10:22:16 INFO  web[DbMigration] 
2016.05.18 10:22:17 INFO  web[o.s.d.c.MysqlCharsetHandler] Verify that database collation is case-sensitive
2016.05.18 10:22:17 INFO  web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no proxy)
2016.05.18 10:22:18 INFO  web[o.s.s.e.IndexCreator] Create index tests
2016.05.18 10:22:18 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [tests] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:18 INFO  web[o.s.s.e.IndexCreator] Create type tests/test
2016.05.18 10:22:19 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [tests] create_mapping [test]
2016.05.18 10:22:19 INFO  web[o.s.s.e.IndexCreator] Create index activities
2016.05.18 10:22:19 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [activities] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:19 INFO  web[o.s.s.e.IndexCreator] Create type activities/activity
2016.05.18 10:22:19 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [activities] create_mapping [activity]
2016.05.18 10:22:20 INFO  web[o.s.s.e.IndexCreator] Create index rules
2016.05.18 10:22:20 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [rules] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:20 INFO  web[o.s.s.e.IndexCreator] Create type rules/activeRule
2016.05.18 10:22:20 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [rules] create_mapping [activeRule]
2016.05.18 10:22:20 INFO  web[o.s.s.e.IndexCreator] Create type rules/rule
2016.05.18 10:22:20 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [rules] create_mapping [rule]
2016.05.18 10:22:20 INFO  web[o.s.s.e.IndexCreator] Create index issues
2016.05.18 10:22:20 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [issues] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:21 INFO  web[o.s.s.e.IndexCreator] Create type issues/authorization
2016.05.18 10:22:21 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [issues] create_mapping [authorization]
2016.05.18 10:22:21 INFO  web[o.s.s.e.IndexCreator] Create type issues/issue
2016.05.18 10:22:21 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [issues] create_mapping [issue]
2016.05.18 10:22:21 INFO  web[o.s.s.e.IndexCreator] Create index users
2016.05.18 10:22:21 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [users] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:21 INFO  web[o.s.s.e.IndexCreator] Create type users/user
2016.05.18 10:22:21 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [users] create_mapping [user]
2016.05.18 10:22:21 INFO  web[o.s.s.e.IndexCreator] Create index views
2016.05.18 10:22:21 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [views] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.05.18 10:22:22 INFO  web[o.s.s.e.IndexCreator] Create type views/view
2016.05.18 10:22:22 INFO   es[o.e.cluster.metadata]  [sonar-1463581252531] [views] create_mapping [view]
2016.05.18 10:22:22 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2016.05.18 10:22:22 INFO  web[o.s.s.s.RegisterMetrics] Register metrics
2016.05.18 10:22:22 INFO  web[o.s.s.s.RegisterMetrics] Disable metric List of projects in error [projects_in_error]
2016.05.18 10:22:22 INFO  web[o.s.s.s.RegisterMetrics] Disable metric List of projects in warning [projects_in_warning]
2016.05.18 10:22:23 INFO  web[o.s.s.r.RegisterRules] Register rules
2016.05.18 10:22:29 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles
2016.05.18 10:22:31 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters
2016.05.18 10:22:31 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards
2016.05.18 10:22:31 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates
2016.05.18 10:22:31 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2016.05.18 10:22:31 INFO  web[o.s.s.s.LogServerId] Server information:
  - ID            : "1c3009f658bf71b"
  - Organisation  : "Manulife"
  - Registered IP : "10.234.41.5"

2016.05.18 10:22:31 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@3894530f [pattern=/sessions/init/*]
2016.05.18 10:22:31 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@3de8e60d [pattern=/oauth2/callback/*]
2016.05.18 10:22:31 INFO  web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=60830ms
2016.05.18 10:22:31 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
java.lang.NullPointerException: null
    at org.sonar.server.startup.FeedUsersLocalStartupTask.updateUsersLocal(FeedUsersLocalStartupTask.java:93) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.startup.FeedUsersLocalStartupTask.start(FeedUsersLocalStartupTask.java:76) ~[sonar-server-5.5.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_77]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
    at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.5.jar:na]
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:44) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:78) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:44) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:75) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:199) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:114) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:99) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.doRestartContainer(PlatformDatabaseMigration.java:138) [sonar-server-5.5.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.doDatabaseMigration(PlatformDatabaseMigration.java:114) [sonar-server-5.5.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.access$000(PlatformDatabaseMigration.java:37) [sonar-server-5.5.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration$1.run(PlatformDatabaseMigration.java:101) [sonar-server-5.5.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_77]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_77]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_77]

Then, if I restart the server, it stops automatically after a few seconds and I see this in the log file:

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2016.05.18 10:45:08 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory E:\sonarqube\sonarqube-5.5\temp
2016.05.18 10:45:08 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_77\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=E:\sonarqube\sonarqube-5.5\temp -javaagent:C:\Program Files\Java\jre1.8.0_77\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\frouel1\AppData\Local\Temp\2\sq-process839328600891893216properties
2016.05.18 10:45:09 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
2016.05.18 10:45:09 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on 127.0.0.1:9003
2016.05.18 10:45:09 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] version[1.7.5], pid[4284], build[00f95f4/2016-02-02T09:55:30Z]
2016.05.18 10:45:09 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] initializing ...
2016.05.18 10:45:09 INFO   es[o.e.plugins]  [sonar-1463582708673] loaded [], sites []
2016.05.18 10:45:10 INFO   es[o.elasticsearch.env]  [sonar-1463582708673] using [1] data paths, mounts [[Volume E (E:)]], net usable_space [1013.1gb], net total_space [1021.8gb], types [NTFS]
2016.05.18 10:45:11 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
2016.05.18 10:45:11 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] initialized
2016.05.18 10:45:11 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] starting ...
2016.05.18 10:45:12 INFO   es[o.e.transport]  [sonar-1463582708673] bound_address {inet[/127.0.0.1:9003]}, publish_address {inet[/127.0.0.1:9003]}
2016.05.18 10:45:12 INFO   es[o.e.discovery]  [sonar-1463582708673] sonarqube/QR7iG-ndSSWN59sMs0gS-A
2016.05.18 10:45:15 INFO   es[o.e.cluster.service]  [sonar-1463582708673] new_master [sonar-1463582708673][QR7iG-ndSSWN59sMs0gS-A][AZCWVCBSCINP01][inet[/127.0.0.1:9003]]{rack_id=sonar-1463582708673}, reason: zen-disco-join (elected_as_master)
2016.05.18 10:45:15 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] started
2016.05.18 10:45:15 INFO   es[o.e.gateway]  [sonar-1463582708673] recovered [6] indices into cluster_state
2016.05.18 10:45:16 INFO  app[o.s.p.m.Monitor] Process[es] is up
2016.05.18 10:45:16 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_77\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=E:\sonarqube\sonarqube-5.5\temp -javaagent:C:\Program Files\Java\jre1.8.0_77\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;E:\sonarqube\sonarqube-5.5\lib\jdbc\mysql\mysql-connector-java-5.1.35.jar org.sonar.server.app.WebServer C:\Users\frouel1\AppData\Local\Temp\2\sq-process6059395674422514261properties
2016.05.18 10:45:17 INFO  web[o.s.p.ProcessEntryPoint] Starting web
2016.05.18 10:45:17 INFO  web[o.s.s.a.TomcatContexts] Webapp directory: E:\sonarqube\sonarqube-5.5\web
2016.05.18 10:45:17 INFO  web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9002"]
2016.05.18 10:45:17 INFO  web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.05.18 10:45:18 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 5.5 / 5773a4aab0ef6c0de79d3038e82f8a051049d6d0
2016.05.18 10:45:18 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:mysql://localhost:3306/sonar55?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2016.05.18 10:45:19 INFO  web[o.s.s.p.DefaultServerFileSystem] SonarQube home: E:\sonarqube\sonarqube-5.5
2016.05.18 10:45:19 INFO  web[o.e.plugins] [sonar-1463582708673] loaded [], sites []
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin C# / 5.2 / 54d1d010bc1816dc89bf31237ce361921eaf3242
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin CSS / 1.8 / 55a17999ec9892984e2cda4bb171916d50058b5b
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Checkstyle / 2.4 / abe1e23436ed7b227a3a325cbf12e204a7c90fc9
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Findbugs / 3.3 / e1a76544ee6aed765106e7e2bb64072adf63ccaf
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Java / 3.13.1 / cf0f0c950ba3e83a87c7fe11c6ff7e63f4864bd9
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin JavaScript / 2.12 / 1b7786cb76e9f7d1b0fa49196e89d40e0ff286f1
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Jazz RTC / 1.1 / 5e1f94a949cd7b73a10c912a7006ddf0ec0f1429
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin PMD / 2.5 / 2b4e2b9de568d5436e02cd874442e005f45bf3db
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin SVN / 1.3 / aff503d48bc77b07c2b62abf93249d0a20bd355c
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Web / 2.4 / 61c14c00da36f77d18c019ad2bd7942708e99c13
2016.05.18 10:45:19 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin XML / 1.4.1 / d2c0388961fcbe78ac597ca3fb3e262d3e733988
2016.05.18 10:45:20 INFO  web[o.s.d.c.MysqlCharsetHandler] Verify that database collation is case-sensitive
2016.05.18 10:45:20 INFO  web[o.s.s.p.RailsAppsDeployer] Deploying Ruby on Rails applications
2016.05.18 10:45:22 INFO  web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no proxy)
2016.05.18 10:45:22 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2016.05.18 10:45:22 INFO  web[o.s.s.s.RegisterMetrics] Register metrics
2016.05.18 10:45:23 INFO  web[o.s.s.r.RegisterRules] Register rules
2016.05.18 10:45:27 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles
2016.05.18 10:45:28 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters
2016.05.18 10:45:28 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards
2016.05.18 10:45:28 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates
2016.05.18 10:45:28 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2016.05.18 10:45:28 INFO  web[o.s.s.s.LogServerId] Server information:
  - ID            : "1c3009f658bf71b"
  - Organisation  : "Manulife"
  - Registered IP : "10.234.41.5"

2016.05.18 10:45:29 INFO  web[o.s.s.n.NotificationService] Notification service stopped
2016.05.18 10:45:29 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.NullPointerException: null
    at org.sonar.server.startup.FeedUsersLocalStartupTask.updateUsersLocal(FeedUsersLocalStartupTask.java:93) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.startup.FeedUsersLocalStartupTask.start(FeedUsersLocalStartupTask.java:76) ~[sonar-server-5.5.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_77]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
    at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.5.jar:na]
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:44) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:78) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:44) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:75) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:199) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:114) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:99) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-5.5.jar:na]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.30.jar:8.0.30]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.30.jar:8.0.30]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.30.jar:8.0.30]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.30.jar:8.0.30]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.30.jar:8.0.30]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_77]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_77]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_77]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_77]
2016.05.18 10:45:29 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.05.18 10:45:29 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.05.18 10:45:29 WARN  web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(Unknown Source)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
2016.05.18 10:45:29 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9002"]
2016.05.18 10:45:29 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started
2016.05.18 10:45:29 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9002
2016.05.18 10:45:29 WARN  web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
    at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-5.5.jar:na]
    at org.sonar.server.app.WebServer.isUp(WebServer.java:48) [sonar-server-5.5.jar:na]
    at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.5.jar:na]
    at org.sonar.server.app.WebServer.main(WebServer.java:69) [sonar-server-5.5.jar:na]
2016.05.18 10:45:29 INFO  web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9002"]
2016.05.18 10:45:29 INFO  web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9002"]
2016.05.18 10:45:29 INFO  web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9002"]
2016.05.18 10:45:29 INFO  web[o.s.s.a.TomcatAccessLog] Web server is stopped
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
2016.05.18 10:45:30 INFO  app[o.s.p.m.Monitor] Process[es] is stopping
2016.05.18 10:45:30 INFO   es[o.s.p.StopWatcher]  Stopping process
2016.05.18 10:45:30 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] stopping ...
2016.05.18 10:45:30 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] stopped
2016.05.18 10:45:30 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] closing ...
2016.05.18 10:45:30 INFO   es[o.elasticsearch.node]  [sonar-1463582708673] closed
2016.05.18 10:45:31 INFO  app[o.s.p.m.Monitor] Process[es] is stopped

I also have the LDAP plugin on my SonarQube 5.4 install. I tried version 5.5 with and without it with the same results.

I must be missing something but I have no clue what is wrong.

François
  • 31
  • 6
  • Did you define sonar.security.localUsers in your config? – Jeroen Heier May 18 '16 at 19:53
  • 1
    This issue seems to come from the fact that at least one of your user has nothing in the column 'USERS.EXTERNAL_IDENTITY_PROVIDER'. You could look into your server's log for a migration containing 'MigrateUsersIdentity: migrating', and finishing by 'MigrateUsersIdentity: migrated' and copy it here. – Julien L. - SonarSource Team May 19 '16 at 07:17
  • 1
    Could you also send us the result of the SQL query 'select count(id) from users where external_identity_provider is null' ? thanks. – Julien L. - SonarSource Team May 19 '16 at 07:19
  • Ah, forget my first comment : the migration 'MigrateUsersIdentity' has been done when upgrading to SonarQube 5.4, you won't see it in the log of the migration to 5.5. So please just send me the result of the SQL of my second comment. – Julien L. - SonarSource Team May 19 '16 at 07:24
  • The query returned a count of 11. 9 of the 11 accounts were "deleted" by me when we started using LDAP. But, when we delete a user, it remains in the database. I currently have another 7 accounts that are managed via LDAP. When I do the database upgrade, should I have the LDAP plugin installed or not? I'm pretty sure I tried both, but just in case... – François May 19 '16 at 11:03
  • Could it be user with id =6 that causes the issue? It doesn't show up in the user interface but is marked as active... – François May 19 '16 at 12:01
  • 1
    select id,login,email,remember_token,active,external_identity_provider from users where active=1; – François May 19 '16 at 12:01
  • | id | login | email | remember_token | active | external_identity_provider | **** | 1 | admin | 1@something.com | 5874ca3364dc53f4e4b640b3f8848cbad2ef5c17 | 1 | sonarqube | **** | 6 | deleted5 | NULL | NULL | 1 | NULL | **** | 11 | LDAP user11 | 11@something.com | NULL | 1 | sonarqube | ... – François May 19 '16 at 12:02
  • I created a copy of the database and deleted all users from it except for the admin user. The database upgrade was successful. It sounds like the LDAP plugin caused data integrity issues and corrupted the database in a way that prevents the database upgrade to take place. Or, the database upgrade makes wrong assumptions about the content of the users tables. – François May 30 '16 at 19:17
  • I'm sorry, I haven't seen your answer before... Indeed, the issue is coming from user with id 6 that have no external_identity_provider. From what I see from the code, here's what could have happened : this user has been removed from SonarQube, but not from LDAP, so we he logged in SonarQube, the external_identity_provider has not been updated (It was not done in SonarQube 5.4). Then this user prevent the upgrade to 5.5. So answer given by Mitch is a good solution – Julien L. - SonarSource Team Jun 01 '16 at 12:31

1 Answers1

7

Had the same issue, there was one user with null external_identity_provider. I ran this query:

update users set external_identity_provider='sonarqube' where external_identity_provider is null

and restarted sonar - all running fine now.

Mitch
  • 71
  • 1
  • This SQL script fixed it for me too, note that I also had to disable LDAP in the sonar.properties and delete the plugin JAR file in extension\plugins to do the upgrade. I then re added them after I had completed the DB migration (in my case from 5.4 to 5.6) – Richard Fennell Jun 08 '16 at 11:38