Can't upgrade from 10.5.0 to 10.8.1

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)

We have sonarqube-developer edition. I’m trying to upgrade from 10.5.0 to 10.8.1. Our java version is: java-17-openjdk-17.0.12.0.7-2.el8.x86_64

  • how is SonarQube deployed: zip, Docker, Helm

zip

  • what are you trying to achieve

Upgrade from 10.5.0 to 10.8.1

  • what have you tried so far to achieve this

Followed my standard upgrade procedure but for some reason elasticsearch does not start. I’m getting the errors bellow:

sonar.log

2025.01.09 09:21:15 DEBUG app[][jdk.event.security] X509Certificate: Alg:SHA1withRSA, Serial:1, Subject:CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE, Issuer:CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE, Key type:RSA, Length:2048, Cert Id:607365522, Valid from:5/30/00, 12:44 PM, Valid until:5/30/20, 12:44 PM
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 1] start execution
2025.01.09 09:21:16 DEBUG app[][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2025.01.09 09:21:16 DEBUG app[][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://localhost:9001
2025.01.09 09:21:16 DEBUG app[][o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 1] Request connection for {}->http://localhost:9001
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://localhost:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request failed
java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	at java.base/java.lang.Thread.run(Thread.java:840)
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 1] connection request failed
2025.01.09 09:21:16 DEBUG app[][o.e.c.RestClient] request [GET http://localhost:9001/] failed
java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	at java.base/java.lang.Thread.run(Thread.java:840)
2025.01.09 09:21:16 DEBUG app[][o.e.c.RestClient] added [[host=http://localhost:9001]] to blacklist
2025.01.09 09:21:16 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 2] start execution
2025.01.09 09:21:16 DEBUG app[][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2025.01.09 09:21:16 DEBUG app[][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://localhost:9001

es.log

2025.01.09 09:21:43 INFO  es[][o.e.x.s.Security] Security is disabled
2025.01.09 09:21:43 INFO  es[][o.e.x.a.APMPlugin] APM ingest plugin is disabled
2025.01.09 09:21:43 DEBUG es[][o.e.c.u.FeatureFlag] The current build is a not snapshot, feature flag [failure_store] is disabled
2025.01.09 09:21:43 DEBUG es[][o.e.x.i.l.Throttler] Reset task scheduled with interval [1d]
2025.01.09 09:21:43 INFO  es[][o.e.t.a.APM] Sending apm metrics is disabled
2025.01.09 09:21:43 INFO  es[][o.e.t.a.APM] Sending apm tracing is disabled
2025.01.09 09:21:43 DEBUG es[][o.e.a.ActionModule] Using custom REST interceptor from plugin org.elasticsearch.xpack.security.Security
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.l.InternalLoggerFactory] Using Log4J2 as the default logging framework
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent0] -Dio.netty.noUnsafe: true
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent0] sun.misc.Unsafe: unavailable (io.netty.noUnsafe)
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent0] Java version: 17
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent0] java.nio.DirectByteBuffer.<init>(long, {int,long}): unavailable
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] maxDirectMemory: 536870912 bytes (maybe)
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] -Dio.netty.tmpdir: /opt/sonarqube/tmp (java.io.tmpdir)
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] -Dio.netty.bitMode: 64 (sun.arch.data.model)
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] -Dio.netty.maxDirectMemory: -1 bytes
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] -Dio.netty.uninitializedArrayAllocationThreshold: -1
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.CleanerJava9] java.nio.ByteBuffer.cleaner(): unavailable
java.lang.UnsupportedOperationException: sun.misc.Unsafe unavailable
	at io.netty.util.internal.CleanerJava9.<clinit>(CleanerJava9.java:68) ~[?:?]
	at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:191) ~[?:?]
	at io.netty.util.ConstantPool.<init>(ConstantPool.java:34) ~[?:?]
	at io.netty.channel.ChannelOption$1.<init>(ChannelOption.java:36) ~[?:?]
	at io.netty.channel.ChannelOption.<clinit>(ChannelOption.java:36) ~[?:?]
	at org.elasticsearch.transport.netty4.Netty4Transport.<clinit>(Netty4Transport.java:68) ~[?:?]
	at org.elasticsearch.transport.netty4.Netty4Plugin.lambda$getTransports$4(Netty4Plugin.java:161) ~[?:?]
	at org.elasticsearch.node.NodeConstruction.construct(NodeConstruction.java:888) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:266) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.node.Node.<init>(Node.java:192) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:240) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:240) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.14.3.jar:?]
