ppadovani / KibanaNestedSupportPlugin

A plugin for Kibana 5.5 and beyond that adds support for nested field search and aggregation.
https://ppadovani.github.io/knql_plugin/overview/
Apache License 2.0
79 stars 7 forks source link

/api/nested-fields-support/mappings/sap-fi-fiposting 404 (Not Found) #36

Closed open7c closed 6 years ago

open7c commented 6 years ago

After clicking a Checkbox in Management > Nested Fields we get this error:

GET https://kibana.example.com/api/nested-fields-support/mappings/sap-fi-fiposting 404 (Not Found)

Possibly unhandled rejection: {"data":{"statusCode":404,"error":"Not Found","message":"Not Found"},"status":404,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"../api/nested-fields-support/mappings/sap-fi-fiposting","headers":{"Accept":"application/json, text/plain, /","kbn-version":"6.1.2"}},"statusText":"Not Found"}

https://kibana.example.com/api/ also can't be found.

We use Apache as Reverse Proxy, the Config:

AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/clients/client1/web1/kibana.example.com/.htpasswd
require valid-user

<Location /.well-known> Allow from All Satisfy Any

ProxyRequests Off <Proxy *> Order deny,allow Allow from all

SSLProxyCheckPeerName Off SSLProxyEngine On SSLProxyCheckPeerCN off SSLProxyCheckPeerExpire off

ProxyPass /.well-known ! ProxyPass / http://127.0.0.1:5601/ ProxyPassReverse / https://127.0.0.1:5601/

Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

ppadovani commented 6 years ago

Can you tell me what version of the plugin you are using? I assume 6.1.2-1.0.1 since you opened the optimization failure issue #34 . Please close that issue if you have moved past it.

open7c commented 6 years ago

I'm using the Version 6.1.2-1.0.1 that you released today. We are not using X-Pack.

ppadovani commented 6 years ago

I just released a fix I think will resolve the issue. I hadn't noticed an API that I needed to call that resolved the base path for the call. Please download and test, if it works please close this issue.

open7c commented 6 years ago

I tried Version 6.1.2-1.0.3

After installing, Kibana doesn't start anymore. When i remove it from the /plugins Directory, Kibana starts well.

The only output of the Logs is: {"type":"log","@timestamp":"2018-02-02T11:26:18Z","tags":["info","optimize"],"pid":384,"message":"Optimizing and caching bundles for kibana, stateSessionStorageRedirect, timelion and status_page. This may take a few minutes"}

ppadovani commented 6 years ago

I just downloaded the 6.1.2 distribution for OS X, and installed the plugin without any issues. So I am unable to help you until you can get me a list of plugins that you have installed. Additionally, please let me know any other configuration you may have performed to Kibana.

Thanks!

open7c commented 6 years ago

This is the only Plugin on that System, It works after installation (bt gives the 404 Error on the /api Endpoint.

When trying to "service restart kibana" inside the Container, Kibana will no more come up...

When i delete the Plugin Directory Kibana can be restartet.

This is my Docker Config:

docker run \ --detach \ -e ES_HEAP_SIZE="16g" \ -e ES_JAVA_OPTS="-Xms16g -Xmx16g" \ -e LS_HEAP_SIZE="16g" \ -e TZ="Europe/Vienna" \ --name elk \ --publish 127.0.0.1:5601:5601 \ --publish 127.0.0.1:9200:9200 \ --publish 127.0.0.1:5044:5044 \ --restart always \ -v /etc/localtime:/etc/localtime \ -v elk-data:/var/lib/elasticsearch \ -v /srv/docker/elk/elasticsearch.yml:/opt/elasticsearch/config/elasticsearch.yml \ -v /srv/docker/elk/kibana.yml:/opt/kibana/config/kibana.yml \ -v /srv/docker/elk/02-beats-input.conf:/etc/logstash/conf.d/02-beats-input.conf \ -v /home/logstash:/home/logstash \ -v /srv/docker/elk/opt/kibana/plugins:/opt/kibana/plugins \ sebp/elk

ppadovani commented 6 years ago

Ahh... excellent a docker container! Can you send me your docker file? Then I can duplicate your issue and should be able to resolve it.

open7c commented 6 years ago

I don't use a Dockerfile, this is a public Container from this Guy: https://hub.docker.com/r/sebp/elk/ In the right Box is a link to his Repo with the Dockerfile. This shoul be the latest Release, Version 6.1.2

ppadovani commented 6 years ago

Excellent! This is what I need to resolve this. I'll try and have this fixed in the next day or so.

ppadovani commented 6 years ago

Ok.. I see what your problem is... what you need to do is create a new Dockerfile... and put the following in the file:

FROM sebp/elk

WORKDIR ${KIBANA_HOME}
RUN gosu kibana bin/kibana-plugin install https://github.com/ppadovani/KibanaNestedSupportPlugin/releases/download/6.1.2-1.0.3/nested-fields-support-6.1.2-1.0.3.zip

Next run this command:

docker build -t elk_nested .

Notice the '.' at the end. This command assumes you are in the same directory as the Dockerfile you created. What this will do is create a new container that has my plugin installed within it. Once the build completes, you can then run the container with the same command you pasted above, except remove the line '-v /srv/docker/elk/opt/kibana/plugins:/opt/kibana/plugins' and change the last line from 'sebp/elk' to 'elk_nested'

This should bring the container up and you should be able to test against it. Be aware that the name 'elk_nested' was just something I threw in there. If you are going to want to deploy this container, you will have to choose a name and repo to store this in.

I built the Dockerfile by looking at the instructions/documentation for the container you were using. Specifically this page: http://elk-docker.readthedocs.io/#installing-kibana-plugins

Hope this helps!

ppadovani commented 6 years ago

Please reopen if this is still and issue.

open7c commented 6 years ago

With the new Version i get the following Error when i check an Index Pattern:

PUT https://kibana.example.com/api/saved_objects/index-pattern/3ad283a0-01c5-11e8-9be8-33ccd18ae84c 400 (Bad Request)

Error: mapping set to strict, dynamic introduction of [nested] within [index-pattern] is not allowed: [strict_dynamic_mapping_exception] mapping set to strict, dynamic introduction of [nested] within [index-pattern] is not allowed at commons.bundle.js?v=16363:27 at processQueue (commons.bundle.js?v=16363:55) at commons.bundle.js?v=16363:55 at Scope.$digest (commons.bundle.js?v=16363:55) at Scope.$apply (commons.bundle.js?v=16363:55) at done (commons.bundle.js?v=16363:55) at completeRequest (commons.bundle.js?v=16363:55) at XMLHttpRequest.xhr.onload (commons.bundle.js?v=16363:55) "Possibly unhandled rejection: {"statusCode":400,"body":{"message":"mapping set to strict, dynamic introduction of [nested] within [index-pattern] is not allowed: [strict_dynamic_mapping_exception] mapping set to strict, dynamic introduction of [nested] within [index-pattern] is not allowed","statusCode":400,"error":"Bad Request"}}"

I tried to find a solution, but haven't found one. Is this related to this Plugin or where can i adjust this strict/dynamic Setting? The Index was created automatically while we imported nested JSON Data into it.

open7c commented 6 years ago

Unfortunately i cannot reopen this Issue, there is no Button for that.

ppadovani commented 6 years ago

I've opened a different issue: https://github.com/ppadovani/KibanaNestedSupportPlugin/issues/38