ES reachable from curl but not from Marvel/Sense

喜你入骨 提交于 2019-12-04 00:11:49

Try running the marvel/sense html page on another browser or in private/incognito mode. I had the same problem and doing this solved it. I think it is due to the settings being stored on cookie or something not really sure.

I was having this same problem too and according to Elasticsearch's docs here: http://www.elastic.co/guide/en/marvel/current/configuration.html#cors, you have to enable CORS.

To summarize, open the elasticsearch.yml file in the config/ folder and put this

http.cors.enabled: true
http.cors.allow-origin: /.*/  
http.cors.allow-credentials: true 

somewhere in there, probably the "Network And HTTP" section.

Then, after I restarted elasticsearch, it worked fine for me in Marvel Sense.

So when trying to run commands in sense, try using the ip address of the machine where the server is hosted, instead of using http://localhost:9200/_plugin/marvel/sense/index.html. This worked for me.

In your ES cluster logs (in one node) locate a line looking like

[INFO ][http ] [c7_64] bound_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish_address {inet[/192.168.88.128:9201]}

You are interested in what's after publish_address. When accessing Sense use the IP:PORT you see there. In my example, the Sense URL would look like this:

http://192.168.88.128:9201/_plugin/marvel/sense/index.html

The CORS part is mostly valid for the scenario where Marvel is installed in a separate cluster and it shouldn't be needed when Marvel is installed in the same cluster as the monitored nodes. It's also needed when Shield is installed in the cluster.

I was also having the same problem. Make sure that the server field is not blank. My problem got solved after filling in the field with local

I was having the same problem with Chrome. Clearing browser data solves my problem. It's under history -> clearing browser data -> check cookies and other site and plugin data,cached images and files,autofill form data,Hosted app data.

Not sure which one did the trick but that's how I did and it worked. Hope this helps.

damoiser

Not strictly related to Marvel, but when I have issue connecting to elasticsearch from "outside" the server I need to.

Change the elasticsearch.ymlconfig, where the host is listening to - listen to all network interfaces:

network.host: 0.0.0.0

After that, depending on your server, you should open the tcp port on your firewall (if you use the default port of elasticsearch: 9200). For example on Centos (or RHEL), you should run:

sudo firewall-cmd --zone=public --add-port=9200/tcp --permanent
sudo firewall-cmd --reload
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!