Gem Sunspot 谁用过,求助!

scott · 2012年03月27日 · 最后由 myliang 回复于 2012年03月28日 · 3673 次阅读

JDK 安装好了,之后 Sunspot 也安装好了,今天使用了一天可是晚上回来就不能用了(同一台机器),

scott@scott-ThinkPad-T420:~/work/dituhui$ java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)
scott@scott-ThinkPad-T420:~/work/dituhui$ javac -version
javac 1.7.0


执行:rake sunspot:solr:start(或者 bundle exec rake sunspot:solr:start)报错

scott@scott-ThinkPad-T420:~/work/dituhui$ rake sunspot:solr:start
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)
rake aborted!
Server is already running with PID 0

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


重启电脑也不行,总说 Server is already running with PID 0 有谁遇到过吗?怎么解决的?

运行 rake sunspot:solr:start --trace 的结果呢?

是说服务正在运行,可以先结束在启动,rake sunspot:solr:stop 实在不行就把项目目录下的 solr/pids 下的文件删除, 当 sunspot 启动时,会判断这个 Pid 文件是否存在,如果存在就不能启动, 所以,需要先停止,再删除这个 pid 文件,应该就可以了

#1 楼 @saberma 报一堆错误。 scott@scott-ThinkPad-T420:~/work/dituhui$ rake sunspot:solr:start --trace ** Invoke sunspot:solr:start (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute sunspot:solr:start java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode) rake aborted! Server is already running with PID 0 /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/sunspot_solr-1.3.1/lib/sunspot/solr/server.rb:62:in start' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/sunspot_solr-1.3.1/lib/sunspot/solr/tasks.rb:12:inblock (3 levels) in ' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:inblock in execute' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:inexecute' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in block in invoke_with_call_chain' /home/scott/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:inmon_synchronize' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:ininvoke' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:inblock (2 levels) in top_level' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:inblock in top_level' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:intop_level' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in block in run' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /home/scott/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in' /home/scott/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in load' /home/scott/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in' Tasks: TOP => sunspot:solr:start

#2 楼 @myliang 3q,高人啊,very 感谢!

#4 楼 @scott 不客气,能帮到你就行

需要 登录 后方可回复, 如果你还没有账号请 注册新账号