Daniele,
I was able to resolve this, it turned out to be an issue with amazon EC2 not
properly setting the hostname of my virtual instance. Even though H2 was
configured with localhost, since the hostname of my EC2 instance could not be
resolved, all H2 connections would timeout and fail. Fixing the hostname issue
made H2 and the rest of Geoserver work again.
Steve
From: [email protected] [mailto:[email protected]] On Behalf Of
Daniele Romagnoli
Sent: Monday, January 11, 2016 3:34 AM
To: Ferguson, Steve -FS <[email protected]>
Cc: [email protected]
Subject: Re: [Geoserver-users] H2 for NETCDF stores suddenly no longer
functional : Exception opening port H2 TCP Server (tcp://localhost:50683) (port
may be in use), cause: timeout [90061-119]
Hi Steve,
I'll take a look at the code you mentioned in your logs.
Is there any way to replicate the problem so I can do some debug?
Do you also have a chance to repeat your test with higher logging level?
Please, let us know.
Best Regards,
Daniele
On Mon, Jan 4, 2016 at 8:03 PM, Ferguson, Steve -FS
<[email protected]<mailto:[email protected]>> wrote:
All,
I am working with the latest version of geoserver and have been having pretty
good success with NETCDF stores and image mosaics backed by NETCDF – until
last week. All of a sudden, any operation involving NETCDF stores results in
the following error. The port number seems to change with each restart, and
prior to startup the port number it says is in use is NOT in use, so it is
geoserver itself which is using the port. I am hosting my server in amazon EC2
and some security updates were recently applied, but I am can imagine why that
would have an impact on localhost tcp connections. Any advice would be greatly
appreciated.
04 Jan 18:07:41 WARN [netcdf.NetCDFFormat] - Unable to connect
org.geotools.data.DataSourceException: Unable to connect
at
org.geotools.coverage.io.netcdf.NetCDFReader.<init>(NetCDFReader.java:159)
at
org.geotools.coverage.io.netcdf.NetCDFFormat.getReader(NetCDFFormat.java:95)
at
org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1441)
…
Caused by: org.geotools.data.DataSourceException: java.io.IOException:
java.lang.IllegalArgumentException: java.lang.RuntimeException: Unable to
obtain connection: Cannot create PoolableConnectionFactory (Exception opening
port H2 TCP Server (tcp://localhost:50683) (port may be in use), cause: timeout
[90061-119])
at
org.geotools.coverage.io.netcdf.NetCDFAccess.<init>(NetCDFAccess.java:126)
at
org.geotools.coverage.io.netcdf.NetCDFDriver.connect(NetCDFDriver.java:92)
at
org.geotools.coverage.io.impl.DefaultFileDriver.process(DefaultFileDriver.java:216)
at
org.geotools.coverage.io.netcdf.NetCDFReader.<init>(NetCDFReader.java:157)
... 123 more
Caused by: java.lang.RuntimeException: java.io.IOException:
java.lang.IllegalArgumentException: java.lang.RuntimeException: Unable to
obtain connection: Cannot create PoolableConnectionFactory (Exception opening
port H2 TCP Server (tcp://localhost:50683) (port may be in use), cause: timeout
[90061-119])
at
org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:266)
at javax.imageio.ImageReader.setInput(ImageReader.java:380)
at
org.geotools.coverage.io.netcdf.NetCDFAccess.<init>(NetCDFAccess.java:115)
... 126 more
Caused by: java.io.IOException: java.lang.IllegalArgumentException:
java.lang.RuntimeException: Unable to obtain connection: Cannot create
PoolableConnectionFactory (Exception opening port H2 TCP Server
(tcp://localhost:50683) (port may be in use), cause: timeout [90061-119])
at
org.geotools.imageio.netcdf.NetCDFImageReader.initIndex(NetCDFImageReader.java:365)
at
org.geotools.imageio.netcdf.NetCDFImageReader.init(NetCDFImageReader.java:472)
at
org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:264)
... 128 more
Caused by: java.lang.IllegalArgumentException: java.lang.RuntimeException:
Unable to obtain connection: Cannot create PoolableConnectionFactory (Exception
opening port H2 TCP Server (tcp://localhost:50683) (port may be in use), cause:
timeout [90061-119])
at
org.geotools.coverage.io.catalog.CoverageSlicesCatalog.<init>(CoverageSlicesCatalog.java:231)
at
org.geotools.imageio.GeoSpatialImageReader.initCatalog(GeoSpatialImageReader.java:205)
at
org.geotools.imageio.netcdf.NetCDFImageReader.initIndex(NetCDFImageReader.java:285)
... 130 more
Caused by: java.lang.RuntimeException: Unable to obtain connection: Cannot
create PoolableConnectionFactory (Exception opening port H2 TCP Server
(tcp://localhost:50683) (port may be in use), cause: timeout [90061-119])
at
org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1986)
at
org.geotools.jdbc.JDBCDataStore.createTypeNames(JDBCDataStore.java:976)
at
org.geotools.data.store.ContentDataStore.getTypeNames(ContentDataStore.java:308)
at
org.geotools.coverage.io.catalog.CoverageSlicesCatalog.<init>(CoverageSlicesCatalog.java:202)
... 132 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Exception opening port H2 TCP Server
(tcp://localhost:50683) (port may be in use), cause: timeout [90061-119])
at
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at
org.geotools.data.jdbc.datasource.AbstractManageableDataSource.getConnection(AbstractManageableDataSource.java:48)
at
org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1971)
... 135 more
Caused by: org.h2.jdbc.JdbcSQLException: Exception opening port H2 TCP Server
(tcp://localhost:50683) (port may be in use), cause: timeout [90061-119]
at org.h2.message.Message.getSQLException(Message.java:106)
at org.h2.message.Message.getSQLException(Message.java:117)
at org.h2.tools.Server.start(Server.java:361)
at org.h2.engine.Database.startServer(Database.java:708)
at org.h2.engine.Database.open(Database.java:584)
at org.h2.engine.Database.openDatabase(Database.java:222)
at org.h2.engine.Database.<init>(Database.java:216)
at org.h2.engine.Engine.openSession(Engine.java:58)
at org.h2.engine.Engine.openSession(Engine.java:140)
at org.h2.engine.Engine.getSession(Engine.java:120)
at
org.h2.engine.SessionFactoryEmbedded.createSession(SessionFactoryEmbedded.java:17)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:245)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:223)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
at org.h2.Driver.connect(Driver.java:58)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 139 more
Steve Ferguson
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==
Ing. Daniele Romagnoli
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro
sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in
accord with its purpose, any disclosure, reproduction, copying, distribution,
or either dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the intended
recipient, please contact immediately the sender by telephone, fax or e-mail
and delete the information in this message that has been received in error. The
sender does not give any warranty or accept liability as the content, accuracy
or completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users