太阳黑子铁路:无法建立连接,因为目标机器主动拒绝它

时间:2013-02-19 01:07:23

标签: ruby-on-rails solr sunspot

我在rails应用程序上运行太阳黑子并且可以(我假设)让搜索服务器以“rake sunspot:solr:run”运行。不幸的是,当我尝试访问搜索索引时,我的搜索控制器出现了ECONNREFUSED错误。

我试过完全关闭我的防火墙而没有运气。将sunspot.yml中的所有端口更改为8983也没有运气。我发现了命令“netstat -anb”,但不知道要查找的进程。可能导致此错误的原因是什么?

修改

以下内容对rake太阳黑子没有帮助:solr:start不起作用。

Common Initial Troubleshooting.
If you see: Errno::ECONNREFUSED (Connection refused - connect(2)) Then perhaps:

You have not started the solr server:
$ rake sunspot:solr:start

An error occurred in starting the solr server (such as not having the Java Runtime        Environment installed). do
$ rake sunspot:solr:run
to run the server in the foreground and check for errors.

If you come across this error in testing but not development, then perhaps you have not     invoked the task with the correct environment:
$ RAILS_ENV=test rake sunspot:solr:run

编辑2 太阳黑子:solr:run也在终端显示以下内容但似乎继续在终端中加载其他细节:

WARN:  failed SocketConnector @ 0.0.0.0:8983
java.net.BindException: Address already in use: JVM_Bind

:WARN:  EXCEPTION
java.net.BindException: Address already in use: JVM_Bind

更多详情

INFO:  Started SocketConnector @ 0.0.0.0:8983

如何更改端口,因为java.exe 正在侦听此端口。我更改了sunspot.yml和scripts.conf,但是solr:run仍然连接到端口8983。

1 个答案:

答案 0 :(得分:0)

听起来你有另一个Solr运行实例。尝试杀死所有实例并再次运行它。