title: Monit process failed to start
body: <p>I'm trying to use Monit to watch a Thin Rails application server process.  Here is my Monit config:</p>
  
  <pre><code>check process thin-3000
    with pidfile /var/www/apps/myapp/shared/pids/thin.3000.pid
    start program = "/bin/su - deploy -c 'thin start -C /etc/thin/myapp.yml -o 3000'"
    stop program = "/bin/su - deploy -c 'thin stop -C /etc/thin/myapp.yml -o 3000'"
    if failed port 3000 then restart
    group thin
  </code></pre>
  
  <p><strong>This actually works.</strong>  If I kill the Thin server process, Monit will faithfully restart it.  However, if I watch the Monit log it keeps outputting the following over and over again:</p>
  
  <pre><code>[UTC Jan 14 23:01:04] error    : 'thin-3000' process is not running
  [UTC Jan 14 23:01:04] info     : 'thin-3000' trying to restart
  [UTC Jan 14 23:01:04] info     : 'thin-3000' start: /bin/su
  [UTC Jan 14 23:01:34] error    : 'thin-3000' failed to start
  </code></pre>
  
  <p>It looks like whatever mechanism it's using to check if the process is running isn't working correctly.  Do you know what I might be doing wrong?</p>