Set up multinode with postgres/postgis

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Set up multinode with postgres/postgis

Heng, Jiabin - ARS
Hi there,

We recently started to explore using multimode and were having problems with the spatial index in PostGIS database. I am wondering if anyone had the same problem or know what is wrong.

I followed user manual and manually registered the node

<beans default-lazy-init="true"

    <import resource="classpath*:/config-spring-geonetwork.xml"/>
    <import resource="../config-db/database_migration.xml"/>

    <context:property-override properties-ref="newnode-configuration-overrides" />

    <bean id="nodeInfo" class="org.fao.geonet.NodeInfo">
        <property name="id" value="newnode" />
        <property name="defaultNode" value="false" />

   <bean id="newnode-configuration-overrides"
        <property name="properties">
                <prop key="jdbcDataSource.username">username</prop>
                <prop key="jdbcDataSource.password">password</prop>
                <prop key="jdbcDataSource.maxActive">10</prop>
                <prop key="jdbcDataSource.maxIdle">10</prop>
                <prop key="jdbcDataSource.initialSize">10</prop>
                <prop key="jdbcDataSource.Url">jdbc:postgresql_postGIS://localhost:5432/geonetwork_newnode</prop>

    <import resource="../config-db/postgres-postgis.xml"/>

I have different databases ready






After restart geonetwork (version 3.4.2), the new node is running and 60 tables were created in the new database (geonetwork_newnode), but I didn't find the "spatialindex" table.  After spending a lot of time trying to figure out why "spatialindex" was not created in the new database, I finally discovered that the new node is also writing spatial index into the "spatialindex" table in the database for "srv" node (geonetwork DB). Every time a new record is imported on "newnode", it is inserted into "public.metadata" table in geonetwork_newnode DB, but spatial index goes to "public.spatialindex" table in geonetwork DB.

I tried to delete a record on "newnode" to see if its spatial index will be removed from the "srv" database, but found that I couldn't delete any records on "newnode" (while the default "srv" node is working fine), delete request returns 400.
DELETE http://localhost:8080/geonetwork/newnode/api/records/124

{"message":"ObjectOptimisticLockingFailureException","code":"runtime_exception","description":"Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1"}

This may be related to the misplaced spatial index, but I am not sure.
If anyone has any ideas about this issue, we would greatly appreciate it.


Jiabin Heng
Geospatial Information Specialist
Email: [hidden email]<mailto:[hidden email]>

This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
Check out the vibrant tech community on one of the world's most
engaging tech sites,!
GeoNetwork-users mailing list
[hidden email]
GeoNetwork OpenSource is maintained at