Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster not listed at tab #cluster #9

Open
alex-dot opened this issue May 1, 2015 · 8 comments
Open

Cluster not listed at tab #cluster #9

alex-dot opened this issue May 1, 2015 · 8 comments

Comments

@alex-dot
Copy link

alex-dot commented May 1, 2015

Strangely nothing is shown on the web app. In particular there is nothing to select under the Cluster drop-down menu and it just shows Nothing selected. So probably the webapp isn't correctly configured yet. I followed the guide and also changed settings.py to the following:

clusters = [
    Cluster(id='clustername', name='clustername', host=socket.getfqdn())
]

and

clusters = [
    Cluster(id='clustername', name='clustername', host='hostname')
]

to no avail. Any ideas?

@danielcweeks
Copy link
Contributor

Clusters are actually built up from available data within ElasticSearch (not what is in the config). If you run the index_cluster_stats.py just once, then it should show up in the dropdown.

@alex-dot
Copy link
Author

alex-dot commented May 1, 2015

Well I did ran it everytime I changed something (just to be throrough), so I probably miss something else. There is nothing interesting in the elasticsearch and tomcat logs. I have no experience with elastic search so I have no real idea where I can debug this problem.

@danielcweeks
Copy link
Contributor

This is the elasticsearch query used to get the cluster names that populate the list:
https://github.com/Netflix/inviso/blob/master/web-ui/public/js/cluster.js#L72

You can use to following curl command to see if there is any data:

curl -XGET 'http://<elasticsearch_host>:<port>/inviso-cluster/metrics/_search?q=*'

@alex-dot
Copy link
Author

alex-dot commented May 3, 2015

Thanks for your suggestion. That resulted in a fair looking output. I thought maybe the problem lies with tomcat so I delved into the logs, changed the user and group of the tomcat process. Since I've installed through my package system, I also fell for this bug:
https://bugs.launchpad.net/ubuntu/+source/tomcat7/+bug/1232258

Now diving into the log, this is what I am seeing and I think it points to the right direction:

May 03, 2015 5:19:20 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/inviso#mr2#v0/WEB-INF/lib/jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
May 03, 2015 5:19:20 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/inviso#mr2#v0/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class

Seems to me like the webapp isn't loaded properly. Any idea of how to remedy this?

@othman-essabir
Copy link

othman-essabir commented Apr 27, 2016

It's a little bit late but it may help others.
Actually it's not a problem of inviso but rather a security config of elastic search.
You need to enable CORS in elastic search.
Add this config to the config file of elastic search:
http.cors.enabled:true
if it works then change it back to false, because this is a big security issue!
Let's do this properly, set the following param in the config file of elastic search:
http.cors.allow-origin:the ip or the domain name of the server that elastic search should trust
this should work.

@synfinatic
Copy link

@alex-dot I'm getting the exact same error. Did you ever figure out a fix?

@danielcweeks
Copy link
Contributor

@synfinatic If you're talking about the "jar not loaded" message, that isn't an error. What is the issue that you're seeing? If you can't access the data, it's possible that it's the issue @othman-essabir described.

@synfinatic
Copy link

synfinatic commented Oct 19, 2016

@danielcweeks Issue is that the webapp shows no data. Elastic search seems to have a little info about my cluster, but no job history even though I'm running the two python scripts (no errors, seems to see my jobs).

Adding http.cors.enabled:true to my elasticsearch.yml prevents it from starting (no errors, just doesn't start) w/ ES 1.7.5. Adding 'http.cors.enabled: true' fixed my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants