0

I installed Jenkins via homebrew on macOS and used it well, then I updated macOS yesterday.

After restarting Jenkins today, I can't access it from other PCs.

Jenkins changed to listen on localhost:8080

I checked that the httpListenAddress is 0.0.0.0 in the homebrew.mxcl.jenkins-lts.plist .

Looking at Jenkins systemInfo, the following line looks strange.

sun.java.command /usr/local/opt/jenkins-lts/libexec/jenkins.war --httpListenAddress=127.0.0.1 --httpPort=8080

I am wondering where this httpListenAddress parameter came from.

jof4002
  • 23
  • 4
  • I don't know why but I found that /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jenkins-lts.rb recreate /Users//Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist everytime. So I changed the rb and I can conncet from other PC. – jof4002 Jul 14 '21 at 01:33
  • Today I upgrade jenkins, and now homebrew.mxcl.jenkins-lts.plist seems working – jof4002 Jul 29 '21 at 11:34

1 Answers1

1

After updating Jenkins via brew to 2.375.1 on macos 12.6 I could not access Jenkins on any machine in the same network other that the machine its installed in.

The cause, I believe, is the --httpListenAddress parameter being set to 127.0.0.1 instead of 0.0.0.0 that leads Jenkins to listen to requests from all available interfaces.

This post lead me to edit both the /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jenkins-lts.rb and /Users//Library/LaunchAgents/homebrew.mxcl.jenkins-lts.plist, but the latter was always deleted when the brew service was stopped and recreated when it started, having --httpListenAddress the value of 127.0.0.1 again. A while later I found this answer and after doing as it instructs, the mentioned files were created as expected.

prdcs
  • 11
  • 2