SonarQube 5.1.1 and Oracle XE - oracle

Hello I'm trying to install SonarQube 5.1.1 with Oracle XE 11g DB.
I've performed the requirements steps:
Create the database user with
CREATE USER sonar IDENTIFIED BY sonar;
GRANT UNLIMITED TABLESPACE, CONNECT, RESOURCE, CREATE SESSION, CREATE TABLE, CREATE VIEW, CREATE SYNONYM, CREATE SEQUENCE, CREATE PROCEDURE, CREATE TRIGGER TO sonar;
EXIT
Download ojdbc6.jar from Oracle's download site and place it in /opt/sonarqube-5.1.1/extensions/jdbc-driver/oracle
Change the conf\sonar.properties as follow:
comment out:
sonar.jdbc.url: jdbc:derby://localhost:1527/sonar;create=true
remove comment from:
sonar.jdbc.url: jdbc:oracle:thin:#localhost/XE
sonar.jdbc.driverClassName: oracle.jdbc.OracleDriver
sonar.jdbc.validationQuery: select 1 from dual
Start the SonarQube server with ./sonar.sh start
The console doesn't work.
When I try to launch the console through ./sonar.sh console I get back the following message.
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2015.07.09 10:51:15 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /opt/jdk1.8.0_45/jre/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=/opt/sonarqube-5.1.1/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process5315721777324339581properties
jvm 1 | 2015.07.09 10:51:21 INFO app[o.s.p.m.Monitor] Process[search] is up
jvm 1 | 2015.07.09 10:51:21 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /opt/jdk1.8.0_45/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/opt/sonarqube-5.1.1/temp -cp ./lib/common/*:./lib/server/*:/opt/sonarqube-5.1.1/extensions/jdbc-driver/oracle/ojdbc6.jar org.sonar.server.app.WebServer /tmp/sq-process6137893542254624184properties
jvm 1 | 2015.07.09 10:53:52 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopping
jvm 1 | 2015.07.09 10:53:53 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopped
wrapper | <-- Wrapper Stopped

thanks to #Simon I looked to sonar.log file and I found that the sonar jdbc driver need hostname:port\sid, so I missing the port information. I changed the conf file in that way and now it properly works.

Related

In sonarqube Web page is not displaying

I am working in SonarQube the process is fully running in command prompt but the web page is not displaying. I changed the address and port in the sonar properties but still the web page is not displaying.
If I load webpage it is showing as connection refused.
D:\>cd D:\Development_Avecto\Sonar\sonarqube-6.7\bin\windows-x86-64
D:\Development_Avecto\Sonar\sonarqube-6.7\bin\windows-x86-64>StartSonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018.01.05 17:49:09 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\Development_Avecto\Sonar\sonarqube-6.7\temp
jvm 1 | 2018.01.05 17:49:09 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.01.05 17:49:11 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\Development_Avecto\Sonar\sonarqube-6.7\elasticsearch]: C:\Program Files\Java\jre1.8.0_121\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\Development_Avecto\Sonar\sonarqube-6.7\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=D:\Development_Avecto\Sonar\sonarqube-6.7\temp\conf\es
jvm 1 | 2018.01.05 17:49:11 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.01.05 17:49:13 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.01.05 17:49:13 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2018.01.05 17:49:23 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2018.01.05 17:49:23 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [D:\Development_Avecto\Sonar\sonarqube-6.7]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\Development_Avecto\Sonar\sonarqube-6.7\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;D:\Development_Avecto\Sonar\sonarqube-6.7\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer D:\Development_Avecto\Sonar\sonarqube-6.7\temp\sq-process1476121489817180909properties
jvm 1 | 2018.01.05 17:51:08 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
jvm 1 | 2018.01.05 17:51:08 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [D:\Development_Avecto\Sonar\sonarqube-6.7]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\Development_Avecto\Sonar\sonarqube-6.7\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;./lib/ce/*;D:\Development_Avecto\Sonar\sonarqube-6.7\lib\jdbc\h2\h2-1.3.176.jar org.sonar.ce.app.CeServer D:\Development_Avecto\Sonar\sonarqube-6.7\temp\sq-process446994653925487374properties
jvm 1 | 2018.01.05 17:51:13 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
jvm 1 | 2018.01.05 17:51:13 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
After long search, below solution worked for me.
I have tried disabling proxy and hit the sonar server URL (http://127.0.0.50:9111/). It worked. Since I need proxy setup, i have added my ip and port in the exceptions of proxy.
Thanks everyone who extended help here. :)
Config file entry is
sonar.web.host=127.0.0.50
sonar.web.port=9111

Cannot restart sonar sever after installing sonar-js plugin

cloned sonarjs plugin from github | sonarjs plugin
created jar file via, mvn install command
copied jar file into sonarqube-5.6.6/extensions/plugins/
Now, when trying to start sonar server, it stops with following message:
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2017.11.29 22:17:20 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /home/sd2labs/ mycomputer/sonarqube-5.6.6/temp
jvm 1 | 2017.11.29 22:17:20 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/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=/home/sd2labs/mycomputer/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/search/ org.sonar.search.SearchServer /home/sd2labs/mycomputer/sonarqube-5.6.6/temp/ sq-process8688307264383931251properties
jvm 1 | 2017.11.29 22:17:28 INFO app[o.s.p.m.Monitor] Process[es] is up
jvm 1 | 2017.11.29 22:17:28 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/home/sd2labs/mycomputer/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/server/:/home/sd2labs/mycomputer/sonarqube-5.6.6/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.server.app.WebServer /home/sd2labs/mycomputer/sonarqube-5.6.6/temp/ sq-process1772881744825311451properties
jvm 1 | 2017.11.29 22:17:33 INFO app[o.s.p.m.Monitor] Process[es] is stopping
jvm 1 | 2017.11.29 22:17:34 INFO app[o.s.p.m.Monitor] Process[es] is stopped
wrapper | <-- Wrapper Stopped
What am I doing wrong?
Most probably you have 2 plugin version for SonarJS in your /extensions/plugins/. Remove the one, you don't need (the one provided by default)

getting error while starting sonar using startsonar.bat on AWS ec2 machine

I am new to SonarQube and I am getting following error while starting sonar using startsonar.bat on AWS ec2 windows machine 64 bit
C:\Users\Administrator\Downloads\sonarqube-5.6.7\sonarqube-5.6.7\bin\windows-x86-64>StartSonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2017.10.31 08:03:44 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\Administrator\Downloads\sonarqube-5.6.7\sonarqube-5.6.7\temp
jvm 1 | 2017.10.31 08:03:44 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_151\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=C:\Users\Administrator\Downloads\sonarqube-5.6.7\sonarqube-5.6.7\temp -javaagent:C:\Program Files\Java\jre1.8.0_151\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\Administrator\Downloads\sonarqube-5.6.7\sonarqube-5.6.7\temp\sq-process521585216780009921properties
wrapper | <-- Wrapper Stopped
I have downloaded SonarQube 5.6.7 and then unzipped it and then browsed to bin directory and executing startsonar.bat.

sonarqube install fail on Windows + PostgreSQL

I create a user sonarqube on Postgres.
I create a database sonarqube on Postgres.
I add host sonarqube sonarqube 127.0.0.1/32 md5 in pg_hba.conf
I custom sonar.properties file:
sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
When I start Sonar (sonarqube-6.5\bin\windows-x86-64\StartSonar.bat) I have this logs:
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2017.09.11 11:49:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-6.5\temp
jvm 1 | 2017.09.11 11:49:36 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: C:\Program Files\Java\jre1.8.0_144\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube-6.5\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\sonarqube-6.5\temp\sq-process7757413999425394311properties
jvm 1 | 2017.09.11 11:49:44 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2017.09.11 11:49:44 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[web]: C:\Program Files\Java\jre1.8.0_144\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube-6.5\temp -cp ./lib/common/*;./lib/server/*;C:\sonarqube-6.5\lib\jdbc\postgresql\postgresql-42.1.1.jar org.sonar.server.app.WebServer C:\sonarqube-6.5\temp\sq-process301306345978378097properties
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
I resolve when I change privilege of sonarqube role in my PostgreSQL data base:

I'm trying to install SonarQube 5.1 but when i try to run the server the wrapper stops. I already installed SonarQube as service but it didn't work

I already installed SonarQube as a service, but it immediately stops. So i'm trying to do it by the CMD but the wrapper stops.
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2015.05.07 12:17:44 INFO app[o.s.p.m.JavaProcessLauncher] Launch pro
cess[search]: C:\Program Files\Java\jre7\bin\java -Djava.awt.headless=true -Xmx1
G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseCon
cMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupanc
yOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Sonar\sonarqube-5.1\te
mp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\temp
late\AppData\Local\Temp\sq-process9133461916836706948properties
jvm 1 | 2015.05.07 12:17:55 INFO app[o.s.p.m.Monitor] Process[search] is up
jvm 1 | 2015.05.07 12:17:55 INFO app[o.s.p.m.JavaProcessLauncher] Launch pro
cess[web]: C:\Program Files\Java\jre7\bin\java -Djava.awt.headless=true -Dfile.e
ncoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=fal
se -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.pref
erIPv4Stack=true -Djava.io.tmpdir=C:\Sonar\sonarqube-5.1\temp -cp ./lib/common/*
;./lib/server/*;C:\Sonar\sonarqube-5.1\lib\jdbc\mysql\mysql-connector-java-5.1.3
4.jar org.sonar.server.app.WebServer C:\Users\template\AppData\Local\Temp\sq-pro
cess4736183197170270861properties
jvm 1 | 2015.05.07 12:18:19 INFO app[o.s.p.m.TerminatorThread] Process[searc
h] is stopping
jvm 1 | 2015.05.07 12:18:20 INFO app[o.s.p.m.TerminatorThread] Process[searc
h] is stopped
wrapper | <-- Wrapper Stopped
You might have a problem of rights on the service: http://qualilogy.com/en/migrate-sonarqube-tomcat-to-windows-service/
Hope it helps.

Resources