GeoFence: error in interaction with monitoring plugin

Description

There's an error in the caller IP address resolution when the monitoring plugin is installed:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2017-01-20 12:13:52,028 WARN [geoserver.monitor] - Post process task failed java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) at org.geoserver.geofence.GeofenceAccessManager.retrieveCallerIpAddress(GeofenceAccessManager.java:253) at org.geoserver.geofence.GeofenceAccessManager.getAccessLimits(GeofenceAccessManager.java:367) at org.geoserver.geofence.GeofenceAccessManager.getAccessLimits(GeofenceAccessManager.java:293) at org.geoserver.security.ResourceAccessManagerWrapper.getAccessLimits(ResourceAccessManagerWrapper.java:214) at org.geoserver.security.CatalogFilterAccessManager.getAccessLimits(CatalogFilterAccessManager.java:56) at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(SecureCatalogImpl.java:806) at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(SecureCatalogImpl.java:770) at org.geoserver.security.SecureCatalogImpl.checkAccess(SecureCatalogImpl.java:594) at org.geoserver.security.SecureCatalogImpl.getLayerByName(SecureCatalogImpl.java:295) at org.geoserver.catalog.impl.AbstractFilteredCatalog.getLayerByName(AbstractFilteredCatalog.java:225) at org.geoserver.catalog.impl.AbstractCatalogDecorator.getLayerByName(AbstractCatalogDecorator.java:384) at org.geoserver.catalog.impl.LocalWorkspaceCatalog.getLayerByName(LocalWorkspaceCatalog.java:92) at org.geoserver.monitor.LayerNameNormalizer.run(LayerNameNormalizer.java:43) at org.geoserver.monitor.MonitorFilter$PostProcessTask.run(MonitorFilter.java:246) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

Environment

None

Status

Assignee

Emanuele Tajariol

Reporter

Emanuele Tajariol

Triage

None

Fix versions

Affects versions

None

Components

Priority

Medium
Configure