OGC API Features layer from GeoServer, not opening in QGIS

Hi,

We are running GeoServer 2.27.1 and have added OGC API Feature extension.

The page looks ok: https://paituli.csc.fi/geoserver/ogc/features/v1

But QGIS only manages to get the list of layers. Layer listing is for some reason only very slow.

Adding any layer to the map results in:
Layer data source could not be found.

It seems that QGIS tries to guess API version and makes a request to:

https://paituli-test.csc.fi/geoserver/ogc/features/v1/openapi?f=application%2Fvnd.oai.openapi%2Bjson%3Bversion%3D3.0

But that does not give any reasonable reply.

https://paituli-test.csc.fi/geoserver/ogc/features/v1/openapi is already broken.

I wonder if we have some settings off in our installation or is it some more general problem? Or if somebody would know some workaround for this.

I tried also 2.28.1. There error message to openapi call is different, but it does not work neither.

***

With GDAL command-line it gives error about openapi, but then continues to get the data.

ogrinfo OAPIF:``https://paituli.csc.fi/geoserver/ogc/features/v1/`` paituli:tike_vaki1km_2024 -fid 1
INFO: Open of OAPIF:https://paituli.csc.fi/geoserver/ogc/features/v1/' using driver OAPIF’ successful.
ERROR 1: HTTP error code : 500
ERROR 1: HTTP error code : 500, {“code”:“NoApplicableCode”,“description”:“java.lang.NullPointerException”}

(Continued by normal output.)

With 2.28.1 the error code is different:

ERROR 1: HTTP error code : 500, {“code”:“NoApplicableCode”,“description”:“Could not find path item /collections/{collectionId}/tiles/{tileMatrixSetId}/{tileMatrix}/{tileRow}/{tileCol}”}

***

The same layers work via WFS.

Kylli Ek

Hi Kylli,

I made also a quick test with GDAL
ogrinfo oapif:"https://paituli.csc.fi/geoserver/ogc/features/v1/" --debug on --config cpl_curl_verbose=yes
The landing page is read from
https://paituli.csc.fi/geoserver/ogc/features/v1/?f=application%2Fjson

Landing page has a link for
“API definition for this endpoint as application/vnd.oai.openapi+json;version=3.0”
https://paituli.csc.fi/geoserver/ogc/features/v1/openapi?f=application%2Fvnd.oai.openapi%2Bjson%3Bversion%3D3.0

but that link yields an error
‘Cannot invoke “org.geoserver.config.ServiceInfo.getGeoServer()” because “service” is null’

GDAL still continues and sends a request
https://paituli.csc.fi/geoserver/ogc/features/v1/collections/paituli:dvv_osoitteet_na_2016_shape_euref/items?f=application%2Fgeo%2Bjson&limit=20

That is awfully slow. Maybe Geoserver reads all the 5 million addresses first before sending the 20 first addresses out?
Then GDAL wants to read the schema and it takes it from the WFS
https://paituli.csc.fi/geoserver/wfs?version=2.0&service=WFS&typenames=paituli%3Advv_osoitteet_na_2018_shape_euref&request=DescribeFeatureType)

GDAL wants to do the same things for all the layers. Every now and then your server hits a timeout with a message " Requested timeout out while waiting to be executed, please lower your request rate.
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."
Perhaps the service works but it is unusable slow even when the timeout is not hit.

I suggest making a test service with just one collection. Try to make is fast first, and add more collections later.

-Jukka Rahkonen-

Hi,

It seems that the problem is “fixed” with removing ogcapi-images-plugin and ogcapi-tiled-features-plugin from the installation.

Then the openapi page works for OGC features and so QGIS gets the data