I am working on Ubuntu 18 and using Kartoza GeoServer docker v:2.15. I try to push Landsat band 4 (for sample I have two images epsg_4326) with Python library geoserver-restconfig to GeoServer with coverage store with below code

cat.create_coveragestore( 'name112', workspace=None, path='file:ndvi_4326/1.tif', type='GeoTIFF',create_layer=False, layer_name=None, source_name=None, upload_data=False,contet_type="image/tiff",overwrite=False)

when create layer is 'False' I can create store but if it is 'true' I get an error

'FailedRequestError: Failed to create coverage/layer 1 for : name12, 400'

I got same error when I was trying with create_imagemosaic function.


~/Desktop/django_tutorial/djangoenv/lib/python3.6/site-packages/geoserver/catalog.py in create_imagemosaic(self, name, data, configure, workspace, overwrite, charset)
    532             resp = self.http_request(url, method='put', data=upload_data, headers=headers)
    533             if resp.status_code != 201:
--> 534                 raise FailedRequestError('Failed to create ImageMosaic {} : {}, {}'.format(name, resp.status_code, resp.text))
    535             self._cache.clear()
    536         finally:    
   FailedRequestError: Failed to create ImageMosaic band22 : 400,

I think, when trying to create layer I get an error and I checked to code I couldn't find anything. Any suggestions for this problem?

Edit-1 I tried image mosaic code in Windows machine and it worked. What is the source of error? GeoServer setting? or Docker settings?

Also I opened github issue https://github.com/GeoNode/geoserver-restconfig/issues/3

  • Please place error messages in the Question body as text (images, even without a black background, are not legible on all devices, and they are not text searchable by others, which hides the answer from others).
    – Vince
    Commented Jan 31, 2020 at 12:29

1 Answer 1


I found the solution. The path should be like 'file:/opt/geoserver/data_dir/ndvi2'


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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