gpt4 book ai didi

ruby-on-rails - Ruby On Rails 应用程序和 Openshift 中的 Elasticsearch

转载 作者:行者123 更新时间:2023-12-02 22:34:05 26 4
gpt4 key购买 nike

如何在我的 R&R 应用程序中安装/使用 elasticsearch?

This tutorial不要使用我的应用程序,因为我为我的应用程序使用其他端口 8080,而 elasticsearch 使用相同。

编辑

我使用以下设置更改端口:

Elasticsearch 的设置:

network.host: ${OPENSHIFT_INTERNAL_IP}
transport.tcp.port: 15001
http.port: 15002
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: []

轮胎设置:
Tire.configure do
url "127.12.64.1:15001"
logger "#{Rails.root}/log/elasticsearch.log", level: 'debug'
end

我有这个错误:

Request Timeout (RestClient::RequestTimeout)



如果我将端口更改为 15002,我也会有一些错误。

最佳答案

您可以使用相同的方法...只需绑定(bind)到 15000+ 端口。然后,您可以从您的应用 $OPENSHIFT_INTERNAL_IP:$YOUR_PORT 连接到 Elastic。

关于ruby-on-rails - Ruby On Rails 应用程序和 Openshift 中的 Elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11718433/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com