Question

I try to stop solr server on Heroku (already have the Websolr $20 addon installed) but I'm not being able to do so.

$ heroku run rake sunspot:solr:stop
Running `rake sunspot:solr:stop` attached to terminal... up, run.1
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
rake aborted!
No PID file at /app/solr/pids/production/sunspot-solr-production.pid

Tasks: TOP => sunspot:solr:stop
(See full trace by running task with --trace)

Any idea why is this happening?

Was it helpful?

Solution

When you say heroku run, you're asking Heroku to spin up a new dyno. You're then telling this new dyno to run a rake task to stop Solr -- but it's not running Solr, it's a brand new dyno on a totally different server, and it's only running the rake task to stop Solr.

You only have a few ways to communicate with a dyno once it's launched:

  • through the port it's bound to, if any;
  • through a service it's connected to (e.g. a database or message broker); or
  • by asking Heroku to stop it, via scaling, deploying a new release, or via ps:stop.

You can get a list of the processes your application is running via heroku ps. (Presumably this list will include the Solr instance you're trying to stop.) You can terminate any of these processes with heroku ps:stop <process name>.

OTHER TIPS

If you want to delete the index, you should remove the addon. There is no way to pause addons.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top