I can not set remote store for my geoserver. Technically, I have two servers. Geoserver is installed on one server and data (rasters) is stored on another server. Data itself is reachable through url. When I set local store for my geoserver (using some test rasters), it works. I do it like so:
requests.post("http://" + geoserverhost + ":" + geoserverport + "/geoserver/rest/workspaces/" + workspace +\
"/coveragestores?configure=all", data="<coverageStore><name>" + layer_name + \
"store</name><workspace>accent</workspace><enabled>true</enabled><advertised>true</advertised><type>" + tif_type +\
"</type><url>file:" + targetPath + \
"</url></coverageStore>", headers={"Content-Type": "text/xml"}, auth=(geo["user"], geo["password"]))
The most important part here, is where I set data url:
"...<url>file:" + targetPath + "</url>"
Here targetPath
is local to the geoserver itself. Now, I want to switch to remote data storage. I do it like so:
"...<url>" + targetUrl + "</url>"
Here target url is a valid url reachable form everywhere. But unfortunatelly, it does not work. When I publish my layer, I get some rubbish on the client. So, what is wrong with that and how can I fix it?
Could not list layers for this store, an error occurred retrieving them: java.io.FileNotFoundException: Invalid input file providedexists: false isDirectory: false
. Even though the target url (which points to a remote tif) is perfectly reachable.