cj devin
cj devin

Reputation: 1375

TileLayerPreview:Failed to load resource: the server responded with a status of 400 (Bad Request)

I'm using Geoserver 2.13.0 created TileLayer with Point Geometry. While previewing tileLayer getting Error. Also inside gwc directory tile data is there. Everything look fine. But don't know why getting on browser console 400(Bad Request) Error. Network Url of Bad Request Error:

http://localhost:8080/geoserver/gwc/service/wmts?layer=CacheTestWS%3AcacheTestGeometria&style=&tilematrixset=EPSG%3A4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A4326%3A8&TileCol=89&TileRow=77

If we see in Success request Network Request Type is coming png but in Error case showing text/html. Below are the some of relvant images.

enter image description here enter image description here Any help is very appriciate.

Upvotes: 1

Views: 1645

Answers (1)

Jalil Toosi
Jalil Toosi

Reputation: 11

I ran into the same problem and were able to solve it following the instructions on this geoserver page

First, create the file /etc/init.d/geoserver and copy the content from this file and paste the content into it, then change the user mode . sudo chmod +x /etc/init.d/geoserver Second, create the file etc/default/geoserver and paste the following lines into it.

USER=<user>
GEOSERVER_DATA_DIR=/usr/share/geoserver/data_dir
GEOSERVER_HOME=/usr/share/geoserver
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
JAVA_OPTS="-Xms128m -Xmx512m"

change the with your user name and the OpenJDK with the name of the version you installed.

then to start/check status of geoserver: sudo systemctl start geoserver sudo systemctl status geoserver to stop geoserver: sudo systemctl stop geoserver see https://docs.geoserver.org/latest/en/user/production/linuxscript.html

Upvotes: 1

Related Questions