[Geoserver-users] Datastore "connection parameters invalid" with PostGIS

Hi Folks,

I’m a newbie here, trying to get Geoserver 1.6.4 working over PostGIS 1.3.3.1 through Tomcat in a Fedora environment. I did a local trial run with my windows PC with no problems, and now I’m trying to go operational on a Linux box.

Twice, I have re-installed the entire system in attempts to solve the following problem. I can define and load a datastore once and it works, but when I try and define another datastore (after removing the first) I get a “connection parameters are invalid” message.

I have verified that Geoserver works (I can load any of the regularly included datasets) and I have verified that the data exists in the PostGIS database using QuantumGIS to preview the data.

What’s keeping Geoserver from connecting to my backend database? I read something about JDBC driver referencing being a problem, but can’t find any more useful info on a fix. I’m also confused about why the problem doesn’t manifest on the first datastore, but cripples the system thereafter.

Thanks,
Damian

Damian_Bradley@anonymised.com ha scritto:

Hi Folks,

I'm a newbie here, trying to get Geoserver 1.6.4 working over PostGIS 1.3.3.1 through Tomcat in a Fedora environment. I did a local trial run with my windows PC with no problems, and now I'm trying to go operational on a Linux box.

Twice, I have re-installed the entire system in attempts to solve the following problem. I can define and load a datastore once and it works, but when I try and define another datastore (after removing the first) I get a "connection parameters are invalid" message.

I have verified that Geoserver works (I can load any of the regularly included datasets) and I have verified that the data exists in the PostGIS database using QuantumGIS to preview the data.

What's keeping Geoserver from connecting to my backend database?

Quantum GIS will use local socket connections, whilst any java based application will have to use TCP/IP ones, which have to be enabled
in the configuration files. More information here:
http://jdbc.postgresql.org/documentation/83/prepare.html

Cheers
Andrea

I’ve set the listen_address in postgresql.conf to ’ * ’ and removed the comments from other tcp/ip settings in that section. pg_hba.conf has localhost and 127.0.0.1 set to “trust”. I’m still getting the “connection parameters are invalid” line. Geoserver and the back-end are on the same box, should I not be using “localhost” to connect geoserver to the database?

Are there any tests can I do to better diagnose the problem?

Thanks for the continued help and patience.
Damian

Andrea Aime aaime@anonymised.com

07/16/2008 05:47 PM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

Damian_Bradley@anonymised.com ha scritto:
>
> Hi Folks,
>
> I'm a newbie here, trying to get Geoserver 1.6.4 working over PostGIS
> 1.3.3.1 through Tomcat in a Fedora environment. I did a local trial run
> with my windows PC with no problems, and now I'm trying to go
> operational on a Linux box.
>
> Twice, I have re-installed the entire system in attempts to solve the
> following problem. I can define and load a datastore once and it works,
> but when I try and define another datastore (after removing the first) I
> get a "connection parameters are invalid" message.
>
> I have verified that Geoserver works (I can load any of the regularly
> included datasets) and I have verified that the data exists in the
> PostGIS database using QuantumGIS to preview the data.
>
> What's keeping Geoserver from connecting to my backend database?

Quantum GIS will use local socket connections, whilst any java based
application will have to use TCP/IP ones, which have to be enabled
in the configuration files. More information here:
http://jdbc.postgresql.org/documentation/83/prepare.html

Cheers
Andrea

Damian_Bradley@anonymised.com ha scritto:

I've set the listen_address in postgresql.conf to ' * ' and removed the comments from other tcp/ip settings in that section. pg_hba.conf has localhost and 127.0.0.1 set to "trust". I'm still getting the "connection parameters are invalid" line. Geoserver and the back-end are on the same box, should I not be using "localhost" to connect geoserver to the database?

Are there any tests can I do to better diagnose the problem?

Thanks for the continued help and patience.

Hum, look into the $GEOSERVER_DATA_DIR/geoserver/logs/geoserver.log
for java stack traces, that should give us some hint on what is wrong.

Cheers
Andrea

Andrea et al,

Here is the error I’m getting in the geoserver.log file:


2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS spatial database:org.geotools.data.DataSourceException: Connection test failed
org.geotools.data.DataSourceException: Connection test failed
at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)
at org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)
at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)
at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut

and so on…

Any thoughts?

I’m trying to understand…when Geoserver says “Connection Parameters are Invalid” does that mean that values of the variables being passed by the input fields are incorrect, or that the variables themselves are not being passed properly?

