After Jenkins upgrade 2.289.3 to 2.319.3. We could see after upgrade the Jenkins automation service is not running. Existing java version: java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64.
and in Jenkins portal we could see it is saying it doesn’t looks like JDK directory. !
Can someone suggest us on this issue we are unable to start the Jenkins automation service.
we tried to fix the issue, but it did not work. We tried many things to restart the Jenkins service, but it is not getting started. Below are our findings.
Current status of Jenkins service:
Steps followed in brief:
Modified the parameter value ‘’ to false. After restarting VM and restarting Jenkins UI, the parameter change reflected in UI.
But the Jenkins service status is shown as failed, it is not running. Restarting the service is not working.
When we tried to reinstall java version, there is a newer patch release found. Existing java version: java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64 Newer patch found: 1.11.0.14.1.1-1.e17_9 We didn’t proceed further with upgrading java version.
Checking further under existing java versions, we found that as per below screenshot ‘+ & * are pointing to two different java versions’. So we didn’t proceed further with upgrading java version.
Final update/confirmation required: We need confirmation on proceeding further with installation of newer java patch. We also need help to get the existing/new java version pointed to a single entry [Currently ‘+ and * are pointing to two different java versions’]
Yes , we are able to access Jenkins UI. But Jenkins service is not in active state
While testing the build, getting below error.
Log:
The JAVA_HOME environment variable is not defined correctly 09:41:42 This environment variable is needed to run this program 09:41:42 NB: JAVA_HOME should point to a JDK not a JRE 09:41:42 make: *** [xbiz-mail_service_api-srv-java] Error 1
log from Linux VM:
jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-03-25 04:24:35 UTC; 1 day 1h ago
Docs: man:systemd-sysv-generator(8)
Process: 4160 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
CGroup: /system.slice/jenkins.service
├─1160 runuser -s /bin/bash jenkins -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/lib/jvm/java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64/bin/java -Djava…
├─1181 bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/lib/jvm/java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64/bin/java -Djava.awt.headless=true -Dhud…
└─1183 /usr/lib/jvm/java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64/bin/java -Djava.awt.headless=true -Dhudson.security.csrf.GlobalCrumbIssuerConfig…
Starting LSB: Jenkins Automation Server…
pam_unix(runuser:session): session opened for user jenkins by (uid=0)
pam_unix(runuser:session): session closed for user jenkins
jenkins.service: control process exited, code=exited status=1
Starting Jenkins [FAILED]
Failed to start LSB: Jenkins Automation Server.
Unit jenkins.service entered failed state.
jenkins.service failed.
I’m sorry I’m not comfortable hand holding you on this part. I showed you the problem, and pointed to some docs, but I don’t want to be responsible nor liable for actions on your server. There should be lots of tutorials on how to properly setup jdk on your server.
After upgrading the new Patch version of java, still builds are not successful and find the below error log.
Please prioritize this issue as we are unable to proceed with deployments to production.
12:35:15 print $2 }’ mta.yaml
12:35:15 + mtaName=xbiz-mail_service_api
12:35:15 + mbt build --platform=cf
12:35:15 [2022-03-29 07:05:15] INFO Cloud MTA Build Tool version 1.0.12
12:35:15 [2022-03-29 07:05:15] INFO generating the “Makefile_20220329070515.mta” file…
12:35:15 [2022-03-29 07:05:15] INFO done
12:35:15 [2022-03-29 07:05:15] INFO executing the “make -f Makefile_20220329070515.mta p=cf mtar= strict=true mode=” command…
12:35:15 [2022-03-29 07:05:15] INFO validating the MTA project
12:35:15 [2022-03-29 07:05:15] INFO validating the MTA project
12:35:15 [2022-03-29 07:05:15] INFO building the “xbiz-mail_service_api-srv-java” module…
12:35:15 [2022-03-29 07:05:15] INFO executing the “mvn clean package -DskipTests=true” command… 12:35:15 The JAVA_HOME environment variable is not defined correctly 12:35:15 This environment variable is needed to run this program 12:35:15 NB: JAVA_HOME should point to a JDK not a JRE 12:35:15 [2022-03-29 07:05:15] ERROR could not build the “xbiz-mail_service_api-srv-java” module: could not execute the “mvn clean package -DskipTests=true” command: exit status 1
12:35:15 Error: could not build the MTA project: could not execute the “make -f Makefile_20220329070515.mta p=cf mtar= strict=true mode=” command: exit status 2
12:35:15 Build step ‘Execute shell’ marked build as failure
12:35:16 Archiving artifacts
12:35:16 Finished: FAILURE
And also please let us know ,how to correct the java that both *+ should point to latest patch version of java.