Error when I add jdbc env variables through sonar.properties

It was working fine with the H2 db but when I add sonar.properties it fails.
sonar.jdbc.username=sonar
sonar.jdbc.password=toy15awaken
sonar.jdbc.url=jdbc:postgresql://xxxxxx.xxxxxxxxxx.us-east-1.rds.amazonaws.com:5432/sonar_db

Logs:

Jul 28, 2021 @ 20:08:46.216	2021/07/28 14:38:46 [error] 21#21: *9 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.52.66, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:08:46.216	2021/07/28 14:38:46 [error] 21#21: *11 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.51.229, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:08:46.000	[0237f6d078c1] 172.30.51.229 172.30.1.25:9004 - [28/Jul/2021:14:38:46 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.039 3.040	
Jul 28, 2021 @ 20:08:46.000	[0237f6d078c1] 172.30.52.66 172.30.1.25:9004 - [28/Jul/2021:14:38:46 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.056 3.056	
Jul 28, 2021 @ 20:08:16.232	2021/07/28 14:38:16 [error] 21#21: *5 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.52.66, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:08:16.232	2021/07/28 14:38:16 [error] 21#21: *7 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.51.229, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:08:16.000	[0237f6d078c1] 172.30.51.229 172.30.1.25:9004 - [28/Jul/2021:14:38:16 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.058 3.060	
Jul 28, 2021 @ 20:08:16.000	[0237f6d078c1] 172.30.52.66 172.30.1.25:9004 - [28/Jul/2021:14:38:16 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.074 3.076	
Jul 28, 2021 @ 20:07:46.216	2021/07/28 14:37:46 [error] 21#21: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.52.66, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:07:46.216	2021/07/28 14:37:46 [error] 21#21: *3 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.51.229, server: sonarqube-dev.bytemark.co, request: "GET / HTTP/1.1", upstream: "http://172.17.0.19:9000/", host: "172.30.1.25:9004"	
Jul 28, 2021 @ 20:07:46.000	[0237f6d078c1] 172.30.52.66 172.30.1.25:9004 - [28/Jul/2021:14:37:46 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.051 3.052	
Jul 28, 2021 @ 20:07:46.000	[0237f6d078c1] 172.30.51.229 172.30.1.25:9004 - [28/Jul/2021:14:37:46 +0000] HTTP/1.1 "GET" "/" 502 150 "-" "ELB-HealthChecker/2.0" - 3.035 3.036	
Jul 28, 2021 @ 20:07:24.222	2021/07/28 14:37:24 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/nginx.conf:73	
Jul 28, 2021 @ 20:07:24.222	nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/nginx.conf:73	
Jul 28, 2021 @ 20:07:24.210	/docker-entrypoint.sh: Configuration complete; ready for start up	
Jul 28, 2021 @ 20:07:24.209	/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh	
Jul 28, 2021 @ 20:07:24.203	/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh	
Jul 28, 2021 @ 20:07:24.203	10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist	
Jul 28, 2021 @ 20:07:24.200	/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh	
Jul 28, 2021 @ 20:07:24.194	/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration	
Jul 28, 2021 @ 20:07:24.194	/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/	
Jul 28, 2021 @ 20:07:23.578	2021.07.28 14:37:23 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped	
Jul 28, 2021 @ 20:07:23.554	2021.07.28 14:37:23 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running	
Jul 28, 2021 @ 20:07:23.553	2021.07.28 14:37:23 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1

Hi,

What do your server logs say?

 
Ann

Hi @ganncamp
Server logs:
[ec2-user@ip-172-30-1-97 ~]$ docker logs d12331e05377

2021.07.29 09:03:08 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp

2021.07.29 09:03:08 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:42311]

2021.07.29 09:03:08 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch

could not find java in ES_JAVA_HOME at /opt/java/openjdk/bin/java

2021.07.29 09:03:08 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

2021.07.29 09:03:08 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1

2021.07.29 09:03:08 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped

2021.07.29 09:03:08 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Hi,

Maybe check the other logs? web.log in particular?

 
Ann

I can see only this much

2021-07-29 10:18:28.350Z nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /etc/nginx/nginx.conf:73
2021-07-29 10:19:20.086Z [466be88e7f85] 172.30.51.229 172.30.1.110:9004 - [29/Jul/2021:10:19:20 +0000] HTTP/1.1 “GET” “/” 502 150 “-” “ELB-HealthChecker/2.0” - 3.054 3.056

Requesting Live Tail access…
INCLUDE /sonarqube-alpha/
Access granted. Opening connection…
Connected. Tailing…
2021-08-03 07:25:16.559Z 2021/08/03 07:25:16 [error] 23#23: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.51.229, server: sonarqube-dev.bytemark.co, request: “GET / HTTP/1.1”, upstream: “http://172.17.0.5:9000/”, host: “172.30.1.150:9004”
2021-08-03 08:25:29.114Z 2021/08/03 08:25:29 [error] 22#22: *19 connect() failed (113: No route to host) while connecting to upstream, client: 172.30.52.66, server: sonarqube-dev.bytemark.co, request: “GET / HTTP/1.1”, upstream: “http://172.17.0.23:9000/”, host: “172.30.1.242:9004”
2021-08-03 08:26:11.959Z 2021.08.03 08:26:11 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:42977]
2021-08-03 08:26:12.400Z 2021.08.03 08:26:12 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
2021-08-03 08:26:12.306Z could not find java in ES_JAVA_HOME at /opt/java/openjdk/bin/java
2021-08-03 08:26:12.321Z 2021.08.03 08:26:12 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2021-08-03 07:24:59.160Z 2021.08.03 07:24:59 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1