简体   繁体   English

具有多个主机的acts_as_ferret

[英]acts_as_ferret with multiple hosts

I've got everything working with ferret and acts_as_ferret for development (or localhost DRb), but I can't get my multiple host deployment working. 我已经使用ferret和acts_as_ferret进行了所有开发工作(或本地主机DRb),但是我无法进行多主机部署。 All of the remote systems get ECONNREFUSED when accessing the port. 访问该端口时,所有远程系统都将获得ECONNREFUSED。 On the ferret server, the daemon is listening on localhost only despite the configuration listing the FQDN as the host. 在雪貂服务器上,尽管配置将FQDN列为主机,但守护程序仅在localhost上侦听。

I also tried switching to a UNIX socket to share data between the ferret DRb daemon and the app code but it too gets ECONNREFUSED. 我还尝试切换到UNIX套接字以在雪貂DRb守护程序和应用程序代码之间共享数据,但它也得到ECONNREFUSED。 (The socket is available to all of the machines via an NFS mount). (该套接字可通过NFS安装架用于所有计算机)。

Is there a better way to do this or should I be looking for another search indexer? 有没有更好的方法可以做到这一点,还是应该寻找另一个搜索索引器? Thanks. 谢谢。

I did figure out that if the address is changed to druby://0.0.0.0:port that it would listen on all ips on the DRb server; 我确实发现,如果将地址更改为druby://0.0.0.0:port,它将在DRb服务器上的所有ip上进行侦听; however, it doesn't provide any protection against bad code injection into the DRb process. 但是,它不能为将不良代码注入DRb进程提供任何保护。

Basically don't use ferret. 基本上不使用雪貂。 I'm on to Xapian with acts_as_xapian for RoR. 我将通过act_as_xapian来了解Xapian的RoR。 It supports multiple processes reading but only one writing, so it's an offline index. 它支持多进程阅读,但仅支持一次写作,因此它是一个离线索引。 However, I will be able to make use of sharing the same index between multiple servers via the shared file system (NFS). 但是,我将能够通过共享文件系统(NFS)在多个服务器之间共享相同的索引。

Check out Pitfalls of acts_as_ferret, with DrbServer to the rescue 使用DrbServer来检查acts_as_ferret的陷阱

http://www.subelsky.com/2007/03/pitfalls-of-actsasferret-with-drbserver.html http://www.subelsky.com/2007/03/pitfalls-of-actsasferret-with-drbserver.html

worked pretty well for me. 对我来说效果很好。 The only thing I'd add is be sure to set the host value to where you're ferret is running. 我唯一要添加的是确保将主机值设置为雪貂运行的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM