Kibana maps doesn't show clusters/grids

Hello,

I'm currently experimenting with the maps feature of Kibana, which was easy to set up, but it seems like it is not working correctly. We are currently using the ELK stack version 8.4.1 in an offline environment.

We have ingested our data and mapped the location (lat, lon) to geo_point. All seems to work fine. We can see the dots on the map, but as soon as we change from the point view to a cluster view (such as the Clusters layer in the "Add layer" view or setting the option "Show clusters when results exceed 10.000" in the layer options for Document layer) we don't see any results. The Layers legend shows the count option and seems to calculate quite well, but the clusters itself are not shown on the map. The same here for grids.

Is there some specific setting I miss or is the data already wrong ingested? As far as I know, all I need is data with geo coordinates and those coordinates mapped to the location.lat/location.lon attributes as geo_point.

Best wishes and thank you,
Danny.

The best way to debug this is to start with the inspector and see if data is getting returned as expected. Open inspector and view requests. See screen shot for details.

Can you run the inspector requests in console? What is the output?

Are there any errors in the browser console?

Are there any errors in the layer when you try to edit the layer?

Good morning Nathan,

thank you for your response!

I sent the mentioned request of you in the console and the result and I get an result. Here is a snapshot:

{
  "took": 6198,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "gridSplit": {
      "buckets": [
        {
          "key": "5/16/10",
          "doc_count": 29118797,
          "gridCentroid": {
            "location": {
              "lat": 51.30713936728401,
              "lon": 7.762260379643365
            },
            "count": 29118797
          }
        },
        {
          "key": "5/17/10",
          "doc_count": 5042686,
          "gridCentroid": {
            "location": {
              "lat": 52.289351229253725,
              "lon": 13.621128738384288
            },
            "count": 5042686
          }
        },
[...]
        {
          "key": "5/7/12",
          "doc_count": 1,
          "gridCentroid": {
            "location": {
              "lat": 38.78929997328669,
              "lon": -90.54860000498593
            },
            "count": 1
          }
        },
        {
          "key": "5/6/13",
          "doc_count": 1,
          "gridCentroid": {
            "location": {
              "lat": 28.15969998948276,
              "lon": -106.22300008311868
            },
            "count": 1
          }
        }
      ]
    }
  }
}

The browser console also have some warnings and errors (it is all in German, sorry for that):

08:38:38.132 QuellĂĽbergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://telemetry.elastic.co/v3/send/kibana-browser. (Grund: CORS-Anfrage schlug fehl).
09:29:49.483 QuellĂĽbergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf http://XXX/styles/basic-preview/2/1/3.png. (Grund: CORS-Anfrage schlug fehl).
08:38:41.406 WebGL warning: texImage: Alpha-premult and y-flip are deprecated for non-DOM-Element uploads. 5
08:38:50.823 QuellĂĽbergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://tiles.maps.elastic.co/fonts/Open%20Sans%20Regular,Arial%20Unicode%20MS%20Regular/0-255.pbf. (Grund: CORS-Anfrage schlug fehl).
09:08:57.344 QuellĂĽbergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://telemetry.elastic.co/xpack/v2/send. (Grund: CORS-Anfrage schlug fehl).

Our domain was removed and replaced by "XXX".
There are more than just those few. It happens several times.

As I try to edit the layer, I don't get any error/warning besides of the mentioned above. The UI itself doesn't show any error at all. Once I got also such an error as I changed the cluster layer from type "cluster" to "grid" and changed the resolution from the second option to the third:

09:29:49.500 SecurityError: The operation is insecure. (28ed1a9bb754a7bc0819a4f442dcfcc5.js:1)

We tested it also on other browsers (e.g. Edge) and different PCs. All show the same problem.

Best regards,
Danny.

Do you have CSP enabled?
Do you have any non-default security settings enabled in your browser?
Do you have any proxies or firewalls between your browser and Kibana?

The console error messages look like your browser can not access EMS. Is this correct? If so, could you disable EMS to clean up those error messages?

Hey Nathan,

I guess I found the solution for the mentioned problem, which is a little weird to me, since I can't see any connection between the problem and the setting I have turned off.

First what I have done in between:

  • I tested with the newest version of Google Chrome and Firefox
  • I tested on several other machines
  • I updated our stack from 8.4.1 to 8.6.2

All of those things didn't solve the problem. The cluster/grid visualization was still calculated, but didn't show up.

I fixed the issue with our domain (map server down). Still nothing.

I set both of the attributes in the kibana.yml

csp.strict: false
telemetry.optIn: false

Still nothing.

The solution was turning off (as you mentioned before) the EMS:

map.includeElasticMapsService: false

But I can't really see the problem here, since the cluster/grid visualization on maps shouldn't have any impact on the communication to EMS.

Could you please explain why the EMS is important for the visualization of cluster/grid layers?

Best regards,
Danny.

I suspect there is some error in Kibana's client-side code that prevented the map from rendering. I would like find the root cause if possible. Can you tell more about your map? What kind of layers does your map contain?

Good morning Nathan,

sorry for my late reply, but I wasn't in the office til now.

So what I basically did first on the Kibana maps application was creating a background layer for the map. In this case it was a Tile Map Service. We have our own local map server, since we aren't connected to the internet with our systems.

Besides of the map layer, I've created a Clusters layer on top. I selected the index with my locations inside and nothing happened. To test out, if the Cluster visualization is broken or Kibana in general, I created a Documents layer on top to see the single points. This worked. If I activate the option in Scaling "Show clusters when results exceed 10.000" the visualization seems to be broken, except for the map legend. The legend seems to behave correctly, but no cluster dots and no numbers.

The only errors I encountered there so far are mentioned in my last posts. The solution was found by accident and with your help.

I hope this helps to find the problem. :grinning:

Thanks for following up. I have found the root cause of the problem and opened [maps] layers are not displayed in offline environment and map.includeElasticMapsService not set to false · Issue #152389 · elastic/kibana · GitHub to track the issue.

Happy mapping!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.