2025.01.09 09:21:43 DEBUG es[][i.n.u.i.PlatformDependent] -Dio.netty.noPreferDirect: true
2025.01.09 09:21:43 DEBUG es[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.level: simple
2025.01.09 09:21:43 DEBUG es[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.targetRecords: 4
2025.01.09 09:21:43 INFO  es[][o.e.t.n.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=512mb}]
2025.01.09 09:21:43 DEBUG es[][o.e.t.RemoteClusterCredentialsManager] Updated remote cluster credentials for clusters: []
2025.01.09 09:21:43 DEBUG es[][o.e.t.RemoteClusterCredentialsManager] Updated remote cluster credentials for clusters: []
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.search.nodes.transport_actions.latency.histogram
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.search_response.took_durations.histogram
2025.01.09 09:21:43 DEBUG es[][o.e.h.n.Netty4HttpServerTransport] using max_chunk_size[8kb], max_header_size[16kb], max_initial_line_length[4kb], max_content_length[100mb], receive_predictor[64kb], max_composite_buffer_components[69905], pipelining_max_events[10000]
2025.01.09 09:21:43 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.requests.total
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.exceptions.total
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.throttles.total
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.operations.total
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.operations.unsuccessful.total
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.exceptions.histogram
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.throttles.histogram
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.repositories.requests.http_request_time.histogram
2025.01.09 09:21:43 DEBUG es[][o.e.d.SettingsBasedSeedHostsProvider] using initial hosts [127.0.0.1:38183, [::1]:38183]
2025.01.09 09:21:43 INFO  es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2025.01.09 09:21:43 DEBUG es[][o.e.m.j.JvmGcMonitorService] enabled [true], interval [1s], gc_threshold [{default=GcThreshold{name='default', warnThreshold=10000, infoThreshold=5000, debugThreshold=2000}, young=GcThreshold{name='young', warnThreshold=1000, infoThreshold=700, debugThreshold=400}, old=GcThreshold{name='old', warnThreshold=10000, infoThreshold=5000, debugThreshold=2000}}], overhead [50, 25, 10]
2025.01.09 09:21:43 DEBUG es[][o.e.m.o.OsService] using refresh_interval [1s]
2025.01.09 09:21:43 DEBUG es[][o.e.m.p.ProcessService] using refresh_interval [1s]
2025.01.09 09:21:43 DEBUG es[][o.e.m.j.JvmService] using refresh_interval [1s]
2025.01.09 09:21:43 DEBUG es[][o.e.m.f.FsService] using refresh_interval [1s]
2025.01.09 09:21:43 DEBUG es[][o.e.t.a.APMMeterRegistry] Registering an instrument with name: es.health.overall.red.status
2025.01.09 09:21:44 DEBUG es[][o.e.n.Node] initializing HTTP handlers ...
2025.01.09 09:21:44 INFO  es[][o.e.n.Node] initialized
2025.01.09 09:21:44 INFO  es[][o.e.n.Node] starting ...
2025.01.09 09:21:44 DEBUG es[][o.e.l.ClusterStateLicenseService] initializing license state
2025.01.09 09:21:44 DEBUG es[][i.n.c.MultithreadEventLoopGroup] -Dio.netty.eventLoopThreads: 8
2025.01.09 09:21:44 DEBUG es[][i.n.u.c.GlobalEventExecutor] -Dio.netty.globalEventExecutor.quietPeriodSeconds: 1
2025.01.09 09:21:44 DEBUG es[][i.n.u.i.InternalThreadLocalMap] -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
2025.01.09 09:21:44 DEBUG es[][i.n.u.i.InternalThreadLocalMap] -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
2025.01.09 09:21:44 DEBUG es[][i.n.c.n.NioEventLoop] -Dio.netty.noKeySetOptimization: true
2025.01.09 09:21:44 DEBUG es[][i.n.c.n.NioEventLoop] -Dio.netty.selectorAutoRebuildThreshold: 512
2025.01.09 09:21:44 DEBUG es[][i.n.u.i.PlatformDependent] org.jctools-core.MpscChunkedArrayQueue: unavailable
2025.01.09 09:21:44 DEBUG es[][o.e.t.n.Netty4Transport] using profile[default], worker_count[4], port[38183], bind_host[[127.0.0.1]], publish_host[[127.0.0.1]], receive_predictor[64kb->64kb]
2025.01.09 09:21:44 DEBUG es[][o.e.t.TcpTransport] binding server bootstrap to: [127.0.0.1]
2025.01.09 09:21:44 DEBUG es[][i.n.c.DefaultChannelId] Could not invoke ProcessHandle.current().pid();
java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
	at io.netty.channel.DefaultChannelId.processHandlePid(DefaultChannelId.java:116) ~[?:?]
	at io.netty.channel.DefaultChannelId.defaultProcessId(DefaultChannelId.java:178) ~[?:?]
	at io.netty.channel.DefaultChannelId.<clinit>(DefaultChannelId.java:77) ~[?:?]
	at io.netty.channel.AbstractChannel.newId(AbstractChannel.java:113) ~[?:?]
	at io.netty.channel.AbstractChannel.<init>(AbstractChannel.java:73) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel.<init>(AbstractNioChannel.java:80) ~[?:?]
	at io.netty.channel.nio.AbstractNioMessageChannel.<init>(AbstractNioMessageChannel.java:42) ~[?:?]
	at io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:96) ~[?:?]
	at io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:89) ~[?:?]
	at io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:82) ~[?:?]
	at io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:75) ~[?:?]
	at org.elasticsearch.transport.netty4.CopyBytesServerSocketChannel.<init>(CopyBytesServerSocketChannel.java:39) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[?:?]
	at io.netty.channel.ReflectiveChannelFactory.newChannel(ReflectiveChannelFactory.java:44) ~[?:?]
	at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:326) ~[?:?]
	at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:288) ~[?:?]
	at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:284) ~[?:?]
	at org.elasticsearch.transport.netty4.Netty4Transport.bind(Netty4Transport.java:289) ~[?:?]
	at org.elasticsearch.transport.netty4.Netty4Transport.bind(Netty4Transport.java:65) ~[?:?]
	at org.elasticsearch.transport.TcpTransport.lambda$bindToPort$6(TcpTransport.java:493) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:44) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:491) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:466) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:125) ~[?:?]
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:50) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.transport.TransportService.doStart(TransportService.java:334) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:50) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.node.Node.start(Node.java:314) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.start(Elasticsearch.java:462) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:255) ~[elasticsearch-8.14.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.14.3.jar:?]
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "manageProcess")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:485) ~[?:?]
	at java.security.AccessController.checkPermission(AccessController.java:1068) ~[?:?]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:416) ~[?:?]
	at java.lang.ProcessHandleImpl.current(ProcessHandleImpl.java:292) ~[?:?]
	at java.lang.ProcessHandle.current(ProcessHandle.java:136) ~[?:?]
	... 39 more
