GeoNetwork with PostGIS - configuration problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GeoNetwork with PostGIS - configuration problem

KevinG
Hello,
I've researched and read various methods and documents to configure GeoNetwork with a PostGIS database, but I still routinely get the following error on startup:

HTTP Status 404 - /geonetwork
type Status report
message /geonetwork
description The requested resource is not available.

I've modified the following files to use my database:
/opt/tomcat/apache-tomcat-8.5.5/webapps/geonetwork/WEB-INF/jetty-env.xml
--code snippet--
<Arg>jdbc/geonetwork</Arg>
    <Arg>
      <New class="org.apache.commons.dbcp.BasicDataSource">
        <Set name="driverClassName">org.postgis.DriverWrapper</Set>
        <Set name="url">jdbc:postgresql_postGIS://localhost:5432/my_db</Set>
        <Set name="username">myusername</Set>
        <Set name="password">mypassword</Set>
        <Set name="validationQuery">SELECT 1</Set>
        <Set name="maxActive">10</Set>
        <Set name="maxIdle">10</Set>
        <Set name="removeAbandoned">true</Set>
        <Set name="removeAbandonedTimeout">3600</Set>
        <Set name="logAbandoned">true</Set>
        <Set name="testOnBorrow">true</Set>
        <Set name="defaultAutoCommit">false</Set>
        <Set name="defaultTransactionIsolation">2</Set>
        <Set name="accessToUnderlyingConnectionAllowed">true</Set>
      </New>
    </Arg>

/opt/tomcat/apache-tomcat-8.5.5/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
--code snippet--
jdbc.username=myusername
jdbc.password=mypassword
jdbc.database=my_db
jdbc.host=localhost
jdbc.port=5432
jdbc.basic.removeAbandoned=true
jdbc.basic.removeAbandonedTimeout=120
jdbc.basic.logAbandoned=true
jdbc.basic.maxActive=33
jdbc.basic.maxIdle=${jdbc.basic.maxActive}
jdbc.basic.initialSize=${jdbc.basic.maxActive}
jdbc.basic.maxWait=200
jdbc.basic.testOnBorrow=true
jdbc.basic.timeBetweenEvictionRunsMillis=10000
jdbc.basic.minEvictableIdleTimeMillis=1800000
jdbc.basic.testWhileIdle=true
jdbc.basic.numTestsPerEvictionRun=3
jdbc.basic.poolPreparedStatements=true
jdbc.basic.maxOpenPreparedStatements=1200
jdbc.basic.validationQuery=SELECT 1
jdbc.basic.defaultReadOnly=false
jdbc.basic.defaultAutoCommit=false

/opt/tomcat/apache-tomcat-8.5.5/webapps/geonetwork/WEB-INF/config-node/srv.xml
--code snippet--
 
   
 
 
 
 
 
  <import resource="../config-db/postgres-postgis.xml"/>


Even if I revert back to the original versions of these files and restart the server, I still receive the 404 error.  

Can anybody shed some light on this?
Maybe additional configuration is needed on the PostGIS database side to allow for PostGIS connection?
Thanks, Kevin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GeoNetwork with PostGIS - configuration problem

amacar
Did you set database name in config-spring-geonetwork?

<!-- If a specific schema has to be used
<entry key="hibernate.default_schema" value="catalog"/> -->
<entry key="hibernate.default_schema" value="DATABASE_NAME"/>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GeoNetwork with PostGIS - configuration problem

KevinG
Thanks for the suggestion amacar.  
I had not made that change.  However, after doing so and restarting Tomcat, I was still left with the 404 error.  

I forgot to mention that I'm using: GN v3.2.1 with PostGIS 2.3.1
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GeoNetwork with PostGIS - configuration problem

zer0mode
Hi Kevin,
have you resolved this by any chance ?

What was the error output in the geonetwork.log file ? I have quite a similar issue - here is the post : http://osgeo-org.1560.x6.nabble.com/Trying-to-connect-GN-with-postgresql-srv-xml-has-an-illegal-name-Node-names-must-be-of-the-form-a-zA-tp5322253.html

Thanks for the reply if you see this.
Cheers!

Loading...