You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
The above line continues the loop as long as the status is not 'FINISHED', however, this allows for unnecessary compute cycles when a terminal status such as 'FAILED' is returned which should be handled so that client is updated immediately that the import failed rather than waiting for Geoserver to abort the task after an unspecified length of time. The sequence of events I've been able to extract from the logs are as follows:
Several dozen request, regardless of the size of the dataset, are made to the Geoserver /tasks/.json endpoint each returning a 200 with the payload seen in the example below.
Eventually Geoserver clears the SecurityContextHolder
404 is returned with a Task Not Found message
Importer fails
Below is an example response from Geoserver with the FAILED status.
{
"task": {
"id": 11,
"status": "FAILED",
"transactionId": "91a0f517-1fcf-465e-861c-aa0993c8c4b7",
"description": "postgis import table yoyoma_events into repository: postgresql://localhost:5432/geogig_data/public/cdavis-layers?user=<user>&password=<pwd>",
"href": "http://example.io/geoserver/geogig/tasks/11.json",
"error": {
"message": "Unable to obtain connection: ERROR: function postgis_lib_version() does not exist\n Hint: No function matches the given name and argument types. You might need to add explicit type casts.\n Position: 8",
"stackTrace": "java.lang.RuntimeException: Unable to obtain connection: ERROR: function postgis_lib_version() does not exist\n Hint: No function matches the given name and argument types. You might need to add explicit type casts.\n Position: 8\n\tat org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:2078)\n\tat org.geotools.jdbc.JDBCDataStore.createTypeNames(JDBCDataStore.java:978)\n\tat org.geotools.data.store.ContentDataStore.entry(ContentDataStore.java:582)\n\tat org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:618)\n\tat org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:393)\n\tat org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:360)\n\tat org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:344)\n\tat org.locationtech.geogig.geotools.plumbing.ImportOp.checkPreconditions(ImportOp.java:360)\n\tat org.locationtech.geogig.geotools.plumbing.ImportOp._call(ImportOp.java:146)\n\tat org.locationtech.geogig.geotools.plumbing.ImportOp._call(ImportOp.java:79)\n\tat org.locationtech.geogig.repository.AbstractGeoGigOp.call(AbstractGeoGigOp.java:153)\n\tat org.locationtech.geogig.rest.AsyncContext$CommandCall.call(AsyncContext.java:240)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: org.postgresql.util.PSQLException: ERROR: function postgis_lib_version() does not exist\n Hint: No function matches the given name and argument types. You might need to add explicit type casts.\n Position: 8\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)\n\tat org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)\n\tat org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406)\n\tat org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:286)\n\tat org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)\n\tat org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)\n\tat org.geotools.data.postgis.PostGISDialect.getVersion(PostGISDialect.java:1198)\n\tat org.geotools.data.postgis.PostGISDialect.initializeConnection(PostGISDialect.java:237)\n\tat org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:2069)\n\t... 17 more\n"
}
}
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://github.com/GeoNode/django-osgeo-importer/blob/master/osgeo_importer/handlers/geoserver/__init__.py#L177
The above line continues the loop as long as the status is not 'FINISHED', however, this allows for unnecessary compute cycles when a terminal status such as 'FAILED' is returned which should be handled so that client is updated immediately that the import failed rather than waiting for Geoserver to abort the task after an unspecified length of time. The sequence of events I've been able to extract from the logs are as follows:
Below is an example response from Geoserver with the FAILED status.
The text was updated successfully, but these errors were encountered: