Make sure to tell us:
- What version are you upgrading from? Developer Edition version 8.9.10 (build 61524) to LTS 9.9 (build 65466)
- System information (Operating system, Java version, Database provider/version)
Linux
Java: 17.0.6+10
DB: sonarqube version > 11 - What’s the issue you’re facing? DB-Version Error
Hallo community,
I started moving from LTS Developer Edition version 8.9.10 (build 61524) to LTS Developer Edition version 9.9. I made a dump of the Postgres-SQL totest with and started the LTS 9.9 (build 65466/), as a systemd service.
Systemd Configuration:
[Unit]
Description=SonarQube 9.x service
After=syslog.target network.target
[Service]
Environment="JAVA_HOME=/usr/java/jdk-17.0.6+10"
Environment="SONAR_JAVA_PATH=/usr/java/jdk-17.0.6+10/bin/java"
Type=forking
ExecStart=/opt/sonarqube-9.9.0.65466/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube-9.9.0.65466/bin/linux-x86-64/sonar.sh stop
User=sonar
Group=sonar
LimitNOFILE=65536
LimitNPROC=8192
#Restart=always
[Install]
WantedBy=multi-user.target
I followed the Sonar update guides, have the right Version of Java, Postgres
https://docs.sonarqube.org/latest/setup-and-upgrade/lts-to-lts-release-upgrade-notes/
The server starts, but very short after shuts down with the following exception:
web.log
2023.03.15 10:57:19 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.03.15 10:57:20 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.0.65466 / ce743843018827cb30c05735e7971523de34bb48
2023.03.15 10:57:20 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://pgsqldevneu:5437/sonarqube_klon_20230120
2023.03.15 10:57:20 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.03.15 10:57:20 INFO web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@1869f114
2023.03.15 10:57:20 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.03.15 10:57:22 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube-9.9.0.65466
2023.03.15 10:57:22 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.03.15 10:57:22 INFO web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
*2023.03.15 10:57:22 WARN web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.server.platform.DatabaseServerCompatibility': Initialization of bean failed; nested exception is Current version is too old. Please upgrade to Long Term Support version firstly.**
**2023.03.15 10:57:22 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed**
**org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.server.platform.DatabaseServerCompatibility': Initialization of bean failed; nested exception is Current version is too old. Please upgrade to Long Term Support version firstly.**
* at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:103)
at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:196)
at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:169)
at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:77)
at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5222)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:430)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486)
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
at org.sonar.server.app.WebServer.start(WebServer.java:55)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
at org.sonar.server.app.WebServer.main(WebServer.java:104)*
**Caused by: org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.*
/In the other logs there are no errors:/
es.log
2023.03.15 10:57:19 INFO es[][o.e.n.Node] version[7.17.8], pid[335], build[default/tar/120eabe1c8a0cb2ae87cffc109a5b65d213e9df1/2022-12-02T17:33:09.727072865Z], OS[Linux/3.10.0-1062.9.1.el7.x86_64/amd64], JVM[Microsoft/OpenJDK 64-Bit Server VM/17.0.6/17.0.6+10-LTS]
2023.03.15 10:57:19 INFO es[][o.e.n.Node] JVM home [/usr/java/jdk-17.0.6+10]
2023.03.15 10:57:19 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseG1GC, -Djava.io.tmpdir=/opt/sonarqube-9.9.0.65466/temp, -XX:ErrorFile=/opt/sonarqube-9.9.0.65466/logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djna.tmpdir=/opt/sonarqube-9.9.0.65466/temp, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube-9.9.0.65466/elasticsearch, -Des.path.conf=/opt/sonarqube-9.9.0.65466/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2023.03.15 10:57:20 INFO es[][o.e.p.PluginsService] no plugins loaded
2023.03.15 10:57:20 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [181.4gb], net total_space [199.9gb], types [rootfs]
2023.03.15 10:57:20 INFO es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2023.03.15 10:57:20 INFO es[][o.e.n.Node] node name [sonarqube], node ID [-hjziFqjQ42qYYAL2-9BVQ], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest]
nohup.log
2023.03.15 10:57:18 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-9.9.0.65466/temp
2023.03.15 10:57:18 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:40295]
2023.03.15 10:57:18 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube-9.9.0.65466/elasticsearch]: /opt/sonarqube-9.9.0.65466/elasticsearch/bin/elasticsearch
2023.03.15 10:57:18 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.03.15 10:57:19 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.03.15 10:57:19 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube-9.9.0.65466]: /usr/java/jdk-17.0.6+10/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube-9.9.0.65466/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.9.0.65466.jar:/opt/sonarqube-9.9.0.65466/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.server.app.WebServer /opt/sonarqube-9.9.0.65466/temp/sq-process7716614905018976142properties
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/opt/sonarqube-9.9.0.65466/lib/sonar-application-9.9.0.65466.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.03.15 10:57:23 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
sonar.log
2023.03.15 10:57:18 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-9.9.0.65466/temp
2023.03.15 10:57:18 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:40295]
2023.03.15 10:57:18 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube-9.9.0.65466/elasticsearch]: /opt/sonarqube-9.9.0.65466/elasticsearch/bin/elasticsearch
2023.03.15 10:57:18 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.03.15 10:57:19 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.03.15 10:57:19 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube-9.9.0.65466]: /usr/java/jdk-17.0.6+10/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube-9.9.0.65466/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.9.0.65466.jar:/opt/sonarqube-9.9.0.65466/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.server.app.WebServer /opt/sonarqube-9.9.0.65466/temp/sq-process7716614905018976142properties
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.03.15 10:57:23 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.15 10:57:23 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
Maybe you can help me out. I saw there are other Problems in the community board when moving from 8.9 to 9.9
Kind regards
Rami Salsaa