Esri/geoportal-server-harvester

trouble with deploying harvester--broker definition database???

Closed this issue · 2 comments

I got the v2.5.1 release war and deployed it to tomcat 8.0.48 on an Amazon VM CentOS 7.3.
the App starts OK, and web page opens http://52.54.48.218:8080/harvester/, when I try to create a broker (input or output), the dialog opens, I fill it out; when I click submit, nothing happens, and a red text message appears in the title bar 'error creating broker'.
In the hrv.2018-01-21.log file, I see:
INFO [http-nio-8080-exec-27] com.esri.geoportal.harvester.beans.BrokerDefinitionManagerBean.init Error initializing broker definition database org.h2.jdbc.JdbcSQLException: IO Exception: null [90028-196] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) ... Caused by: java.lang.IllegalStateException: Could not open file nio:/opt/tomcat/harvester.mv.db [1.4.196/1]
and similar message for 'trigger definition database' and 'task database' when the harvester context is loading. I don't see any /opt/tomcat/harvester.mv.db file, and never had this problem with my other harvester deployment on a CentOS 7.3 VM running at Linode.

Then when I'm trying to save the new broker, the problem 'Error creating broker definition', again
Caused by: java.lang.IllegalStateException: Could not open file nio:/opt/tomcat/harvester.mv.db [1.4.196/1]

Any thoughts on what is going on?

  1. Process running Tomcat must have r-w access rights to /opt/tomcat folder,
  2. You could set 'jdbc.url' value in 'hrv.properties' file to jdbc:h2: where absolute path points to a folder you are certain the Tomcat process has r-w rights.

Thanks. I set permissions on /opt/tomcat to 777, and also changed the status on SELinux from 'enforced' to 'permissive'. Harvester now works. I'll have to fine-tune the access controls when I go to production. The CentOS 7 distros apparently start with SELinux directive set to 'enforced'; caused me trouble with another VM I'm setting up today as well.