REX update Geonetwork 4.2.8 - pb indexation and sync user

13 views
Skip to first unread message

Pierre Jégo

unread,
Jun 6, 2025, 9:06:06 AMJun 6
to georchestra-dev

Hello,

I recently performed a version migration of GeoNetwork, which was a bit complicated.

Several points:

1 - The LDAP directory was not properly set up; some elements had georchestraObjectIdentifier, but not all. This point blocks user synchronization with the message:

ERROR [org.geonetwork.security.external.integration] - Error synchronizing groups from orgs

org.springframework.dao.InvalidDataAccessApiUsageException: The given id must not be null!; nested exception is java.lang.IllegalArgumentException: The given id must not be null!

But once the LDAP is corrected, synchronization does not occur because it does not see any difference. It must be forced manually by executing two SQL queries:

Copier
UPDATE geonetwork.group_external_link SET lastupdated='1'; UPDATE geonetwork.user_external_link SET lastupdated='1';

Thanks @Pmauduit :)

2 - For the indexes, it's more complicated. By connecting to the machine, you can list all existing indexes and all mappings:

Copier
curl 'localhost:9200/_cat/indices?v'

The problematic index was gn-records. It returned an HTTP 400 error, but by performing basic manual queries, I had the correct values in the index; the issue was with the mapping:

By comparing with the mapping from another server with the same version of GeoNetwork, some keywords used for sorting were missing.

The mapping was incorrect because it was not using the correct records.json. If you do not set the parameter "geonetwork.indexConfig.dir=${geonetwork.config.dir}/index/" in the georchestra datadir in geonetwork.properties, it uses another records.json, but not the one from the web-app's default data/config/index.

You can verify which one it uses in geonetwork/srv/fre/admin.console#/dashboard/information.

The default one created in /tmp/gn_data/config/index is not the same as the one in the webapp /srv/tomcat/georchestra/webapps/geonetwork/WEB-INF/data/config/index/, and thus not the one from the default georchestra datadir.

I haven't yet investigated where it comes from.

By correcting this configuration, you then need to restart the GeoNetwork service and redo the indexing through the GeoNetwork administration console.

---------------------

Bonjour,
j'ai récemment fait une migration de version geonetwork qui a été un peu compliqué.

Plusieurs points : 

1 - L'annuaire LDAP n'était pas carré, certains éléments avaient des georchestraObjectIdentifier mais pas tous.  Ce point bloque la synchronisation des utilisateurs avec le message : 

ERROR [org.geonetwork.security.external.integration] - Error synchronizing groups from orgs

org.springframework.dao.InvalidDataAccessApiUsageException: The given id must not be null!; nested exception is java.lang.IllegalArgumentException: The given id must not be null!


Mais une fois le ldap corrigé la synchronisation ne se fait pas car il ne voit pas de différence. il faut la forcer à la main en passant deux requêtes SQL : 

UPDATE geonetwork.group_external_link SET lastupdated='1';
UPDATE geonetwork.user_external_link SET lastupdated='1';

Merci @Pmauduit :)

2 - Pour les indexes, c'est plus compliqué, en se connectant sur la machine on peut lister tous les indexes existants et tous les mappings : 

curl 'localhost:9200/_cat/indices?v'

l'index qui posait problème était le gn-records 
il revenait en http 400, mais en réalisant des requêtes de bases à la main j'avais bien les bonnes valeurs dans l'index, le soucis venait du mapping


En comparant avec le mapping d'un autre serveur avec la même version de geonetwork, il manquait des keywords utilisé pour le sort. 

Le mapping n'était pas bon car il n'utilisait pas le bon records.json
Si on ne met pas le paramètre  "geonetwork.indexConfig.dir=${geonetwork.config.dir}/index/   "
dans le datadir georchestra dans geonetwork.properties, il en prend un autre records.json, mais qui n'est pas celui datat/config/index de la web-app par defaut.

On peut vérifier dans geonetwork/srv/fre/admin.console#/dashboard/information celui qu'il prend

Celui par defaut créé dans /tmp/gn_data/config/index n'est pas le même que celui dans 
la webapp /srv/tomcat/georchestra/webapps/geonetwork/WEB-INF/data/config/index/  et du coup pas celui du datadir de georchestra par defaut. 

Je n'ai pas encore cherché d'ou il venait. 

En corrigeant cette configuration, il faut ensuite relancer le service geonetwork et refaire l'indexation par la console d'administration de geonetwork
Reply all
Reply to author
Forward
0 new messages