When run
executes the command provided in the solr:stop
task, it looks like you're not yet running solr, so their is no pid file for solr present. You're trying to stop a process that doesn't exist.
A Capistrano task is going to throw an exception if the code returned from run
is an error code. You can fix this by forcing that command to never return an error.
Make that run
command look like this
run("YOUR COMMAND HERE > /dev/null 2>&1 || true")
Now if you call solr:stop
when solr isn't running, true
will return, letting Capistrano continue on.