[GeoNetwork-users] Issues with postgres two default nodes.

Hi

I have been trying to use postgres with Geonetwork 3.2.0 using the jetty servlet engine that comes with the software.

Geonetwork works fine when I use the default H2 database.

Then when I configure the postgres database I have issues (using the default postgres.xml file)

The database connection works fine as the database is populated with empty tables. So I know it is not the connection. However I get a 503 error when trying to view geonetwork.

Looking at the output logs I notice that it is trying to start two default nodes

First from the output.log

java.lang.IllegalArgumentException: Two nodes where defined as the default. This is not acceptable.
        at jeeves.config.springutil.JeevesContextLoaderListener.contextInitialized(JeevesContextLoaderListe
ner.java:132)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:837)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.jav
a:533)

Then from geonetwork

2016-10-18 15:45:55,876 WARN [geonetwork.databasemigration] - Database does not contain any version information. Check that the database is a GeoNetwork database with data. The database is probably empty, no migration required.
2016-10-18 15:45:56,130 WARN [org.apache.camel.management.DefaultManagementLifecycleStrategy] - This CamelContext(harvest-wfs) will be registered using the name: harvest-wfs-1 due to clash with an existing name already registered in MBeanServer.
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Raised exception during init
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Exception : java.lang.IllegalArgumentException: Two nodes where defined as the default. This is not acceptable.
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Message : Two nodes where defined as the default. This is not acceptable.
2016-10-18 15:45:57,048 FATAL [jeeves.engine] - Stack : java.lang.IllegalArgumentException: Two nodes where defined as the default. This is not acceptable.

Andrew Rae

Hi Andrew

Can you check in the folder geonetwork/WEB-INF/config-node how many files
are there? If there's only a file srv.xml, can you verify that only the
entry related to postgres is un-commented, like this:

  <!-- Uncomment the database configuration you need to use -->
  <!--<import resource="../config-db/h2.xml"/>-->
  <!--<import resource="../config-db/jndi-postgres-postgis.xml"/> -->
  <!--<import resource="../config-db/oracle.xml"/>-->
  <!--<import resource="../config-db/mysql.xml"/> -->
  <!--<import resource="../config-db/db2.xml"/> -->
  *<import resource="../config-db/postgres.xml"/>*
  <!--<import resource="../config-db/sqlserver.xml"/> -->
  <!--<import resource="../config-db/postgres-postgis.xml"/> -->

Regards,
Jose García

On Tue, Oct 18, 2016 at 5:16 AM, Andrew Rae <Andrew.Rae@anonymised.com> wrote:

Hi

I have been trying to use postgres with Geonetwork 3.2.0 using the jetty
servlet engine that comes with the software.

Geonetwork works fine when I use the default H2 database.

Then when I configure the postgres database I have issues (using the
default postgres.xml file)

The database connection works fine as the database is populated with empty
tables. So I know it is not the connection. However I get a 503 error when
trying to view geonetwork.

Looking at the output logs I notice that it is trying to start two default
nodes

First from the output.log

java.lang.IllegalArgumentException: Two nodes where defined as the
default. This is not acceptable.
        at jeeves.config.springutil.JeevesContextLoaderListener.
contextInitialized(JeevesContextLoaderListe
ner.java:132)
        at org.eclipse.jetty.server.handler.ContextHandler.
callContextInitialized(ContextHandler.java:837)
        at org.eclipse.jetty.servlet.ServletContextHandler.
callContextInitialized(ServletContextHandler.jav
a:533)

Then from geonetwork

2016-10-18 15:45:55,876 WARN [geonetwork.databasemigration] -
Database does not contain any version information. Check that the database
is a GeoNetwork database with data. The database is probably empty, no
migration required.
2016-10-18 15:45:56,130 WARN [org.apache.camel.management.
DefaultManagementLifecycleStrategy] - This CamelContext(harvest-wfs) will
be registered using the name: harvest-wfs-1 due to clash with an existing
name already registered in MBeanServer.
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Raised exception during
init
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Exception : java.lang.IllegalArgumentException:
Two nodes where defined as the default. This is not acceptable.
2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Message : Two nodes
where defined as the default. This is not acceptable.
2016-10-18 15:45:57,048 FATAL [jeeves.engine] - Stack : java.lang.IllegalArgumentException:
Two nodes where defined as the default. This is not acceptable.

Andrew Rae
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv&gt;
<https://twitter.com/geocat_bv&gt;
<https://plus.google.com/u/1/+GeocatNetbv/posts&gt;Please consider the
environment before printing this email.*

Hi,

" Two nodes where defined as the default. This is not acceptable." is
pretty clear, you can't have more than one default node. See
https://github.com/geonetwork/core-geonetwork/blob/develop/web/src/main/webapp/WEB-INF/config-node/srv.xml#L36.
In the doc "Only one default node is allowed." See
http://geonetwork-opensource.org/manuals/trunk/eng/users/maintainer-guide/installing/using-multinode-mode.html

Maybe we should only log a warning and use the first default node and
continue.

HTH.

Francois

2016-10-18 8:04 GMT+02:00 Jose Garcia <jose.garcia@anonymised.com>:

Hi Andrew

Can you check in the folder geonetwork/WEB-INF/config-node how many files
are there? If there's only a file srv.xml, can you verify that only the
entry related to postgres is un-commented, like this:

  <!-- Uncomment the database configuration you need to use -->
  <!--<import resource="../config-db/h2.xml"/>-->
  <!--<import resource="../config-db/jndi-postgres-postgis.xml"/> -->
  <!--<import resource="../config-db/oracle.xml"/>-->
  <!--<import resource="../config-db/mysql.xml"/> -->
  <!--<import resource="../config-db/db2.xml"/> -->
  *<import resource="../config-db/postgres.xml"/>*
  <!--<import resource="../config-db/sqlserver.xml"/> -->
  <!--<import resource="../config-db/postgres-postgis.xml"/> -->

Regards,
Jose García

On Tue, Oct 18, 2016 at 5:16 AM, Andrew Rae <Andrew.Rae@anonymised.com> wrote:

> Hi
>
> I have been trying to use postgres with Geonetwork 3.2.0 using the jetty
> servlet engine that comes with the software.
>
>
> Geonetwork works fine when I use the default H2 database.
>
> Then when I configure the postgres database I have issues (using the
> default postgres.xml file)
>
>
> The database connection works fine as the database is populated with
empty
> tables. So I know it is not the connection. However I get a 503 error
when
> trying to view geonetwork.
>
>
> Looking at the output logs I notice that it is trying to start two
default
> nodes
>
>
> First from the output.log
>
> java.lang.IllegalArgumentException: Two nodes where defined as the
> default. This is not acceptable.
> at jeeves.config.springutil.JeevesContextLoaderListener.
> contextInitialized(JeevesContextLoaderListe
> ner.java:132)
> at org.eclipse.jetty.server.handler.ContextHandler.
> callContextInitialized(ContextHandler.java:837)
> at org.eclipse.jetty.servlet.ServletContextHandler.
> callContextInitialized(ServletContextHandler.jav
> a:533)
>
>
> Then from geonetwork
>
> 2016-10-18 15:45:55,876 WARN [geonetwork.databasemigration] -
> Database does not contain any version information. Check that the
database
> is a GeoNetwork database with data. The database is probably empty, no
> migration required.
> 2016-10-18 15:45:56,130 WARN [org.apache.camel.management.
> DefaultManagementLifecycleStrategy] - This CamelContext(harvest-wfs)
will
> be registered using the name: harvest-wfs-1 due to clash with an existing
> name already registered in MBeanServer.
> 2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Raised exception during
> init
> 2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Exception : java.lang.
IllegalArgumentException:
> Two nodes where defined as the default. This is not acceptable.
> 2016-10-18 15:45:57,047 FATAL [jeeves.engine] - Message : Two nodes
> where defined as the default. This is not acceptable.
> 2016-10-18 15:45:57,048 FATAL [jeeves.engine] - Stack : java.lang.
IllegalArgumentException:
> Two nodes where defined as the default. This is not acceptable.
>
> Andrew Rae
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at http://sourceforge.net/
> projects/geonetwork
>

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv&gt;
<https://twitter.com/geocat_bv&gt;
<https://plus.google.com/u/1/+GeocatNetbv/posts&gt;Please consider the
environment before printing this email.*
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork