Service dead but pid file exists on Amazon EC2
<p>I created a service <code>&lt;service-name&gt;</code> and ran it on an Amazon EC2 instance. This comes up bundled as a part of my private AMI. Upon initial startup, the service works well:</p>

<pre><code>$ sudo service &lt;service-name&gt; status
&lt;service-name&gt; (pid 1234) is running...
</code></pre>

<p>But when I reinstall it, the status then changes to</p>

<pre><code>&lt;service-name&gt; dead but pid file exists
</code></pre>

<p>I tried removing these files:</p>

<pre><code>$sudo rm -rf /var/run/service-name/*
$sudo rm -rf /var/lock/subsys/service-name
</code></pre>

<p>Then reinstalled the service. But still the same.</p>