Continued thanks,
Damian Bradley

>Hum, look into the $GEOSERVER_DATA_DIR/geoserver/logs/geoserver.log
>for java stack traces, that should give us some hint on what is wrong.

>Cheers
>Andrea

Damian,

that usually means that the connection parameters you are supplying are not working. Note that GeoServer uses TCP , not UNIX sockets, to connect. Try connecting to the database manually from the machine that runs geoserver:

psql -U <username supplied to geoserver> -d <databasename supplied to geoserver> -h <server name supplied to geoserver, 127.0.0.1 if it's localhost>

-Arne

Damian_Bradley@anonymised.com wrote:

Andrea et al,

Here is the error I'm getting in the geoserver.log file:

---------
2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS spatial database:org.geotools.data.DataSourceException: Connection test failed
org.geotools.data.DataSourceException: Connection test failed
        at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)

        at org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)

        at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)

        at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
        at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)

        at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)

        at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
---------
and so on....

Any thoughts?

I'm trying to understand...when Geoserver says "Connection Parameters are Invalid" does that mean that values of the variables being passed by the input fields are incorrect, or that the variables themselves are not being passed properly?

Continued thanks,
Damian Bradley

>Hum, look into the $GEOSERVER_DATA_DIR/geoserver/logs/geoserver.log
>for java stack traces, that should give us some hint on what is wrong.

>Cheers
>Andrea

!DSPAM:4038,4884d9ee258782092453641!
------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

!DSPAM:4038,4884d9ee258782092453641!
  ------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4038,4884d9ee258782092453641!
  

Arne,

I’m able to connect manually from the linux box running Geoserver with the same parameters I have entered in the Geoserver input fields:

“psql -U postgres -d RHLdb2 -h 127.0.0.1”

Any thoughts on a next step?

Damian

Arne Kepp ak@anonymised.com

07/21/2008 02:58 PM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

Damian,

that usually means that the connection parameters you are supplying are
not working. Note that GeoServer uses TCP , not UNIX sockets, to
connect. Try connecting to the database manually from the machine that
runs geoserver:

psql -U <username supplied to geoserver> -d <databasename supplied to
geoserver> -h <server name supplied to geoserver, 127.0.0.1 if it's
localhost>

-Arne

Damian_Bradley@anonymised.com wrote:
>
> Andrea et al,
>
> Here is the error I'm getting in the geoserver.log file:
>
> ---------
> 2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire
> PostGIS spatial database:org.geotools.data.DataSourceException:
> Connection test failed
> org.geotools.data.DataSourceException: Connection test failed
> at
> org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)
>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)
>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)
>
> at
> org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
> at
> org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
>
> at
> org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
>
> at
> org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
> ---------
> and so on....
>
> Any thoughts?
>
> I'm trying to understand...when Geoserver says "Connection Parameters
> are Invalid" does that mean that values of the variables being passed
> by the input fields are incorrect, or that the variables themselves
> are not being passed properly?
>
> Continued thanks,
> Damian Bradley
>
>
>
> >Hum, look into the $GEOSERVER_DATA_DIR/geoserver/logs/geoserver.log
> >for java stack traces, that should give us some hint on what is wrong.
>
> >Cheers
> >Andrea
>
> !DSPAM:4038,4884d9ee258782092453641!
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> !DSPAM:4038,4884d9ee258782092453641!
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> !DSPAM:4038,4884d9ee258782092453641!
>

I'm drawing blank, it could be an indentd thing or something.

Can you
1) Show us your pg_hba.conf
2) Enable log_connections (see http://www.postgresql.org/docs/current/static/runtime-config-logging.html) and look into those logs.
?

-Arne

Damian_Bradley@anonymised.com wrote:

Arne,

I'm able to connect manually from the linux box running Geoserver with the same parameters I have entered in the Geoserver input fields:

"psql -U postgres -d RHLdb2 -h 127.0.0.1"

Any thoughts on a next step?

Damian

*Arne Kepp <ak@anonymised.com>*

07/21/2008 02:58 PM

To
  Damian_Bradley@anonymised.com
cc
  geoserver-users@lists.sourceforge.net
Subject
  Re: [Geoserver-users] Datastore "connection parameters invalid" with PostGIS

Damian,

that usually means that the connection parameters you are supplying are
not working. Note that GeoServer uses TCP , not UNIX sockets, to
connect. Try connecting to the database manually from the machine that
runs geoserver:

psql -U <username supplied to geoserver> -d <databasename supplied to
geoserver> -h <server name supplied to geoserver, 127.0.0.1 if it's
localhost>

-Arne

Damian_Bradley@anonymised.com wrote:
>
> Andrea et al,
>
> Here is the error I'm getting in the geoserver.log file:
>
> ---------
> 2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire
> PostGIS spatial database:org.geotools.data.DataSourceException:
> Connection test failed
> org.geotools.data.DataSourceException: Connection test failed
> at
> org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)

