0

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

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

编辑

以下内容也无济于事,因为 rake sunspot: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 sunspot: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。

4

1 回答 1

0

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

于 2014-07-28T21:13:22.657 回答