Marvell 2.1.1 error from GET /api/marvel/v1/clusters

Re-post to create new thread.
I am seeing similar, e.g. my marvel page shows blank (attached screen cap). I installed from internet.

ES v2.1.1
LS v2.1.1
Kibana4 v4.3.1
Marvel 2.1.1

I've cleared the browser cache (using Chrome Version 46.0.2490.80 (64-bit)).

Using browser devel tool, I see that Kibana does not like the data returned from /api/marvel/v1/clusters

This is what I see in the console.

Error: [$resource:badcfg] Error in resource configuration for actionquery. Expected response to contain an array but got an object (Request: GET /api/marvel/v1/clusters)
http://errors.angularjs.org/1.4.7/$resource/badcfg?p0=query&p1=array&p2=object&p3=GET&p4=%2Fapi%2Fmarvel%2Fv1%2Fclusters
at commons.bundle.js:27356
at $http.then.value.$resolved (marvel.bundle.js:106586)
at processQueue (commons.bundle.js:42033)
at commons.bundle.js:42049
at Scope.$eval (commons.bundle.js:43277)
at Scope.$digest (commons.bundle.js:43088)
at Scope.$apply (commons.bundle.js:43385)
at done (commons.bundle.js:37834)
at completeRequest (commons.bundle.js:38032)
at XMLHttpRequest.requestLoaded (commons.bundle.js:37973)(anonymous function) @ commons.bundle.js:39765(anonymous function) @ <img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/elastic/original/2X/1/1cacc8a45c7158669d914a6010fb94ce9604ca5f.png" width="690" height="246">commons.bundle.js:36534processQueue @ commons.bundle.js:42041(anonymous function) @ commons.bundle.js:42049Scope.$eval @ commons.bundle.js:43277Scope.$digest @ commons.bundle.js:43088Scope.$apply @ commons.bundle.js:43385done @ commons.bundle.js:37834completeRequest @ commons.bundle.js:38032requestLoaded @ commons.bundle.js:37973

The gist of the results from /api/marvel/v1/clusters is in the gist

gist of /api/marvel/v1/clusters

Also tried incognito mode with Chrome. Error is consistent.

On one of the node in cluster.

$ curl -s localhost:9200/_cat/indices            
green open .marvel-es-2015.12.23 1 1 9356  78  7.6mb  2.5mb 
green open .marvel-es-data       1 1   25 275 22.5kb 11.2kb 
green open lotr-kibana4          1 1    2   1 31.2kb 15.6kb

Also tested on Safari Version 9.0.2 (11601.3.9) on OSX 11.11.2, same thing. Blank Marvel page and same error from clusters call in the debugger.

Ok, that was a red herring. It's a bug in Marvel. When sending /api/marvel requests back to Node, it's not prepending the configured basePath prefix in kibana.yml. This is what I have in my kibana.yml

# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
server.basePath: "/k4"

I am using nginx as a front end as I am supporting both Kibana3 and Kibana4 at the same time. This allows my users to migrate from K3 to K4.

If they go to http://root/ they get K3, if they go to http://root/k4/, they get K4.

Since Marvel sends its /api requests without using the configured prefix, it's getting data back from Kibana3.

I don't know nodejs enough to tell where the bug is, but it's definitely a bug.

Grrrr!

Thanks for sharing the underlying issue here, it does sound like there may be a bug in Marvel 2.x to me.

Perhaps as a workaround you could run Kibana4 on a separate server and/or port and use nginx to redirect requests for http://root/k4 to that location.

Hi Steve,

I am already running K4 on separate port, that binds to localhost. Same for K3. The only way to get to any of them is via nginx. Our firewall ACLs block everything.

Nginx is working fine redirecting to K3 and K4. The problem is that Marvel v2.1.1 is sending requests back directly to /api/marvel instead of pre-pending the configured basePath in K4 kibana.yml. Nginx redirects anything that does not have a '/k4' prefix to K3, and anything that has '/k4' prefix to K4.

Hence I run into this bug :frowning:

Currently, I've put in a temporary catch in nginx so that if it sees '/api/marvel', it will redirect to K4. I'd prefer this get fixed in the right place, Marvel.

I can't find where to file Marvel bugs, so I filed this in Kibana.

I raised this against the Marvel issues as it's not publicly accessible :slight_smile: