Jenkins setup:
Mac OS ventura 13.6.1
jenkins version 2.426.3
homebrew version : 4.3.0
java : openJDK 17.0.11 zulu
hi~,
It is exactly what is written in the title.
I updated Jenkins version from 2.387.1 to 2.426.3,
Originally, when starting/stopping the Jenkins service, the following command was used.
“brew services start/stop jenkins-lts”
However, after updating the version,
It looks like it’s starting, but
If you check with the “brew services list” command, you can see the status of the Jenkins service.
The status is error 256.
The strange thing is,
When I manually open a terminal window and run the following, Jenkins start normally.
Actually, I don’t know exactly what happened.
It happened after trying several things.
Anyway, I’ll share the current working status.
rm -rf /Users/XXX/Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist ,
The .plist file here will be automatically created later when you run ‘brew services start jenkins-lts’
(The version name at the end will be different for each person.)
Check files “jenkins-lts” and “jeknins-lts-cli” of /usr/local/Cellar/jenkins-lts/2.452.3/bin , Check the path to JAVA_HOME in these files.
and see a following path, /usr/local/Cellar/jenkins-lts/2.452.3
Modify the following two files in this path as follows:
homebrew.jenkins-lts.service
[Unit]
Description=Homebrew generated unit for jenkins-lts
[Install]
WantedBy=default.target
[Service]
Type=simple
ExecStart=/usr/local/opt/openjdk@21/bin/java -Dmail.smtp.starttls.enable\=true -jar /usr/local/opt/jenkins-lts/libexec/jenkins.war --httpListenAddress\=0.0.0.0 --httpPort\=8080
Anyway, the important thing is to match the JAVA_HOME path with the paths in the homebrew.jenkins-lts.service and homebrew.mxcl.jenkins-lts.plist files.
Also, check carefully whether the version set as the JAVA_HOME path in the jenkins-lts file (in my case, openjdk 21) is actually installed.