usgs / swarm

a Java application designed to display and analyze seismic waveforms in real-time.
http://volcanoes.usgs.gov/software/swarm
Other
36 stars 16 forks source link

Allow Swarm to recover from failure during WMS map creation #277

Closed dlnorgaard closed 4 years ago

dlnorgaard commented 5 years ago

Sometime the USGS national maps do not return an image which causes Swarm to time out on map creation (if using WMS). Wes has asked if we can allow Swarm to recover from this error. Perhaps instead of throwing exception continue the retries with increased time span between each retry.

2019-08-05 03:36:48 INFO - Using metadata configuration file: SwarmMetadata.config 2019-08-05 03:36:48 INFO - java.version: 1.8.0_211 2019-08-05 03:36:48 INFO - maximum heap size: 7.089 GB 2019-08-05 03:36:48 INFO - loading MapPack: mapdata\augustine\MapPack.txt 2019-08-05 03:36:48 INFO - loading MapPack: mapdata\nasa_240m_A1\MapPack.txt 2019-08-05 03:36:48 INFO - loading MapPack: mapdata\nasa_240m_D2\MapPack.txt 2019-08-05 03:36:48 INFO - loading MapPack: mapdata\nasa_2k\MapPack.txt 2019-08-05 03:36:48 INFO - loading MapPack: mapdata\world\MapPack.txt 2019-08-05 03:37:38 INFO - Retrieving hypocenters 2019-08-05 03:37:38 INFO - https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=0&STYLES=&WIDTH=959&HEIGHT=23693001&FORMAT=image/jpeg&EXCEPTIONS=application/vnd.ogc.se_xml&SRS=EPSG:4326&BBOX=80.85940,90.00000,81.14060,-998.98293 2019-08-05 03:39:39 ERROR - Exception during map creation. {} java.lang.NullPointerException at gov.usgs.volcanoes.core.legacy.plot.map.WMSGeoImageSet$1.attempt(WMSGeoImageSet.java:182) at gov.usgs.volcanoes.core.util.Retriable.go(Retriable.java:145) at gov.usgs.volcanoes.core.legacy.plot.map.WMSGeoImageSet.getCompositeImage(WMSGeoImageSet.java:196) at gov.usgs.volcanoes.core.legacy.plot.map.GeoImageSet.getMapBackground(GeoImageSet.java:419) at gov.usgs.volcanoes.swarm.map.MapPanel.updateMapRenderer(MapPanel.java:804) at gov.usgs.volcanoes.swarm.map.MapPanel.access$500(MapPanel.java:82) at gov.usgs.volcanoes.swarm.map.MapPanel$5.construct(MapPanel.java:1001) at gov.usgs.volcanoes.swarm.SwingWorker$2.run(SwingWorker.java:111) at java.lang.Thread.run(Unknown Source) 2019-08-05 03:42:38 INFO - Retrieving hypocenters

dlnorgaard commented 4 years ago

This seems to only be an issue when map is slow to load. When the maps don't exist Swarm is not affected, although the stack trace is still written to console. The USGS map server has since been improved and the maps are no longer slow to load, making this difficult to reproduce. Given that this is no longer an issue for the user, I am closing this ticket.