8

I have Jenkins running on my computer and occupying port 8080.

enter image description here

I'm unable to kill it.

Something like ps -9 PID would kill the process, but Jenkins will restart with a different PID.

I thought maybe when Jenkins was started, there was also a user "jenkins" created. I searched for that user in "System Preferences > Users & Groups" but I couldn't find it.

Any idea how I can terminate Jenkins? Maybe I need to delete the user "jenkins" ?

  • 1
    Yup, it made the HNQ. Nice title! – OldBunny2800 Feb 11 '17 at 20:19
11

Launch daemons

On macOS, Jenkins runs as a launch daemon, or simply daemon, which is just a fancy name for a specific way to have a program run in the background. According to Apple’s developer reference, a daemon on macOS is:

[...] a program that runs in the background as part of the overall system (that is, it is not tied to a particular user).

Launch daemons are associated with a macOS-internal process called launchd, which runs all the time. One of launchd’s various responsibilities is to (re-)launch a daemon whenever it deems it necessary. This also explains the behavior you described that Jenkins seems to respawn on its own after it is forcibly sent the KILL signal.

Stopping and uninstalling Jenkins

There is more than one way to stop a running Jenkins instance. As per the original documentation of the Jenkins installer for macOS, the following steps are the recommended way to terminate a Jenkins instance on macOS:

  1. Open Terminal.app (you did that already; if not, type terminal into a Spotlight search field and hit Enter)

  2. If you want to stop Jenkins only once, run the following command:

    sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
    
  3. If you would rather uninstall Jenkins altogether, also run the following command (including the single quotes):

    '/Library/Application Support/Jenkins/Uninstall.command'
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .