3

Recently in my company, we are having issues with our GIS web services. The problem is due to the PostGIS Stores in GeoServer have been intermittently been disabled. When we manually enable them again, everything works again like it should.

Does anyone know what could be causing the stores to become disabled? Is there a solution / work around to either (a) prevent this from happening; or (b) fix it automatically when it does happen; or (c) is there an option to set up an email notification - highlighting that the stores have been disabled and need to be re-enabled?

  • You should find information in the log files why it happens. – pLumo Sep 13 '17 at 12:06
  • 1
    If your PostgreSQL server is on the same machine than GeoServer the database may start slower than GeoServer. Or if database is external the network may not be ready before GeoServer tries to make a connection. Starting services with a script that pings PostgreSQL before is continues to start GeoServer should help in such case. – user30184 Sep 13 '17 at 12:37
8

Stores gets disabled on startup when the source store is not reachable (cannot be contacted). You can avoid that by:

  • Upgrading to GeoServer 2.11.x
  • Go to "global settings" and set the service error handling to "skip misconfigured layers"

Rationale: the stores get disabled to protect GetCapabilities generation, which would fail if any of the stores cannot be contacted, but with that setting you instruct GetCapabilities to be tolerant to errors instead of failing and returning an exception.

  • 1
    If the connection to the database comes back are the skipped layers coming back as well automatically? – user30184 Sep 13 '17 at 12:47
  • 2
    Yes, they are tested every time and skipped if they fail, so if the connection comes back, they will start appearing. – Andrea Aime Sep 13 '17 at 15:43
  • 1
    Mind, the setting by itself does not prevent disabling the stores unless you also use/upgrade to 2.11.x – Andrea Aime Sep 13 '17 at 15:43
  • Thanks for the prompt answer. I have followed your advice. If the issue arises again I will revert back. – Jonathan Sep 13 '17 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.