We are using sonar CE 7.9.2 . What do we need to consider when we move from one server to another.
Anyone with this experience that can share?
//mike
We are using sonar CE 7.9.2 . What do we need to consider when we move from one server to another.
Anyone with this experience that can share?
//mike
Hi Mike,
Assuming your DB is staying in the same place, just treat this like a normal upgrade. 'Cause FYI, 7.9.3 has been released and I know you’ll want to make that bump.
HTH,
Ann
Hi,
I ended up skipping old db but it seems a lot of things changed in 7.9.3 (CE) that we selected.
This required us to change a lot of things when running on RH 7.8.
I manged all the changes and sonar starts as it should:
-> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2020.08.20 10:58:16 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2020.08.20 10:58:16 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.08.20 10:58:16 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2020.08.20 10:58:16 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2020.08.20 10:58:16 INFO app[][o.e.p.PluginsService] no modules loaded
2020.08.20 10:58:16 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2020.08.20 10:58:26 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2020.08.20 10:58:26 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.7.10-4.el7_8.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --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 -Xmx2048m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Duser.timezone=Europe/Stockholm -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process7108797233090898440properties
2020.08.20 10:58:55 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
2020.08.20 10:58:55 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.7.10-4.el7_8.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --add-opens=java.base/java.util=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Duser.timezone=Europe/Stockholm -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process9672725421193679723properties
2020.08.20 10:59:00 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
2020.08.20 10:59:00 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
And here is the end of the web.log.
2020.08.20 10:58:51 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule/activeRule] ...
2020.08.20 10:58:52 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule/activeRule] done | time=983ms
2020.08.20 10:58:52 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [rules/rule],[rules/rule/ruleExtension] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [rules/rule],[rules/rule/ruleExtension] done | time=3126ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [users/user] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [users/user] done | time=100ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [components/auth/component] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [components/auth/component] done | time=83ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [views/view] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [views/view] done | time=94ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [issues/auth/issue] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [issues/auth/issue] done | time=79ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [components/auth],[projectmeasures/auth],[issues/auth] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [components/auth],[projectmeasures/auth],[issues/auth] done | time=57ms
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [projectmeasures/auth/projectmeasure] ...
2020.08.20 10:58:55 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [projectmeasures/auth/projectmeasure] done | time=94ms
2020.08.20 10:58:55 INFO web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning is enabled.
2020.08.20 10:58:55 INFO web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition
2020.08.20 10:58:55 INFO web[][o.s.s.p.Platform] WebServer is operational
2020.08.20 10:58:56 INFO web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning will be disabled
I am trying to access the host with ip address:
http://:8080/sonar in firefox I get
The connection has timed out
The server at 10.86.65.117 is taking too long to respond.
I also tried:
curl -v http://10.86.65.117:8080/sonar
GET /sonar HTTP/1.1
User-Agent: curl/7.29.0
Host: 10.86.65.117:8080
Accept: /
< HTTP/1.1 302
< Location: /sonar/
< Transfer-Encoding: chunked
< Date: Thu, 20 Aug 2020 13:27:33 GMT
But no output.
Any ideas?
br,
//mike
If I used ( note the extra slash at the end):
curl -v http://:8080/sonar/
I get a html page. I am only showing end of it:
window.serverStatus = 'UP';
window.instance = 'SonarQube';
window.official = true;</script><script type="module" src="/sonar/js/vendors-main.m.d184ed05.chunk.js"></script><script nomodule src="/sonar/js/vendors-main.1585038696837.chunk.js"></script><script type="module" src="/sonar/js/main.m.1e78ef08.js"></script><script nomodule src="/sonar/js/main.1585038696837.js"></script></body></html>
Now I try this in firefox on the host with sonar installed.
http://:8080/sonar/
Then I get connection timeout.
There is no proxy.
Hi,
To be clear, you updated $SONARQUBE-HOME/conf/sonar.properties
to change:
/
default to /sonar/
?
Ann
Hi Ann,
These are my settings in properties.
# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
#sonar.web.host=10.86.65.117
sonar.web.host=0.0.0.0
# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
sonar.web.context=/sonar
# TCP port for incoming HTTP connections. Default value is 9000.
sonar.web.port=8080
#sonar.web.port=9000
And when I try:
http://<myip>:8080/sonar/
in curl I get a page but not in firefox.
br,
//mike
We are using Postgresql and use the following setting in properties.
sonar.jdbc.url=jdbc:postgresql://127.0.0.1:5432/sonarqubedb
changed:
sonar.jdbc.url=jdbc:postgresql://127.0.0.1:5432/sonarqubedb
to:
sonar.jdbc.url=jdbc:postgresql:/localhost/sonarqubedb
Now I get the following in web.log and it is not starting.
ERROR: relation “schema_migrations” does not exist
I checked schemas and it only contains “public”
What should I do?
Hi,
At this point it seems that you’re not correctly connected to your database. You need to troubleshoot your JDBC settings and get that sorted out.
Ann