Upgrading SonarQube 7.1 to 7.9.3 fail in Production

Hello,

Im tryinig to upgrade from 7.1 to 7.9
OS- Ubuntu 16.04
I did check all the prerequisites to have my latest version running but still it is failing for some reason and i’m unable to find it

ERROR:- Upgrade Failed, Database Connection cannot be established. Please check database status and JDBC settings.

I cloned my production server and made TEST environment, upgraded test from 7.1 to 7.9.3
following the exact same steps in Poduction server but the i get above error & my postgres is eating disk space, On the other hand test environment which was cloned from Prodcution before upgrade is working fine now on 7.9.3

sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096
updated tis file /etc/sysctl.d/99-sonarqube.conf

sonarqube - nofile 65536
sonarqube - nproc 4096
I have set sonar.sh as RUN_AS_USER=sonar, i tried running this script from user “sonar” and from user “root”… My old version 7.1 runs perfectly even if i run the script with the users “root”

Ownership of all the files of sonarqube7.9.3 are set to sonar:sonar

changes are already done to sonar.properties as similar as old sonar.properties and wrapper.conf

This is installed
openjdk version “11.0.5” 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-2ubuntu116.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-2ubuntu116.04, mixed mode, sharing)