Emanuele Tajariol (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5f715f5e-d477-4c0d-97bb-5b7644324d82
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-11074?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
) GEOS-11074 (
https://osgeo-org.atlassian.net/browse/GEOS-11074?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
) GeoFence may not load property file at boot (
https://osgeo-org.atlassian.net/browse/GEOS-11074?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.20.7, 2.21.5, 2.22.4, 2.23.1 Assignee:
Unassigned Components: GeoFence Created: 13/Jul/23 12:51 PM Priority: Medium
Reporter: Emanuele Tajariol (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5f715f5e-d477-4c0d-97bb-5b7644324d82
)
The values in geofence/geofence-server.properties are not always read into the
configuration class.
It happens randomly, so it seems it may a be a race condition.
In my tests it only randomly happened when running on tomcat; it never happened
when running in maven with jetty:run.
The issue was first spotted on a 2.20.7 (and then tested on newer versions),
but it may be happening on previous versions as well.
We know that the file path is properly set in the configurer since the
GeoFenceConfigurationManager writes to the right file whe n requested to do so,
but at boot time the written values are not loaded from that file, and the
default values are used instead.
The proposed fix is to programmatically load the property file using an
InitializingBean:afterPropertiesSet() callback. In this way we'll also provide
an entrypoint method to reload the configuration on request – pls note that the
GeoFence plugin is not realoading the configuration at runtime yet.
An initial implementation will only change the GeoFenceConfigurationManager
class, in order to minimize the backport work.
The work can then be refactored and cleaned out on master only; refactoring
will be aimed to make GeoFenceConfiguration and CacheConfiguration handle their
own properties.
(
https://osgeo-org.atlassian.net/browse/GEOS-11074#add-comment?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-11074#add-comment?atlOrigin=eyJpIjoiZjY4NTcyMjIyZWJkNDEwOGI1NTg3ZDAwZmNlZGU1NDciLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100231-
sha1:2991753 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel