-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't list or add a datastore for Geoserver #191
Comments
Thanks for reporting @rfazimut. Three additional questions I have:
Thanks, |
Hi!
Answer to your questions :
1. Yes. There are defined datastore on the Geoserver. The error come as soon as we select select Import into PostGIS database (managed by GeoServer)
1. Here an example
***@***.***
1. Yes. It tries to refresh the list of datastore and we get the same error.
I tried also using the other option (direct connect) after a connection to the same PostGIS database as been defined. In this case, we get a different message when we try to publish.
Errors:
Traceback (most recent call last):
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\publish\tasks.py", line 129, in run
_publish(layer, publish_fields)
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\publish\tasks.py", line 65, in _publish
self.geodata_server.publishLayer(lyr, pub_fields)
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\servers\models\geoserver.py", line 277, in publishLayer
self._publishVectorLayerFromPostgis(layer, db, fields)
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\servers\models\geoserver.py", line 669, in _publishVectorLayerFromPostgis
self.request(ds_url, data=ds, method="post")
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\servers\bases.py", line 279, in request
result.raise_for_status()
File "C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Server Error for url: http://192.168.10.207:8080/geoserver/rest/workspaces/evalzonage49048/datastores
At this point, we have been unable to publish layer to Geoserver other then using the geopackage option.
It is not clear to me if checking the option “Reference existing PostGIS tables (if exists)” will actually just publish the layer and not copy the data which is already there. Is that what it is supposed to do?
Robert
|
Thanks for the info @rfazimut. Besides the fact that this is not supposed to happen and we need to fix the user experience (in case there is an error accessing/listing the datastore), there also seems to be something peculiar about your datastore(s). Since you get a 500 when using the Direct Connect approach, could you perhaps share the error that GeoServer throws (see GeoServer logs in web UI)? Concerning the That option will only work if:
In that case it will work the way you thought it would. |
Describe the bug
With the current version, from the connection tab, I cannot add a database or iterate the list of database defined on the geoserver with this message:
File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\servers\views\geoserver.py", line 184, in _addGeoserverPgDatastores
datastores = list(chain.from_iterable(worker_result))
TypeError: 'KeyError' object is not iterable
To Reproduce
Steps to reproduce the behavior:
Datastore are defined on the server
Expected behavior
Datastore is added or listed from the Geoserver
Screenshots
If applicable, add screenshots to help explain your problem.
Environment info (please complete the following information):
Bridge version: GeoCat Bridge 4.5.1 for QGIS 3.16+
QGIS version: 3.22.5-Białowieża (rev c2723178)
OS version: Windows 10 10.0.19045
Python version: 3.9.5 (rev 0a7dcbd)
Additional context
GeoServer 2.26
The text was updated successfully, but these errors were encountered: