I'm looking for some guidance on how to add a custom map using a geoserver. I have went over the instructions on this blog Kibana and a Custom Tile Server for NHL Data | Elastic Blog and and I can't make it to work. I'm using Kibana 8.10 and GeoServer 2.23. Any guidance on how to troubleshoot this?
i think the problem is with the tile format({z}/{x}/{y}.png) that the kibana need and what the right format for the geoServer.
I would be happy to receive help later on the attached guide, how do I add the appropriate link to Kibana
Thank you
Hi @Erez_Danieli. It looks like you are trying to add a WMS layer from Geoserver. But you've chosen to add a "Tile Map Service" layer. Try adding a layer again, but choose the "Web Map Service" layer instead.
Thank you very much, there is significant progress, I repeated exactly the guide again, this time with the change you mentioned("Web Map Service" layer). There is still a problem.
You can use the browser developer tools to see the exact error you are seeing. It may be the name of the style or something different.
If you open the layer preview in the GeoServer interface using the same Web Map Service protocol (WMS), you can compare the network requests between kibana and that preview to find the difference.
Sorry for the vague answers, but without better error messaging, it is hard to know exactly what's wrong with your setup.
Very professional answer, problem solved.
I looked at the messages sent between the geoserver and the kibana and saw that CORS was missing, in addition to the fact that I saw that it appears in your example.
I updated the geoserver WEB-INF on the server:
File location:
geoserver/webapps/geoserver/WEB-INF
The following lines must be enabled:
<!-- Uncomment following filter to enable CORS in Jetty. Do not forget the second config block further down. -->
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<init-param>
<param-name>chainPreflight</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>GET,POST,PUT,DELETE,HEAD,OPTIONS</param-value>
</init-param>
<init-param>
<param-name>allowedHeaders</param-name>
<param-value>*</param-value>
</init-param>
</filter>
<!-- Uncomment following filter-mapping to enable CORS -->
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>FlushSafeFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SessionDebugger</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>GZIP Compression Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>xFrameOptionsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Definitely, the CORS setting is always a source of issues for Geoserver users, but fortunately, it's an easy one to spot and fix, and the project docs cover this very well.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.