2025.01.09 09:21:44 DEBUG es[][i.n.c.DefaultChannelId] -Dio.netty.processId: 24904 (auto-detected)
2025.01.09 09:21:44 DEBUG es[][i.n.u.NetUtil] -Djava.net.preferIPv4Stack: false
2025.01.09 09:21:44 DEBUG es[][i.n.u.NetUtil] -Djava.net.preferIPv6Addresses: false
2025.01.09 09:21:44 DEBUG es[][i.n.u.NetUtilInitializations] Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)
2025.01.09 09:21:44 DEBUG es[][i.n.u.NetUtil] /proc/sys/net/core/somaxconn: 2048
2025.01.09 09:21:44 DEBUG es[][i.n.c.DefaultChannelId] -Dio.netty.machineId: 00:50:56:ff:fe:a0:e6:3d (auto-detected)

Hey there.

Is there anything else in the other log files (like web.log)? So far, I just see DEBUG elasticsearch messages rather than a specific failure.

Thans for the hint. In web.log there was an error message that my postgresql version is too old. Apparently this was done between 10.5 and 10.8.

Hey @Jaka_Luthar! I wasn’t aware of a change. Usually we would document this in the upgrade notes. Do you still have the error message?

I rolled back to 10.5. I’m little busy these days, but I will attempt another upgrade hopefully by the end of the week.