Launchd with keepalive is restarting already running daemon

I'm trying to start the Nagios nrpe daemon via launchd and want to use the keepalive feature. However, as soon as I load the plist with launchctl, launchd keeps starting the daemon every 10 seconds although it is already running.
Here's the .plist I'm using:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.nagios.nrpe</string>
<key>UserName</key>
<string>nagios</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/nrpe</string>
<string>-c</string>
<string>/etc/nagios/nrpe.cfg</string>
<string>-d</string>
</array>
</dict>
</plist>
And this is from the system.log:
12:37:25 com.apple.launchd[1] (org.nagios.nrpe): Throttling respawn: Will start in 10 seconds
12:37:25 nrpe[1269]: Starting up daemon
12:37:35 com.apple.launchd[1] (org.nagios.nrpe): Throttling respawn: Will start in 10 seconds
12:37:35 nrpe[1272]: Starting up daemon
12:37:35 nrpe[1272]: There's already an NRPE server running (PID 1269). Bailing out...
Any ideas?

I've struggled a bit with getting this running on 10.5.5 server but this is what I found.
Using the "-d" argument to run nrpe as a standalone daemon may be causing the respawn. I would suggest changing that to "-i" which is to run it as a service under inetd or xinetd. This seems to be working even though it is really running under launchd. Attempting to run it with no argument does not allow connections, it may not even be starting.
I also could not get the nagios server (debian) to talk to the OS X server. It kept giving me the following error:
CHECK_NRPE: Error - Could not complete SSL handshake.
I added the -n argument to tell it to not use SSL, and it now works. This is what the plist looks like:
<dict>
        <key>KeepAlive</key>
        <dict>
                <key>NetworkState</key>
                <true/>
        </dict>
        <key>Label</key>
        <string>org.nagios.nrpe;/string>
        <key>Program</key>
        <string>/usr/local/nagios/bin/nrpe</string>
        <key>ProgramArguments</key>
        <array>
                <string>-n</string>
                <string>-c</string>
                <string>/usr/local/nagios/etc/nrpe.cfg;/string>
                <string>-i</string>
        </array>
        <key>Sockets</key>
        <dict>
                <key>Listeners</key>
                <dict>
                        <key>SockServiceName</key>
                        <string>5666</string>
                        <key>SockType</key>
                        <string>stream</string>
                        <key>SockFamily</key>
                        <string>IPv4</string>
                </dict>
        </dict>
        <key>UserName</key>
        <string>nagios</string>
        <key>GroupName</key>
        <string>nagios</string>
        <key>inetdCompatibility</key>
        <dict>
                <key>Wait</key>
                <false/>
        </dict>
</dict>
</plist>
If you want to check whether the nrpe application is running and listening you can telnet to the machine on port 5666. If it just drops the connection, something is not right. If it leaves the connection open once connected you should be good.
Disclaimer: Running nrpe without SSL sends all of your data unencrypted. Depending on your environment, and the data moving back and forth, you should approach this carefully.
Hope that helps.