>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)

>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)

>
> at
> org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
> at
> org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)

>
> at
> org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)

>
> at
> org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
> ---------
> and so on....
>
> Any thoughts?
>
> I'm trying to understand...when Geoserver says "Connection Parameters
> are Invalid" does that mean that values of the variables being passed
> by the input fields are incorrect, or that the variables themselves
> are not being passed properly?
>
> Continued thanks,
> Damian Bradley
>
> >Hum, look into the $GEOSERVER_DATA_DIR/geoserver/logs/geoserver.log
> >for java stack traces, that should give us some hint on what is wrong.
>
> >Cheers
> >Andrea
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> !DSPAM:4038,4884d9ee258782092453641!
> > ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4038,4884d9ee258782092453641!
>

!DSPAM:4038,4884dee7269841030819293!

Arne,

Here’s my pg_hba.conf:


TYPE DATABASE USER CIDR-ADDRESS METHOD

“local” is for Unix domain socket connections only

local all all trust

IPv4 local connections:

host all all 127.0.0.1/32 trust
host all all 69.89.109.26/32 trust

IPv6 local connections:

#host all all 0.0.0.0/0 trust
hostssl all all localhost trust

In the mean time I will figure out the logging and see if I can dig up some more error messages…

Thanks,
Damian Bradley

Arne Kepp ak@anonymised.com

07/21/2008 11:27 PM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

I'm drawing blank, it could be an indentd thing or something.

Can you
1) Show us your pg_hba.conf
2) Enable log_connections (see
http://www.postgresql.org/docs/current/static/runtime-config-logging.html)
and look into those logs.
?

-Arne

Damian_Bradley@anonymised.com wrote:
>
> Arne,
>
> I'm able to connect manually from the linux box running Geoserver with
> the same parameters I have entered in the Geoserver input fields:
>
> "psql -U postgres -d RHLdb2 -h 127.0.0.1"
>
> Any thoughts on a next step?
>
> Damian
>
>
>
>
> *Arne Kepp <ak@anonymised.com>*
>
> 07/21/2008 02:58 PM
>
>
> To
> Damian_Bradley@anonymised.com
> cc
> geoserver-users@lists.sourceforge.net
> Subject
> Re: [Geoserver-users] Datastore "connection parameters invalid" with
> PostGIS
>
>
>
>
>
>
>
>
>
> Damian,
>
> that usually means that the connection parameters you are supplying are
> not working. Note that GeoServer uses TCP , not UNIX sockets, to
> connect. Try connecting to the database manually from the machine that
> runs geoserver:
>
> psql -U <username supplied to geoserver> -d <databasename supplied to
> geoserver> -h <server name supplied to geoserver, 127.0.0.1 if it's
> localhost>
>
> -Arne
>
>
> Damian_Bradley@anonymised.com wrote:
> >
> > Andrea et al,
> >
> > Here is the error I'm getting in the geoserver.log file:
> >
> > ---------
> > 2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire
> > PostGIS spatial database:org.geotools.data.DataSourceException:
> > Connection test failed
> > org.geotools.data.DataSourceException: Connection test failed
> > at
> >
> org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)
>
> >
> > at
> >
> org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)
>
> >
> > at
> >
> org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)
>
> >
> > at
> > org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
> > at
> >
> org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
>
> >
> > at
> >
> org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
>
> >
> > at
> > org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
> > ---------
> > and so on....

Damian_Bradley@anonymised.com ha scritto:

Andrea et al,

Here is the error I'm getting in the geoserver.log file:

---------
2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS spatial database:org.geotools.data.DataSourceException: Connection test failed
org.geotools.data.DataSourceException: Connection test failed
        at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)

        at org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)

        at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)

        at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
        at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
        at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)

        at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
---------
and so on....

It's the "so on" part that might contain the interesting bits.
Can you past the whole stack trace?

Cheers
Andrea

Andrea,

I’m happy to post the full log, see below. Thanks!


