[Geoserver-users] get a "LayerNotDefined" error when using a http client, but works fine at layer preview

Hi, all!

I’m using ‘geonode/geoserver:2.15.4’ docker container, and I publish a layer from postgis by admin account.

When I calling by http client like postman:

http://localhost:8080/geoserver/tdt/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=test%3Atest&SRS=EPSG%3A404000&STYLES=&WIDTH=768&HEIGHT=610&BBOX=121.9456100466156%2C30.25440216087341%2C122.4727249143219%2C30.67302703834534

I get an error:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> Could not find layer test:test

log:

But it shows normal in layer preview.

I guess this is a permission issue, which can only be seen after the admin logs in. because I log out and then use layer preview, which is also get a LayerNotDefined error.

Because our geoserver is deployed on the local network, so we can remove any permissions. What security options do I need to set?

Any suggestions would be welcome.