Similar Messages

  • Installing Oracle 9iDS on Solaris 8 with Oracle 9i DB already running

    Current setup is some what like this. We have SunV440 Server and have Oracle 9i Database running on it. To install 9i DB we have created a user Oracle on OS Solaris8. Now we would like to install Oracle 9iDS (Developer Suite) and configure its Separate ORACLE_HOME directory, as 9iDS won't letus have it configured in the exisiting HOME. It is known that I have to stop all Oracle services and process, should I also stop listner that is running.
    Please help me in detail steps involved and also if some OS files needs to be updated
    Thanks in anticipation for help

    Hello Chessplayer!
    Before you attempt the Oracle install, make sure you have done the following as the Oracle CD does nothing but put down the Oracle binaries:
    1. Create /opt/app/oracle
    2. Put a .profile in /opt/app/oracle sourcing your Oracle_Home and Oracle_Sid.
    3. Create file systems (volumes) where database datafiles will go. If you are working
    with a single disk, /vol01 is sufficient. However, you may want to create others to simulate
    multiple disks and the concept of "spreading" your load ie. data from index.
    4. You may also want to create a /dumps file system for oracle dump files.
    Have fun.
    TAS

  • When i go to sign on it says firefox is already running, but is not responding and to close exisiting FF process or restart system. Have used FF for years with no problems?

    I have been using FF to acess the web for years but recently (within the last few days) I get the above message. I have deleted the ff I was using and downloaded the 3.6 again but continue to get the same message

    Hopefully this support article is what you need:
    https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding

  • Firefox is OPEN and working fine, but when I click a link in Thunderbird I get 'Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.'

    If I click a link on my desktop or in any other program (while Firefox is open and running), I get this message: "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." There's about a billion links for this if you Google it, but they all say that Firefox wasn't shut down properly. (OK, maybe not ALL of them, but if the needle is in that haystack, I haven't yet found it.) That's not the issue in my case since I haven't shut FF down at all.
    == This happened ==
    Every time Firefox opened
    == IDK

    This began to happen to me when I tried to run two separate profiles simultaneously on the same installation of firefox with -no-remote

  • When I close Firefox and then try to open it, it says it is already running and I have to close it which I can't do. The only way to open it is to first restart my computer which is a pain. If I can't fix this I will use an other brouser!

    I am not sure what more I can tell you. I close firefox. So when I click on the icon it should allow me to open it again but I get a message that says it is already running. Either close it out which I can't do since I already did that or restart the computer.

    Try holding control, alt and delete down in succession and then a dialogue box will appear with windows task manager. Once open click on the Processes Tab and look for firefox.exe. Highlight this and then click end process. It should come up with a warning but just click Yes. This should then close firefox and allow you to reopen it from your desktop without shutting down your computer. Hope this helps.

  • I try to launch firefox get the following message "firefox is already running, but is not resonding. to open a new window, you must first close the existing firefox process, or restart your system" firefox is not running and restart doesn't work

    when I launch firefox get the following message "firefox is already running, but is not resonding. to open a new window, you must first close the existing firefox process, or restart your system" firefox not running and a restart doesn't solve the problem

    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 12.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you will also lose your personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    See also:
    *https://support.mozilla.org/kb/Firefox+is+already+running+but+is+not+responding
    *http://kb.mozillazine.org/Profile_in_use
    *http://kb.mozillazine.org/Recovering_a_missing_profile

  • Fire fox will not open and give the message that program is already running when it is not and i have to restart my computer. i am running windows xp and this problem started after the last up date. i have tried uninstalling and reinstalling the program

    is this a known issue?

    If you close Firefox properly the problem will practically disappear.
    To close Firefox properly:
    :<b>Closing Firefox</b> ''(#close_firefox)'', avoid getting <b>Firefox already running</b> messages:&nbsp; To properly shutdown Firefox when multiple windows or closing the
    last window use File → Exit/Quit (or Firefox button → Exit).&nbsp; Closing Firefox with the [X] in the upper right corner closes the window ("Ctrl+W") but that does not necessarily close Firefox if it has subtasks running.&nbsp; If you want to close and reopen Firefox use the "Restart" within Add-ons if you made a change requiring a restart, or install "[https://addons.mozilla.org/en-US/firefox/addon/restartless-restart/ Restartless Restart]" ("Ctrl+Alt+R") which will allow you to take Firefox down and restart without having to check the Windows Task Manager to see if Firefox first actually ended. ([http://kb.mozillazine.org/Firefox_hangs Firefox hangs])
    In checking the Windows Task Manager be sure to check the "Process" tab not the "Application"tab/

  • When I close Firefox and then come back to it layer a box comes up that says it's already running. It ays to close Firefox first but when I hit close nothing happens and the box comes up again. I have to shut down my computer and restart to get into Firef

    When I close Firefox and then come back to it later a box comes up that says it's already running. It says to close Firefox first but when I hit close nothing happens and the box comes up again. I have to shut down my computer and restart to get into Firefox again. If I can't get this fixed I will start using someone else. Someone told me a way to close Firefox but I forgot what they said.
    == This happened ==
    Every time Firefox opened
    == a couple of months ago

    Hello Brian.
    You don't need to restart your computer to open Firefox again: you just need to close it manually through your application manager (CTRL+SHIFT+ESC in Processes tab). Anyway, hopefully this support article is what you need:
    http://support.mozilla.com/en-US/kb/Firefox+hangs
    What's probably happening is that you may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • When I try to start Firefox I get Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

    I get this message when I try to start Firefox after first logging on after turning on the computer.
    Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
    Have rebooted. Works when Administrator logs in, just does this in my user profile. Have also re-intalled. Mo change in my User account.
    Firefox was working fine for the last 3 1/2 years. Any suggestions?

    Firefox is "hanging at exit" when you exit/quit Firefox.<br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I getthe message Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. It is NOT open I onlly have one computer

    I installed FF on my new computer, Windows 7 Toshiba, I get the message''' Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system'''. It is NOT open I only have one computer.
    I had a computer expert try everything and we cannot get it to open.

    Look for the firefox process firefox.exe and kill it with for instance task manager. it is also worth watching for plugincontainer.exe.
    The problem and solutions are explained in the articles:
    * [[firefox is already running but is not responding]]
    *[[firefox hangs]]

  • I get a message that says ff is already running but is not responding ,to open a new window, you must close the existing ff process or restart your system, how do i close the existing ff process?

    I have windows 7 on dell laptop. I am working on a Word Document and want to go to a diff window for some information. I click on the FF icon on my desktop and get a message that says...FF is already running but is not responding. To open a new window, you must close the existing ff process or restart your system..how do you close the existing ff process?
    == This happened ==
    Every time Firefox opened
    == I got my new dell laptop four weeks ago with window 7 installed

    See https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding

  • When I start mozilla firefox web browser, sometimes I see a message saying that "a Mozilla Firefox is already running, please close it or restart your program", while I don't have one running at that time. What is the problem?

    When I start mozilla firefox web browser, sometimes I see a message saying that "a Mozilla Firefox is already running, please close it or restart your system". As a matter of fact, there is no firefox browser running at that time. Since I cannot do anything about it, I have to restart my computer before I can use the web browser, which bothers me dearly. What is the problem?

    Plug-in and tasks started by Firefox may continue after attempting to close Firefox. The "X" in the upper right-hand corner closes the Window (same as Ctrl+Shift+W) but even if it is the last Firefox window, it does not necessarily close Firefox .
    '''The only proper way to exit Firefox is to use Exit through the File menu''', not the "X" in the upper right corner of last Firefox window.
    ''Menus hidden: then use Alt+F then X.''
    '''Firefox hangs''' | Troubleshooting | Firefox Support ''(some extensions cause a problem)''
    * http://support.mozilla.com/kb/Firefox%20hangs#w_hang-at-exit
    Use the '''Windows Task Manger''' to remove all running firefox.exe in the "Processes"
    tab of the Windows Task Manager, then restart Firefox.
    "'''Restartless Restart'''" extension for Firefox 4.0 only (2 KB download )
    * https://addons.mozilla.org/firefox/addon/249342/
    use to close and restart Firefox after enabling or disabling an extension, switching
    to a new theme, or modifying configuration files, then you don't have to worry
    about delay or have to look in the Task Manager to see if Firefox is closed yet.
    Uses keyboard shortcut "'''Ctrl+Alt+R'''" or a file menu option.
    '''Windows 7''' users can use '''Ctrl+Shift+Esc''' to get to the Windows Task Manager quicker than starting with Ctrl+Alt+Del.

  • Firefox is already running but not responding,No process in task manager,Restart and uninstall not useful.Profile manager error

    So one day when I opened my mozilla firefox Ive got the "Firefox is already running but not responding.To open a new window,you must first close the existing firefox process,or restart your system."
    So I checked my task manager but there is no process,I then checked hours in the internet to find a solution.Yes,I also checked for solutions in this site.Then,I try uninstalling and restarting,it also didn't work,Next I also tried downloading profilemanager and tried to run it but as unlucky as I can be,it also didn't work. Please help :(

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • "FF is already running, but is not responding. To open a new window, you must first close existing FF, or restart your system. So have to use Int Exp Would like to talk about this, but always get the results that support is closed

    I prefer using Firefox, and do all the time. However, this used to happen occasionally, then go away. Now it is happening all the time.
    If I try to enter aol email, I receive the message: "Firefox is already running, but is not responding. To open a new window, you must first close the existing FF process, or restart your system.
    And I can find no way to close it when that happens.
    Would really like to have this solved. Do not believe it is a computer or internet problem - just had my computer repaired because of a faulty disc drive. It is a three year old Dell, with Windows XP

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    *https://support.mozilla.com/kb/Firefox+hangs
    * http://kb.mozillazine.org/Profile_in_use
    * https://support.mozilla.com/kb/Firefox+is+already+running+but+is+not+responding

  • When I close Firefox then try to open it again, it informs me it is already running and continues to do so regardless of how many times I restart the computer.

    I bought a new computer. I installed Firefox 7.0 then updated to 8.0. When I was finished with Firefox, I closed it. Later when I attempted to open it I was greeted with the message Firefox is already running. It suggested I restart the computer. I did so and continued to receive the same message. Surely, shutting the computer off should close Firefox. I have to use Internet Explorer to contact you.

    Sounds like Firefox is "hanging at exit". That problem is frequently caused by an Extension or a Plugin. Read all of the following articles.<br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

Maybe you are looking for

  • IerUpgrade from 10gAS(9.0.4) to 10gASR2(10.1.2.0.2)

    Hi, I am upgrading from Upgrade from 10gAS(9.0.4) to 10gASR2(10.1.2.0.2), the infra database version is 9.0.1.5.0, my question is do I need to first upgrade the database to 10g and then the middle tier or the other way. Architecture Server 1 - Infras

  • Converting to GPT

    Hello, In a couple of days I'm going to upgrade my computer/motherboard to one with UEFI, and I thought I'd start with the preparations right now. I've think I've read up on most of it, but I'd like to make sure before I begin tinkering. - I'd like t

  • Merge all XSL files

    I am using XSL/JSP to design the Application Form. Now I want to split header, sidebar, footer and app form into 4 XSL files, only app form will receive dynamic data from XML, the rest are static pages. One way I can think of is using 5 JSPs to proce

  • Why won't my movies download into iMovie?

    Is there someone who can help me with iMovie? I have in the past downloaded my movies from my Canon Legria FS21 movie camera.  Now I went to download the movies and they won't. I asked some Chinese people at the local Apple Shop, but their English is

  • Maps isn't working correctly

    I open my maps but I cannot see roads, the only thing i see is a beige screen with an exclemation mark that is my location, more or less. I can't find ANYTHING nearby. What can I do to be able to see roads and find stores, etc, nearby? I work on a pr