inviso icon indicating copy to clipboard operation
inviso copied to clipboard

Cluster not listed at tab #cluster

Open alex-dot opened this issue 9 years ago • 8 comments

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?

alex-dot avatar May 01 '15 17:05 alex-dot

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.

danielcweeks avatar May 01 '15 17:05 danielcweeks

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.

alex-dot avatar May 01 '15 17:05 alex-dot

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=*'

danielcweeks avatar May 01 '15 19:05 danielcweeks

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?

alex-dot avatar May 03 '15 15:05 alex-dot

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.

othman-essabir avatar Apr 27 '16 07:04 othman-essabir

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

synfinatic avatar Oct 19 '16 18:10 synfinatic

@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.

danielcweeks avatar Oct 19 '16 18:10 danielcweeks

@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.

synfinatic avatar Oct 19 '16 18:10 synfinatic