[GeoNetwork-devel] [severe bug] Multinode broken on develop (and probably 3.0.x)

Hi,

Some recent (last month and a half, probably less) commit have broken
the multinode configuration. I am pretty sure this worked on previous
versions, because we are using this on a working project. This is
quite severe, because data from different nodes will be mixed or even
worse!!!

To test this: take a develop branch GeoNetwork. Set up two nodes in
web.xml. I know that web.xml says that you have to duplicate the
gn-servlet, but that's not true, you have to duplicate the spring
servlet. Also, duplicate the config-node, but make sure you configure
different databases for each node (for example, postgres and h2, or
two different postgres databases, it doesn't matter).

Also, I noticed that now you cannot log in one node and at the same
time log in another node. That's also new, right? Should it be this
way? Why?

Now set up a GeoNetwork harvester to harvest from the second node to
the default node. Run it. It will break very badly.

Why? Because when it search for the metadata to check if it has to
insert or update, it does it on the wrong database! So it gets an id
and update the metadata instead of creating it on the database.
Haven't checked if also the update is run on the wrong database, but
probably it does.

Does someone has any idea what can have broken this? I am trying to
debug where the database connection is wrongly assigned, but it is a
very long trace, so if someone can give me a hint...

Thanks,
María.

Hola Maria,

···

2015-07-15 10:51 GMT+02:00 María Arias de Reyna <delawen@anonymised.com>:

Hi,

Some recent (last month and a half, probably less) commit have broken
the multinode configuration. I am pretty sure this worked on previous
versions, because we are using this on a working project. This is
quite severe, because data from different nodes will be mixed or even
worse!!!

Not sure about develop, but I tested 3.0.1 and was working fine. I think main issues were fixed by Jesse in https://github.com/geonetwork/core-geonetwork/pull/945, but maybe other issue remains.

To test this: take a develop branch GeoNetwork. Set up two nodes in
web.xml. I know that web.xml says that you have to duplicate the
gn-servlet, but that’s not true, you have to duplicate the spring
servlet.

Yes. I updated the doc https://github.com/geonetwork/doc/commit/13ade5367fce172830350c1de18deab86a7ba972 and fix the utility
https://github.com/geonetwork/core-geonetwork/commit/bbe7aeb7a43946145b4d0e3a9f243a7f42f60ce3

Also, duplicate the config-node, but make sure you configure
different databases for each node (for example, postgres and h2, or
two different postgres databases, it doesn’t matter).

Also, I noticed that now you cannot log in one node and at the same
time log in another node. That’s also new, right?

No. See http://geonetwork-opensource.org/manuals/trunk/eng/users/maintainer-guide/installing/using-multinode-mode.html#overview

Should it be this
way? Why?

Only one session is allowed. You need 2 different browsers to connect to more than one node.

Now set up a GeoNetwork harvester to harvest from the second node to
the default node. Run it. It will break very badly.

I’ve it working on 3.0.1, when newnode harvest srv. What is the exception ?

Why? Because when it search for the metadata to check if it has to
insert or update, it does it on the wrong database! So it gets an id
and update the metadata instead of creating it on the database.
Haven’t checked if also the update is run on the wrong database, but
probably it does.

When you import template & samples in one node, it does it in the 2 ? or simply changing node name works ?

Francois

Does someone has any idea what can have broken this? I am trying to
debug where the database connection is wrongly assigned, but it is a
very long trace, so if someone can give me a hint…

Thanks,
María.