Issue
I am trying to install/run jenkins on a mac machine using homebrew. This is what I did
brew install jenkins-lts
On running this command. I see that jenkins-lts is installed and I see this messageNote: When using launchctl the port will be 8080.
To have launchd start jenkins-lts now and restart at login:
brew services start jenkins-lts.
Or, if you don't want/need a background service you can just run:
jenkins-ltsIf I run
jenkins-lts
, Jenkins starts at port 8080 successfully. I can reach it from the browser.If I run
brew services start jenkins-lts
. I see the message Successfully startedjenkins-lts
(label:homebrew.mxcl.jenkins-lts)But I cannot reach the server on port 8080. I tried checking the status of the service
I tried checking the status of the service
brew services list
Name Status User Plist jenkins-lts unknown ec2-user /Users/ec2-user/Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist
I see that status is unknown.
After a while I see that this service is not listed anymore in the
brew services list
command. If I try to start it again. I see this message/Users/ec2-user/Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist: service already loaded Error: Failure while executing;
/bin/launchctl bootstrap gui/501 /Users/ec2-user/Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist
exited with 37
Where can I find the jenkins logs and how to get it working.
Solution
The issue here is that, macos was running as a dedicated host on AWS.
I was connected to this macos from my windows machine using putty and trying to run the command.
brew services start jenkins-lts
This does not work. I had to login to macos via some Remote Desktop client like VNC and then run the same command from the the terminal window of mac.
In some cases, there will be a pop up which you needs user input. Hence this did not work when I was connected via putty from my windows machine.
Answered By - pvpkiran