geoserver / geofence

Advanced Authorization Manager for GeoServer
GNU General Public License v2.0
97 stars 55 forks source link

org.geoserver.geofence.core.dao.DuplicateKeyException: Duplicate Rule - Non existent priority number #250

Closed GeoGyro closed 1 week ago

GeoGyro commented 1 year ago

In Geoserver's logs I see errors about duplicated rules with some layers:

WARN [impl.RuleDAOImpl] -  ORIG: Rule[id:94151 pri:111070 role:ROLE_VIEWER srv:WFS req:GETFEATUREWITHLOCK ws:geonode l:my_layer acc:DENY]
WARN [impl.RuleDAOImpl] -  DUP : Rule[id:null pri:111074 role:ROLE_VIEWER srv:WFS req:GETFEATUREWITHLOCK ws:geonode l:my_layer acc:DENY]
ERROR [geoserver.rest] - Duplicate Rule Rule[id:null pri:111074 role:ROLE_VIEWER srv:WFS req:GETFEATUREWITHLOCK ws:geonode l:my_layer acc:DENY]
org.geoserver.geofence.core.dao.DuplicateKeyException: Duplicate Rule Rule[id:null pri:111074 role:ROLE_VIEWER srv:WFS req:GETFEATUREWITHLOCK ws:geonode l:my_layer acc:DENY]

When I look into geonode_data database public.gf_rule I can see a priority rule with 111070 number but no 111074. Even when I delete and upload the layer, this error is still present and old rules seems to be still present in system.

I'm using Geoserver 2.20.6.