Skip to content
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

Error when COGs are served from the same hostname of marble server through docker-compose #5

Open
francbartoli opened this issue Sep 25, 2018 · 2 comments

Comments

@francbartoli
Copy link

I have built a stack for uploading COGs and serve them from a storage bucket server. If I add marblecutter-virtual to the stack in a docker-compose deployment all its endpoints don't work as expected if the querystring url is from the same domain/ip while they work if it is an external cog like that from the readme.

There is a docker-compose to reproduce the problem.

Just upload a geotiff with tiled overviews as the example below:

curl -X POST \
  http://192.168.99.100:30800/api/cogs/ \
  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Disposition: attachment; geotiff-with-ovr.tif' \
  -H 'Content-Type: image/tif' \
  -H 'Postman-Token: 0e53c7df-8096-4dc7-9de4-23e6fc916733' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F image=@/tmp/geotiff-with-ovr.tif \
  -F name=geotiff-with-ovr.tif \
  -F compression=raw
@mojodna
Copy link
Owner

mojodna commented Sep 25, 2018

The URL you're then using as url is http://192.168.99.100:30800/api/cogs/geotiff-with-ovr.tif?

My initial guess is that the Docker image isn't able to connect to that IP from within. To verify, run docker-compose exec marblecutter-virtual bash (while the stack is running) and from within that, curl -v <url> > /dev/null to see if it can connect. If not, you may be able to use http://webapi/api/cogs/geotiff-with-ovr.tif as the URL (webapi will resolve to the corresponding container's IP). (You may need to add a links section with webapi for the marblecutter-virtual service for them to be linked up network- and DNS-wise.)

@francbartoli
Copy link
Author

Thanks @mojodna, I will definitively try it out. Anyway I have also tried with cloud kubernetes clusters and having the marblecutter container in a different k8s cluster from the webapi one everything works very well. Still not checked it into the same minikube.
Need more investigations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants