Web server failing to start on a new installation

(Ruben Vilhena) #1
  • which versions I am using
    I am using version sonarqube-7.6 as a new installation with Oracle DB 11.2.0.4.0, with JDBC Driver ojdbc6.

  • what I am trying to achieve
    New installation following the guidelines - https://docs.sonarqube.org/latest/setup/install-server/

  • what have I tried so far to achieve this

  • Configured Oracle DB
  • Copied JDBC Driver to the path on the server
  • Trying to run the StartSonar.bat

Getting the error:

2019.02.15 14:56:26 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2019.02.15 14:56:27 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2019.02.15 14:56:28 INFO  web[][o.e.p.PluginsService] no modules loaded
2019.02.15 14:56:28 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2019.02.15 14:56:28 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2019.02.15 14:56:28 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.02.15 14:56:30 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2019.02.15 14:56:30 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 7.6.0.21501 / d56689a5eb122c06cf87375828085609f5a68323
2019.02.15 14:56:30 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:oracle:thin:@dbserver:1521:dbname
2019.02.15 14:56:31 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube-7.6
2019.02.15 14:56:31 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2019.02.15 14:56:31 ERROR web[][o.s.s.p.Platform] Web server startup failed
java.lang.AbstractMethodError: null
	at org.apache.commons.dbcp2.DelegatingConnection.getSchema(DelegatingConnection.java:941)
	at org.apache.commons.dbcp2.DelegatingConnection.getSchema(DelegatingConnection.java:941)
	at org.sonar.db.DatabaseUtils.doTableExists(DatabaseUtils.java:303)
	at org.sonar.db.DatabaseUtils.tableExists(DatabaseUtils.java:290)
	at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.start(MigrationHistoryTableImpl.java:44)
	at java.util.Optional.ifPresent(Unknown Source)
	at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:107)
	at org.sonar.server.platform.Platform.start(Platform.java:211)
	at org.sonar.server.platform.Platform.startLevel2Container(Platform.java:177)
	at org.sonar.server.platform.Platform.init(Platform.java:87)
	at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:45)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

The web server is failing to start with the error below and the error is not clear enough for me to try other options.

(G Ann Campbell) #2

Hi,

Was there any more to that stacktrace? Are there errors in any other logs?

 
Ann

(Ruben Vilhena) #3

Hi Ann,

the other logs look ok. Only the web server log is showing errors.

I have attached the logs to my reply.

Not sure what to change as the error is not clear enough.

Could it be the JAVA version installed on the server?

Thanks,
Ruben

sonar.txt (4.6 KB)
web.txt (2.8 KB)

(G Ann Campbell) #4

Hi Ruben,

What plugins do you have installed?

 
Ann

(Ruben Vilhena) #5

Hi Ann,

I haven’t installed any plugins yet. I’m following the https://docs.sonarqube.org/latest/setup/install-server/ instructions.

Did the DB set up and now trying to start the web server.

Thanks,
Ruben

(Michal Duda) #6

What version of ojdbc6 driver are you using exactly? You can check that by unzipping the ojdbc6.jar and checking the Implementation-Version key in META-INF/MANIFEST.MF file.

(Ruben Vilhena) #7

Hi Michal,

the version showing on the MF file is Implementation-Version: 12.1.0.1.0.

(Michal Duda) #8

Can you try with the ojdbc6.jar version that corresponds to your Oracle DB version (https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html)?

(Ruben Vilhena) #9

Hi Michal,

if I do that I get a different error - Unsupported Oracle driver version: 11.2.0.4.0. Minimal supported version is 12.1…

I had used this driver initially but because of this error message I downloaded the 12.1 instead.

2019.02.18 09:25:09 INFO web[o.s.p.ProcessEntryPoint] Starting web
2019.02.18 09:25:10 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2019.02.18 09:25:11 INFO web[o.e.p.PluginsService] no modules loaded
2019.02.18 09:25:11 INFO web[o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2019.02.18 09:25:11 INFO web[o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2019.02.18 09:25:11 INFO web[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.02.18 09:25:12 INFO web[o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2019.02.18 09:25:12 INFO web[o.s.s.p.LogServerVersion] SonarQube Server / 7.6.0.21501 / d56689a5eb122c06cf87375828085609f5a68323
2019.02.18 09:25:12 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:oracle:thin:@havud222:1521:esiqdev
2019.02.18 09:25:13 ERROR web[o.s.s.p.Platform] Web server startup failed: Unsupported Oracle driver version: 11.2.0.4.0. Minimal supported version is 12.1.

(Michal Duda) #10

Can you please try upgrading to 12.2.0.1 then? Versions 12.1.0.1 and 12.1.0.2 are known to cause issues with SonarQube (mentioned on https://docs.sonarqube.org/latest/setup/install-server/).

(Ruben Vilhena) #11

I have replaced the driver.
Now showing a different error:
2019.02.18 10:56:33 INFO web[o.s.s.p.d.m.c.OracleCharsetHandler] Verify that database charset is UTF8
2019.02.18 10:56:33 ERROR web[o.s.s.p.Platform] Web server startup failed: Oracle NLS_CHARACTERSET does not support UTF8: WE8MSWIN1252

(Ruben Vilhena) #12

I am still blocked and not able to install SonarQube for a first time.
Can you please advise on the new issue I am currently getting?

2019.02.18 10:56:33 INFO web[o.s.s.p.d.m.c.OracleCharsetHandler] Verify that database charset is UTF8
2019.02.18 10:56:33 ERROR web[o.s.s.p.Platform] Web server startup failed: Oracle NLS_CHARACTERSET does not support UTF8: WE8MSWIN1252

  • which versions I am using
    I am using version sonarqube-7.6 as a new installation with Oracle DB 11.2.0.4.0, with JDBC Driver ojdbc8.

  • what I am trying to achieve
    New installation following the guidelines - https://docs.sonarqube.org/latest/setup/install-server/

  • what have I tried so far to achieve this
    Configured Oracle DB
    Copied JDBC Driver to the path on the server
    Trying to run the StartSonar.bat

(Michal Duda) #13

Hi Ruben,
SonarQube requires an UTF-8 database charset on Oracle (details here: https://jira.sonarsource.com/browse/SONAR-6171).

(Ruben Vilhena) #14

Hi Michal, we are not in a position to make that change.

Is there any other options?

What about this?
As it’s hard to move a non-UTF8 database to UTF-8, no need to list the reasons here, only fresh installations of SQ 5.5+ must check that UTF-8 requirement is satisfied. Existing installations that upgrade to version 5.5+ are not impacted.

Can I install an older version and then upgrade it?

Thanks,
Ruben

(Michal Duda) #15

I suppose it could work but I definitely don’t recommend it. A much better solution would be to create a dedicated DB with appropriate charset for SonarQube (on any of the supported databases, see here: https://docs.sonarqube.org/latest/requirements/requirements/).

(G Ann Campbell) #16

Hi,

Have you verified that the database charset is UTF8?

 
Ann

(Ruben Vilhena) #17

Hi,

The charset is WE8MSWIN1252.

Thanks,
Ruben

(Ruben Vilhena) #18

Just a quick update. After working on this the entire morning I managed to get the version 7.6 installed on the current DB. I have done the upgrade from 4.5.6 -> 5.6.7->6.7.6->7.6.

I can’t say it’s been the most straight forward but I managed to do it. Will now load a project so the team can start using it.

Thanks Michal and Ann for the help provided.

2 Likes
(G Ann Campbell) #19

Congratulations! I know this took patience and perseverance. You’ll find it was worth the effort!

 
Ann

3 Likes