Started upgrade from 9.5 to 9.9 getting an error App would not start

Hi,

I have got sonarqube deployed via an App service which has been working fine all along, I created a test deployment which ran on v 9.5 to practice the upgrade before upgrading production.

Got it working via a PS script which downloads v9.9, unzips the folder and then runs the necessary start up file. One mistake, I realised the test version I deployed earlier was running java 17 with v 9.5, but on production we have java v11. When I realised my mistake, I changed the java version to v 17 and then ran the upgrade script once more.

On trying to visit the admin page, I am met with the dreaded CGI error. I checked the logs and the contents can be seen below.

11:33:58 PM Starting HttpPlatformHandler Script
11:33:59 PM Searching for sonar.properties file
11:34:02 PM File found at: C:\home\site\wwwroot\sonarqube-9.5.0.56709\conf\sonar.properties C:\home\site\wwwroot\sonarqube-9.9.0.65466\conf\sonar.properties
11:34:13 PM Resetting properties.
11:34:14 PM Updating sonar.properties based on environment/application settings.
11:34:14 PM Setting sonar.jdbc.password to xxxxxxxxxxxxxxxxxx
11:34:14 PM Setting sonar.jdbc.url to jdbc:sqlserver://xxxxxxxxxxxx.database.windows.net;databaseName=xxxxxxxxxxxx
11:34:14 PM Setting sonar.jdbc.username to xxxxxxxxxx
11:34:14 PM HTTP_PLATFORM_PORT is: 16640
11:34:14 PM Updating sonar.web.port to 16640
11:34:15 PM Saving updated sonar.properties contents
11:34:23 PM Searching for wrapper.conf file
11:34:24 PM File found at: C:\home\site\wwwroot\sonarqube-9.5.0.56709\conf\wrapper.conf
11:34:24 PM Writing to wrapper.conf file
11:34:24 PM Searching for duplicate plugins.
Compare-Object : Cannot bind argument to parameter 'ReferenceObject' because 
it is null.
At C:\home\site\wwwroot\HttpPlatformHandlerStartup.ps1:97 char:47
+ $duplicates = Compare-Object -ReferenceObject $uniquePlugins -Differe ...
+                                               ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Compare-Object], ParameterBind 
   ingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M 
   icrosoft.PowerShell.Commands.CompareObjectCommand
 
11:34:24 PM Searching for StartSonar.bat
11:34:24 PM File found at: C:\home\site\wwwroot\sonarqube-9.9.0.65466\bin\windows-x86-64\StartSonar.bat
11:34:24 PM Executing StartSonar.bat
Starting SonarQube...
2023.02.20 23:34:36 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\home\site\wwwroot\sonarqube-9.9.0.65466\temp
2023.02.20 23:34:37 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51137]
2023.02.20 23:34:37 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\home\site\wwwroot\sonarqube-9.9.0.65466\elasticsearch]: C:\Program Files\Java\microsoft-jdk-17.0.2.8\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\home\site\wwwroot\sonarqube-9.9.0.65466\temp -XX:ErrorFile=C:\home\site\wwwroot\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=C:\home\site\wwwroot\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 -Delasticsearch -Des.path.home=C:\home\site\wwwroot\sonarqube-9.9.0.65466\elasticsearch -Des.path.conf=C:\home\site\wwwroot\sonarqube-9.9.0.65466\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.02.20 23:34:37 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.02.20 23:34:38 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.SocketException: Permission denied: no further information
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:92)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:77)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:62)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:223)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:288)
Caused by: java.util.concurrent.ExecutionException: java.net.SocketException: Permission denied: no further information
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:257)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:244)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
	... 10 common frames omitted
Caused by: java.net.SocketException: Permission denied: no further information
	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:833)
2023.02.20 23:34:39 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.SocketException: Permission denied: no further information
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:92)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:77)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:62)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:223)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:288)
Caused by: java.util.concurrent.ExecutionException: java.net.SocketException: Permission denied: no further information
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:257)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:244)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
	... 10 common frames omitted

To my horror, I deleted the new deployment in an attempt to revert back to the previous deployment, now I get the following message on the screen.

Service Unavailable

HTTP Error 503. The service is unavailable.

Not sure what to do here.

Thanks in advance.

Hi,

You’re not coming all the way from 8.9, but I guess you could still benefit from the LTS to LTS Upgrade Notes. It’s not quite as explicit as I would like, but we don’t use the wrapper anymore.

Regarding your server error, your server logs may be more explicit, but this is already telling:

It looks like Elasticsearch isn’t able to open the sockets it needs. You should check es.log to see if there’s more detail.

 
HTH,
Ann