[Geoserver-users] ArcSDE Database Not Available

All,

Just wondering if I could get some advice from the list (although I think this might be a question for Leaflet.js list).

I have a simple mapping site built with Leaflet.js that consumes a couple of WMS as tile layers from Geoserver; a base map layer from an Oracle DB, the other is the data from an ArcSDE DB.

Normally it all works brilliantly, but unfortunately the ArcSDE DB is currently having problems and randomly goes down and therefore Geoserver cannot connect to it (nothing to do with Geoserver). Geoserver generates a relevant error message:

2013-10-30 08:54:22,808 WARN [arcsde.session] - Unknown problem getting connection: Can’t create connection to [SERVER_NAME] for Session #5851

java.io.IOException: Can’t create connection to [SERVER_NAME ]for Session #5851

[…]

My problem is that this causes the base mapping on the site to load correctly but it appears like there’s no data on the base map. When in actual fact the GET requests to the ArcSDE WMS are just silently failing (in Firebug the GET response is just: “Reload the page to get source for: http://127.0.0.1:8080/geoserver[…]”

Does anyone have any thoughts how I can pick this up and alert the user that there’s a problem? If it’s thought that this question would be better asked on the Leaflet.js list then no problem.

Windows Server 2008 R2

GeoServer 2.3.3 running in Apache Tomcat/7.0.42

Please let me know if any further details are needed.

Many thanks,

Rob



<br>DISCLAIMER: The information contained in this communication/message from Robert.Langford@anonymised.com..5490... sent on Wed Oct 30 09:19:47 2013 is confidential and may be legally privileged. It is intended solely for the addressee(s) geoserver-users@anonymised.comists.sourceforge.net<br><br>Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.<br>As a public body, Salford City Council may be required to disclose this email [or any response to it] under the Freedom of Information Act 2000, unless the information in it is covered by one of the exemptions in the Act.<br>Please immediately contact the sender, Robert.Langford@anonymised.com if you have received this message in error.<br><br>For the full disclaimer please access http://www.salford.gov.uk/e-mail. Thank you.<br>

We use nagios for service monitoring. There is a port to Windows (I have not used it), but your monitoring machine can be (and should be) different to your production machine, so you might consider using a Linux box for monitoring.

Testing for data content is slightly trickier, and might be easier with WFS. That is, instead of deciphering a WMS response, you can detect loss of database connection by making a WFS request and testing to see if it returns the expected content. I expect that WFS responses will lack content if the database connection is lost.

Plain nagios check_http will not recognise GeoServer request failure because exception reports are delivered with:

HTTP/1.1 200 OK

Instead we use a custom command with the check_http plugin to test using a regular expression:

define command {
command_name check_http_url_regex
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -u "$ARG1$" -r "$ARG2$" -e 200
}

The service configuration checks to see that the response contains some expected text ("ngcp:GnssStation" in this case):

check_command check_http_url_regex!/geodesy/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=ngcp:GnssStation&maxFeatures=2!ngcp:GnssStation

Kind regards,
Ben.

On 30/10/13 17:19, Langford, Robert wrote:

All,

Just wondering if I could get some advice from the list (although I
think this might be a question for Leaflet.js list).

I have a simple mapping site built with Leaflet.js that consumes a
couple of WMS as tile layers from Geoserver; a base map layer from an
Oracle DB, the other is the data from an ArcSDE DB.

Normally it all works brilliantly, but unfortunately the ArcSDE DB is
currently having problems and randomly goes down and therefore Geoserver
cannot connect to it (nothing to do with Geoserver). Geoserver
generates a relevant error message:

2013-10-30 08:54:22,808 WARN [arcsde.session] - Unknown problem getting
connection: Can't create connection to [SERVER_NAME] for Session #5851

java.io.IOException: Can't create connection to [SERVER_NAME ]for
Session #5851

[…]

My problem is that this causes the base mapping on the site to load
correctly but it appears like there’s no data on the base map. When in
actual fact the GET requests to the ArcSDE WMS are just silently failing
(in Firebug the GET response is just: “Reload the page to get source
for: http://127.0.0.1:8080/geoserver\[\.\.\.\]”

Does anyone have any thoughts how I can pick this up and alert the user
that there’s a problem? If it’s thought that this question would be
better asked on the Leaflet.js list then no problem.

Windows Server 2008 R2

GeoServer 2.3.3 running in Apache Tomcat/7.0.42

Please let me know if any further details are needed.

Many thanks,

Rob

DISCLAIMER: The information contained in this communication/message from Robert.Langford@anonymised.com sent on Wed Oct 30 09:19:47 2013 is confidential and may be legally privileged. It is intended solely for the addressee(s) geoserver-users@lists.sourceforge.net

Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.
As a public body, Salford City Council may be required to disclose this email [or any response to it] under the Freedom of Information Act 2000, unless the information in it is covered by one of the exemptions in the Act.
Please immediately contact the sender, Robert.Langford@anonymised.com if you have received this message in error.

For the full disclaimer please access http://www.salford.gov.uk/e-mail. Thank you.

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

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

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre