Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9019137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:42:15+00:00 2026-06-16T04:42:15+00:00

I am using monit to monitor several process. These process include passenger instances and

  • 0

I am using monit to monitor several process. These process include passenger instances and a daemon I wrote to generate pidfiles for the passenger instance. Monit will start these process no problem. It will not stop them. The following is the Monit config for the daemon:

check process passenger_monitor with pidfile <%= passenger_monitor_pid %>
   group <%= application %>
   start program = "/bin/su - rails_apps -c 'source /home/rails_apps/.rvm/scripts/rvm; /home/rails_apps/passenger_monitor.rb'"
   stop program = "/bin/kill `/bin/cat <%= passenger_monitor_pid %>`"

It is a erb template that is generated via capistrano. If I run the stop command via a terminal as root with a minimal environment then it works, but when I request that Monit stops the process i get the following error:

[ADT Sep 17 10:38:31] error    : 'passenger_monitor' failed to stop

I have tried everything I can think of. I cannot find or generate any logs of the output of the stop command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:42:16+00:00Added an answer on June 16, 2026 at 4:42 am

    I have the same issue when trying to stop a service using

    stop program = "/bin/kill `/bin/cat /var/run/pusher.pid`"
    

    You can turn on the -Iv flag to see the debug output:

    monit -Iv
    

    Or you can manually validate while monit is running in the background:

    monit validate
    

    They both show

    'api-pusher-service' stop: /bin/kill
    kill: can't find process "`/bin/cat"
    kill: can't find process "/var/run/pusher.pid`"
    

    This fixes the problem for me

    stop program = "/bin/bash -c '/bin/kill `/bin/cat /var/run/pusher.pid`'"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using monit on my ec2 instance and I am new to nginx.
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
I have several rails applications deployed by nginx passenger. I want those applications to
I am trying to run delayed_job using monit, but its failing to run as
Using Django, how do I generate the value of a field the first time
We're using God to monitor our server processes, and were wondering if we should
export PATH=${/home/mohit/}:<android-sdk-linux_86>/tools this is what i am using.. error:-- bash: PATH=${/home/mohit/}:: bad substitution this
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.