2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS spatial database:org.geotools.data.DataSourceException: Connection test failed
org.geotools.data.DataSourceException: Connection test failed
at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)
at org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)
at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)
at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execute(DataDataStoresEditorAction.java:134)
at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:170)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)
at java.util.Timer.schedule(Timer.java:222)
at org.apache.commons.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1077)
at org.apache.commons.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:652)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:120)
… 61 more
2008-07-21 14:29:06,322 INFO [geoserver.filters] - Compressing output for mimetype: text/html;charset=UTF-8
2008-07-21 14:29:06,322 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,323 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,323 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,325 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,325 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,326 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,326 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,327 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: https://10.1.0.177/geoserver/config/data/storeSubmit.do
2008-07-21 14:29:06,626 INFO [geoserver.filters] - Not compressing output for mimetype: image/gif

Cheers,
Damian Bradley

Andrea Aime aaime@anonymised.com

07/27/2008 11:47 AM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

Damian_Bradley@anonymised.com ha scritto:
>
> Andrea et al,
>
> Here is the error I'm getting in the geoserver.log file:
>
> ---------
> 2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS
> spatial database:org.geotools.data.DataSourceException: Connection test
> failed
> org.geotools.data.DataSourceException: Connection test failed
> at
> org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)
>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)
>
> at
> org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)
>
> at
> org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
> at
> org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
> at
> org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
>
> at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execut
> ---------
> and so on....

It's the "so on" part that might contain the interesting bits.
Can you past the whole stack trace?

Cheers
Andrea

Damian_Bradley@anonymised.com ha scritto:

Andrea,

I'm happy to post the full log, see below. Thanks!

--------------
2008-07-21 14:29:06,319 WARN [geotools.data] - Could not acquire PostGIS spatial database:org.geotools.data.DataSourceException: Connection test failed
org.geotools.data.DataSourceException: Connection test failed
        at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:122)

        at org.geotools.data.postgis.PostgisDataStoreFactory.getDefaultDataSource(PostgisDataStoreFactory.java:216)

        at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:193)

        at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
        at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
        at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)

        at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execute(DataDataStoresEditorAction.java:134)

        at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:170)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)

        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)

        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)

        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)

        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: Timer already cancelled.
        at java.util.Timer.sched(Timer.java:354)
        at java.util.Timer.schedule(Timer.java:222)
        at org.apache.commons.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1077)

        at org.apache.commons.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:652)

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173)

        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

        at org.geotools.data.jdbc.datasource.DataSourceUtil.buildDefaultDataSource(DataSourceUtil.java:120)

Mumble, never seen this error, very odd, what's more strange, a Google search does not turn out any result.
Wondering, you said you're on Fedora. Are you by any chance using a non Sun jdk, such as IcedTea, gcj or OpenJDK?
GeoServer won't run properly on any of them.
Cheers
Andrea

Andrea,

Hmmm. Confirmed we’re using the Sun jdk. I don’t know where the errors should point us…I wonder if it could be a Tomcat issue or possibly TCP port security settings… ? Stabbing in the dark here…

Thanks again,
Damian

Andrea Aime aaime@anonymised.com

07/29/2008 09:09 AM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

Mumble, never seen this error, very odd, what's more strange, a Google
search does not turn out any result.
Wondering, you said you're on Fedora. Are you by any chance using a non
Sun jdk, such as IcedTea, gcj or OpenJDK?
GeoServer won't run properly on any of them.
Cheers
Andrea

Andrea and co,

After doing switching to a Windows Server 2003 environment to rule out a linux config based problem, I setup two versions of geoserver, one from the latest WAR package in which was deployed in Tomcat, and one which was running by itself under a standard windows install.

The Tomcat deployment results in the “connection parameters invalid” message, while the standard geoserver install functions perfectly. Long story short, it would appear to be some problem with Apache Tomcat, and its interface with Geoserver in both Linux and Windows environments. I am no closer to a solution, but it’s good to know where the problem persists.

Thanks,
Damian Bradley

Andrea Aime aaime@anonymised.com

07/29/2008 09:09 AM

To
Damian_Bradley@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
Re: [Geoserver-users] Datastore “connection parameters invalid” with PostGIS

Mumble, never seen this error, very odd, what's more strange, a Google
search does not turn out any result.
Wondering, you said you're on Fedora. Are you by any chance using a non
Sun jdk, such as IcedTea, gcj or OpenJDK?
GeoServer won't run properly on any of them.
Cheers
Andrea