Hello list,
To set the scene: I have set up Geonetwork 4.2.2 with Elastic Search and Kibana on Windows Server. It is running with OpenJDK 8 and Tomcat 9.0.71. There is a Geoserver instance running on the same server in another Tomcat container. There is an Apache (with TLS over HTTPS) running in front of the Tomcat containers. The Geoserver and Geonetwork are for internal use only and run inside our corporate firewall.
Everything works well except for a login popup that appears every time a user enters a metadata record. Tracking what happens when a page loads reveals a POST request to https://myserver/geonetwork/index/features?_=_search that returns a 401 unauthorised error. The popup still appears if the user is logged in to Geonetwork.
I did read in the docs when setting everything up that Tomcat needs to be configured to use an AJP connector on port 8009 and the Apache in front to be configured with a ProxyPass / ProxyPassReverse using that AJP connector. This is to avoid "page not found errors" on login. In my case this does stop the login prompts but breaks everything beyond the front page of the catalogue. Disabling the AJP connector and telling Apache to use the ProxyPass / ProxyPassReverse with HTTP connectors (http://localhost:8080/geonetwork) to the Tomcat container allows the site to work but with the login prompt on every metadata record page.
The metadata records all contain a valid WMS and WFS link to the data coming from the Geoserver like this:
* https://myserver/geoserver/metadata/ows?service=wms&version=1.3.0&request=GetCapabilities
* https://myserver/geoserver/metadata/ows?service=WFS&acceptversions=1.0.0&request=GetCapabilities
At the same time that the page generates the login popup it returns a 404 not found error with this URL:
I don't know how this URL is created but it is missing the request parameter after SERVICE=wfs&
<ows:Exception exceptionCode="MissingParameterValue" locator="request">
<ows:ExceptionText>Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@anonymised.com..1982...</ows:ExceptionText<mailto:org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@anonymised.com%3c/ows:ExceptionText>>
</ows:Exception>
If I amend the URL with "request=GetCapabilities" it returns a valid document.
So, is this to do with the Tomcat configuration (AJP vs HTTP) or is it something else? Suggestions and things to try will all be happily received.
Many thanks
Ross
Ross McDonald | Geo-evangelist | Angus Council | 01307 49 22 39 | mcdonaldr@anonymised.com<mailto:mcdonaldr@anonymised.com> | www.angus.gov.uk<http://www.angus.gov.uk/>
Follow us on Twitter<https://twitter.com/anguscouncil>
Visit our Facebook<https://en-gb.facebook.com/AngusCouncil> page
Check out Location Data Scotland<https://www.locationdatascotland.com/> for a network of organisations championing spatial data in Scotland.
Think green - please do not email this print