我在彈性搜索沉浸的2小時內。我用Marvel成功安裝了ES(marvel.agent.enabled: false
在config/elasticsearch.yml中),並能夠從Sense成功請求。我重新啓動我的機器,現在當我就感覺下面的請求時,它回答:ES可從捲曲到達,但不能從Marvel/Sense
Request failed to get to the server (status code: 0):
Elasticsearch may not be reachable or you may need to check your CORS settings.If CORS is enabled, try turning off Sense's Basic Authentication support under Setting (cog icon).This will result in a less strict CORS enforcement by the browser.
Please check the marvel documentation for more information.
請求(source):
PUT /megacorp/employee/1
{
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests": [ "sports", "music" ]
}
的指示,我檢查是否ES是通過使到達上的捲曲類似的請求:
請求:
curl -XPUT http://localhost:9200/megacorp/employee/100 -d '{ "first_name" : "test" }'
再我可以在這個網站上找到我的網站,但我不知道這個網站是否可用。
轉到下一個檢查「您可能需要檢查您的CORS設置。」。我基於this recommendation增加了以下配置elasticsearch.yml(並重新啓動ES):
http.cors.enabled: true
http.cors.allow-origin: /.*/
http.cors.allow-credentials: true
但在行爲上沒有任何變化。
在奇蹟/智能設置中切換「支持基本身份驗證」也沒有影響。
歡迎任何可能出錯的指針。
@jimstat在ES羣集日誌定位(在一個節點)的線看起來像'[INFO] [HTTP] [c7_64] bound_address {INET [/0:0:0:0:0:0:0:0:9201]},publish_address {inet [/ 192.168.88.128:9201]}'。您對'publish_address'後面的內容感興趣。在訪問Sense時使用IP:PORT,您可以在那裏看到。在我的例子中:'http://192.168.88.128:9201/_plugin/marvel/sense/index.html'。 – 2015-10-12 06:48:38
沒有答案有幫助,或者您沒有將答案標記爲已接受?會幫助我知道你的訣竅:) – Frans 2017-02-23 11:31:17