Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

Need help with Esri Geoportalserver #240

Closed Ahlix closed 7 years ago

Ahlix commented 8 years ago

Hallo, please excuse my bad English. I installed geoportal server 1.2.7 following the tutorial - installationguide. I'm using Windows server 2012 r2, Apache Tomcat 8 and postgresql 9.4. After some problems with authentication via simple-adapter, geoportal is now up and running. I can login as "gptuser" and there is also the administration tab. Clicking the admininistration tab, an error message is shown "Unable to open connection für jndiName: jdpc/postgres (connectionTag=)" Sorry, I'm absolute beginner and have no experiences in this stuff. I added a couple of jdbc-drivers for postgresql in the tomcats lib folder and the "log" shows no driver problems. I configured the pg_hba.conf and gave access-permissions to everybody from evereywhere, also added my computers IPv4. I also configured the geoportal.xml as shown in the installation guide:

Has anybody any tips or information, what's going wrong??

Thanks a lot

gcampanile commented 8 years ago

Hi Ahlix, the connection can not be established, and the reason could be the driver or the user/password not correct. What I suggest is to download a simple DB client like DBVisualizer (the free version is largely sufficient) and use the jdbc diver you installed in the tomcat/lib directory and the credential you set in the conf file. If the connection can not be established than you should be able to get more detailed information.

Gianni

Ahlix commented 8 years ago

Hi Gianni,

thank you very much for your prompt answer!! I will try this.

Greetz Ahlix

Ahlix commented 8 years ago

Hi Gianni,

I installed DBVisualizer, tested the connection with user 'geoportal' and password 'geoportal' and the jdbc-driver used in the tomcat/lib directory - connection was successfully established, no errors reported. Joining the geoportal, administration tab - still the same message.... :( any other ideas? can there be an error in the gpt.xml?

``` ``` Is this correct? The install instrucktion said, not to change this and leave as default, but the name of database is postgres, isn't it? I'm really confused. :(
gcampanile commented 8 years ago

The line on the gpt.xml should be:

In the \conf\Catalina\localhost directory there should be a file with the same name of your webapp, for example geoportal.xml. The file should be like this:

If you are still in troubles, raise the log level in /geoportal/WEB-INF/logging.properties, set it to FINEST. Stop Tomcat, empty the logs directory, restart tomcat, try the webapp and then check the log.

Ahlix commented 8 years ago

ok, done. the geoportal.xml is exactly with the same information. changed level in logging.properties to FINEST. stopped tomcat, cleared logs directory and restarted. same error-message. which log file contains interesting informations?

Ahlix commented 8 years ago

in the catalina.log I have lots of warnings like this:

11-Aug-2016 14:50:13.286 WARNING [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\geoportal inside the host appBase has been specified, and will be ignored 11-Aug-2016 14:50:13.302 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property. 11-Aug-2016 14:50:14.333 WARNING [localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/gpt/metadata/fgdc/v1.2/fgdc-details.xslt] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache 11-Aug-2016 14:50:14.333 WARNING [localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/gpt/metadata/iso/iso-19115-2-template.xml] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

gcampanile commented 8 years ago

the name of the log file is in the logging.properties file, usually is gpt.log or gpt..log

gcampanile commented 8 years ago

None of the messages are related to the database, they are warnings for the cache space

Ahlix commented 8 years ago

oh ok. sorry the gpt.log is full of information. :-O

Ahlix commented 8 years ago

11-Aug-2016 14:50:42.313 SEVERE [http-nio-8080-exec-7] com.esri.gpt.framework.jsf.BaseActionListener.handleException Exception raised. com.esri.gpt.framework.context.ConfigurationException: Unable to open connection for jndiName: jdbc/postgres (connectionTag=)

Caused by: javax.naming.NameNotFoundException: Name [postgres] is not bound in this Context. Unable to find [postgres].

It doesn't find the database, right? but why? :-(

gcampanile commented 8 years ago

IN my previous reply a part was stripped away, sorry for this.

In gpt.xml the line should be
<databaseReference name="gpt" jndiName="jdbc/gpt"/> instead of <databaseReference name="gpt" jndiName="jdbc/postgres"/>

Ahlix commented 8 years ago

what instead of what? sorry, too

gcampanile commented 8 years ago

IN my previous reply a part was stripped away, sorry for this.

In gpt.xml the line should be

<databaseReference name="gpt" jndiName="jdbc/gpt"/> instead of <databaseReference name="gpt" jndiName="jdbc/postgres"/>

put gpt in place of postgres