scidb4gdal
scidb4gdal copied to clipboard
Can't connect to scidb using gdal wih scidb4gdal
Hello.
I'm trying to use scidb4gdal but I keep having connection errors. My setup is:
- I'm using scidb-eo docker image 16.9
- I have a file 'chicago.tif' in my home directory
However, when I call:
gdal_translate --debug ON -co "host=https://localhost" -co "port=8083" -co "user=scidb" -co "password=mypw" -co "type=S" -of SciDB ./chicago.tif "SCIDB:array=my_array1"
where mypw is replaced by my password.
I get the following error:
GDAL: GDALOpen(./chicago.tif, this=0x1bea910) succeeds as GTiff. Input file size is 699, 929 GDAL: QuietDelete(SCIDB:array=my_array1) invoking Delete() ERROR 1: Failed to extract connection information. scidb4gdal: Error while deleting. Cannot delete image. Continuing. scidb4gdal: ** Parse options and parameters ** ERROR 1: Failed to extract connection information. ERROR 1: Hostname is missing, please provide complete connection information either in the connection string, as opening / create options, as environment variables or in a .scidbpass file. GDAL: GDALClose(./chicago.tif, this=0x1bea910)
Could you please help me?
This happens when I run
dev_test.sh
in directory
/opt/scidb4gdal/test
###########################################
Upload Spatial Images
###########################################
****** translate an image into a purely spatial array in scidb using create options gdal_translate --debug ON -co "host=http://localhost" -co "port=8083" -co "user=scidb" -co "password=mypw" -co "type=S" -of SciDB ./UTM2GTIF.TIF "SCIDB:array=test_chicago_s" GDAL: GDALOpen(./UTM2GTIF.TIF, this=0x1b30900) succeeds as GTiff. GDAL: QuietDelete(SCIDB:array=test_chicago_s) invoking Delete() scidb4gdal: ** Parse options and parameters ** scidb4gdal: -- DONE scidb4gdal: ** Check validity of connection parameters and set options for SHIM client ** scidb4gdal: Using connection parameters: array=test_chicago_s host=http://localhost port=8083 user=scidb passwd=xxxxxxx ssl=false trust=true scidb4gdal: -- DONE scidb4gdal: ** Check if array already exists in the database ** scidb4gdal: Performing AFL Query: aggregate(filter(list('arrays'),name='test_chicago_s'),count(name)) scidb4gdal: New array will be created. scidb4gdal: -- DONE scidb4gdal: ** Create source array representation in GDAL for input image ** scidb4gdal: SciDBSpatialArray created. scidb4gdal: -- DONE scidb4gdal: ** Fetch metadata from the source image and copy it to the source array representation ** scidb4gdal: Calculating spatial chunksize and taking the default temporal chunksize (t=1). scidb4gdal: Using chunksize 4096x4096 --> 16384 kilobytes scidb4gdal: Reading metadata from source dataset scidb4gdal: Reading metadata from source dataset scidb4gdal: Testing metadata copy: <band1:uint8 NOT NULL>[y=0:928,4096,0,x=0:698,4096,0] scidb4gdal: -- DONE scidb4gdal: Checking whether SciDB server runs spacetime extensions... scidb4gdal: Performing AFL Query: aggregate(filter(list('libraries'), name='libscidb4geo.so'), count(name)) scidb4gdal: Spacetime extension found. Good. scidb4gdal: ** Prepare the target array representation ** scidb4gdal: target array is a copy of the source array scidb4gdal: -- DONE scidb4gdal: ** Check if the source array can be inserted into the target array ** scidb4gdal: Check whether source and target array have the same spatial reference system... OK scidb4gdal: Checking whether source array is within the spatial extent of the target array... OK scidb4gdal: -- DONE scidb4gdal: ** Creating the array structure for the uploaded image in SciDB ** scidb4gdal: Performing AFL Query: aggregate(filter(list('arrays'),name='test_chicago_s'),count(name)) scidb4gdal: Performing AFL Query: CREATE TEMP ARRAY test_chicago_s_temp<band1:uint8 NOT NULL>[y=0:928,4096,0,x=0:698,4096,0] scidb4gdal: -- DONE scidb4gdal: ** Upload the source image into the temporary array ** Input file size is 699, 929 0GDAL: GDAL_CACHEMAX = 399 MB scidb4gdal: Upload file size 0MB scidb4gdal: Performing AFL Query: insert(repart(input(<band1:uint8 NOT NULL>[y=0:928,4096,0,x=0:698,4096,0],'/tmp/shim_input_buf_Ja2X4y', -2, '(uint8)'),<band1:uint8 NOT NULL>[y=0:928,4096,0,x=0:698,4096,0]), test_chicago_s_temp) scidb4gdal: -- DONE scidb4gdal: Persisting temporary array 'test_chicago_s_temp' scidb4gdal: Performing AFL Query: store(test_chicago_s_temp, test_chicago_s) scidb4gdal: Removing temporary array 'test_chicago_s_temp' scidb4gdal: Performing AFL Query: remove(test_chicago_s_temp) scidb4gdal: Performing AFL Query: st_setsrs(test_chicago_s,'x','y','EPSG',26716,'x0=444650 y0=4640510 a11=10 a22=-10 a12=0 a21=0') scidb4gdal: Trying to persist array metadata in SciDB system catalog scidb4gdal: Performing AFL Query: eo_setmd(test_chicago_s,'AREA_OR_POINT,TIFFTAG_RESOLUTIONUNIT,TIFFTAG_XRESOLUTION,TIFFTAG_YRESOLUTION','Area,1 (unitless),72,72') scidb4gdal: Performing AFL Query: eo_setmd(test_chicago_s,'band1','OFFSET,SCALE,UNIT','0,1,') scidb4gdal: Performing AFL Query: project(filter(eo_getmd(test_chicago_s),attribute='' and domain=''), key, value) scidb4gdal: Requesting the server's SciDB / shim version over HTTP... scidb4gdal: SciDB server runs version ERROR 1: Cannot extract SciDB / shim version from string '' GDAL: GDALClose(<band1:uint8 NOT NULL>[y=0:928,4096,0,x=0:698,4096,0], this=0x1ba0dd0) GDAL: GDALClose(./UTM2GTIF.TIF, this=0x1b30900) ...10...20...30...40...50...60...70...80...90...100 - done. dev_test.sh: line 13: [0: command not found TEST: FAILED Upload of spatial image using create options took 3.506 seconds to complete
Hi,
if I saw it correctly then you used the docker image version 16.9. If I remember correctly we created that container to provide an update for the version change, but we haven't run it against the GDAL driver.
In the log, you posted, the error seems to be that the message returned from the SHIM client at the endpoint (/version) is an empty string. This can be, because the SHIM version is incompatible with the SciDB version or the behavior of the SHIM client has changed in that regard.
Currently, we have moved on to other projects, so that we are not able to provide a fix or full support on this issue. I would recommend you to switch to a prior scidb-eo version.
Hi, thanks for the reply.
After reading your message, I tried to check the version of shim that is running in the docker with
shim -v
and the result is indeed an empty string for some reason. I'll either check a prior scidb-eo version or reinstall shim. Thank you.