elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.72k stars 8.14k forks source link

Created an Index Pattern in Kibana but it's not saved - but no error either #87607

Open rmoff opened 3 years ago

rmoff commented 3 years ago

Kibana version:

7.10.0

Elasticsearch version:

7.10.0

Server OS version:

docker.elastic.co/elasticsearch/elasticsearch:7.10.0

Browser version:

Chrome Version 87.0.4280.88 (Official Build) (x86_64)

Browser OS version:

Mac 10.15.7 (19H15)

Original install method (e.g. download page, yum, from source, etc.):

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
    container_name: elasticsearch
    ports:
      - 9200:9200
    environment:
      xpack.security.enabled: "false"
      ES_JAVA_OPTS: "-Xms1g -Xmx1g"
      discovery.type: "single-node"
      node.store.allow_mmap: "false"
    volumes: 
      - ./data/container_data/elasticsearch:/usr/share/elasticsearch/data

  kibana:
    image: docker.elastic.co/kibana/kibana:7.10.0
    container_name: kibana
    depends_on:
      - elasticsearch
    ports:
      - 5601:5601
    environment:
      xpack.security.enabled: "false"
      discovery.type: "single-node"

Describe the bug:

When I create an index pattern in Kibana it's not saved, but there's no error given.

Steps to reproduce:

  1. http://localhost:5601/app/management/kibana/indexPatterns -> Create index pattern
  2. Specify index pattern name against existing ES index, click Next step
  3. Select correct Time field.
  4. Click Create index pattern
  5. Index pattern is created, fields are listed
  6. Click on Index patterns under Kibana on the sidebar. No index patterns are listed (You have data in Elasticsearch. Now, create an index pattern.). Force-refresh page. Still no index patterns listed

Expected behavior:

When I create an index pattern I expect it to be saved if successful, or an error thrown in the UI if it was unsuccessful.

Screenshots (if relevant):

https://user-images.githubusercontent.com/3671582/103871397-e9b99d80-50c4-11eb-900c-c04580967377.mp4

Errors in browser console (if relevant):

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
^ A single error about an inline script not firing due to content security policy is expected!

Provide logs and/or server output (if relevant):

kib.log

Any additional context:

rmoff commented 3 years ago

In the Kibana log I saw this when I went to the Index Patterns home page

{
  "type": "log",
  "@timestamp": "2021-01-07T09:05:44Z",
  "tags": [
    "error",
    "elasticsearch",
    "data"
  ],
  "pid": 8,
  "message": "[search_phase_execution_exception]: all shards failed"
}

Since this was just a test environment I tore down Kibana and Elasticsearch containers, deleted the local data volume for the containers, and brought them back up. After that … it worked fine.


Whilst it looks like there was something odd with my deployment that is now fixed, it would be nice to improve the UX so that the user is told that something's not right instead of being stuck in an endless loop of "you need to create an index pattern, ok I'll create an index pattern, you need to create an index pattern, etc."

elasticmachine commented 3 years ago

Pinging @elastic/kibana-app-services (Team:AppServices)

Dosant commented 3 years ago

@mattkime, looks like error handling when creating an index pattern needs improvement. I wonder if this is fixed in new index pattern management so this can be closed?

elasticmachine commented 1 year ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)