MapViz-Tile-Map-Google-Maps-Satellite icon indicating copy to clipboard operation
MapViz-Tile-Map-Google-Maps-Satellite copied to clipboard

docker run issue

Open rocklinsuv opened this issue 8 years ago • 17 comments

Hi danielsnider,

I've been trying to get MapViz running along with MapProxy according to your tutorial. When I tried to run "sudo docker run -p 8080:8080 -d -t -v ~/mapproxy:/mapproxy danielsnider/mapproxy", it initially downloaded the docker image, then the second time returned a chain of numbers and characters like "5d23e78.......". I then check the MapProxy demo http://127.0.0.1:8080/demo but nothing happened. So I would like to know if we need to install MapProxy individually before using the docker image? I would also like to know what is the code used for from this url: https://github.com/danielsnider/docker-mapproxy-googlemaps. Do I need to download it and use it along with docker?

Another issue will be I'm currently living in a country without Google (sucks). Is there an alternative WTMS with terrain maps rather than Google Maps? Any thoughts will be very much appreciated!

Best Regards, rocklinsuv

rocklinsuv avatar Sep 22 '17 09:09 rocklinsuv

Hi rocklinsuv,

Does the command "docker ps" show that the docker container is running? Also, docker logs will show you all the output of the conatiner run, can you share it here?

This container approach does not require a separate installation of mapproxy.

To use a different map service than google maps edit the file mapproxy.yaml in your ~/mapproxy folder and relaunch the container. I think there is a terrain tilemap from Microsoft Bing but I don't have the URL right now and it might not even need format conversion depending on your use case. Search online and I can help you look if you don't find it.

On Sep 22, 2017, at 5:50 AM, rocklinsuv [email protected] wrote:

Hi danielsnider,

I've been trying to get MapViz running along with MapProxy according to your tutorial. When I tried to run "sudo docker run -p 8080:8080 -d -t -v ~/mapproxy:/mapproxy danielsnider/mapproxy", it initially downloaded the docker image, then the second time returned a chain of numbers and characters like "5d23e78.......". I then check the MapProxy demo http://127.0.0.1:8080/demo but nothing happened. So I would like to know if we need to install MapProxy individually? Another issue will be I'm currently living in a country without Google (sucks). Is there an alternative WTMS with terrain maps rather than Google Maps? Any thoughts will be very much appreciated!

Best Regards, rocklinsuv

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

danielsnider avatar Sep 22 '17 15:09 danielsnider

Hi danielsnider,

I've captured a screenshot of the "docker run" command output: image

I used "docker ps" but getting nothing. I also realized that I'm using a 32bit Ubuntu Mate 16.04, so the docker is docker.io rather than docker-ce. Do you think this is causing the issue? Since there is no container running, I could not use the "docker logs" command. Here's what I got from "docker info":

Containers: 6 Running: 0 Paused: 0 Stopped: 6 Images: 2 Server Version: 1.12.6 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 27 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge overlay null Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: apparmor seccomp Kernel Version: 4.10.0-35-generic Operating System: Ubuntu 16.04.3 LTS OSType: linux Architecture: i686 CPUs: 2 Total Memory: 1.435 GiB Name: ubuntu ID: ZDK7:TDC6:LTXF:NT76:XXT3:H4O2:XJCA:LXN4:2ICI:DWG7:DOD6:TF2O Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ WARNING: No swap limit support Insecure Registries: 127.0.0.0/8

And the "docker images" command shows: REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest abd130ec0722 6 weeks ago 664.6 kB danielsnider/mapproxy latest 571a6aeb022d 7 months ago 1.031 GB

I'm also trying to google (I did manage to use Google but on my Windows machine, and the Ubuntu was running on a virtual machine) why the container won't start. So any help is very much appreciated ^_^

Update: I downloaded the "ubuntu" images and successfully ran it. The "docker ps" command is giving me:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 16deded98e59 ubuntu "/bin/bash" 13 seconds ago Up 12 seconds sharp_engelbart

Cheers, rocklinsuv

rocklinsuv avatar Sep 22 '17 16:09 rocklinsuv

Do a "docker ps -a" this will show all containers even stopped ones, find the id for the mapproxy container that exited, and use the id with "docker logs " and let me know :-).

Daniel Snider ツ

On Fri, Sep 22, 2017 at 12:55 PM, rocklinsuv [email protected] wrote:

Hi danielsnider,

I used "docker ps" but getting nothing. I also realized that I'm using a 32bit Ubuntu Mate 16.04, so the docker is docker.io rather than docker-ce. Do you think this is causing the issue? Since there is no container running, I could use the "docker logs" command. Here's what I get from "docker info":

Containers: 6 Running: 0 Paused: 0 Stopped: 6 Images: 2 Server Version: 1.12.6 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 27 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge overlay null Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: apparmor seccomp Kernel Version: 4.10.0-35-generic Operating System: Ubuntu 16.04.3 LTS OSType: linux Architecture: i686 CPUs: 2 Total Memory: 1.435 GiB Name: ubuntu ID: ZDK7:TDC6:LTXF:NT76:XXT3:H4O2:XJCA:LXN4:2ICI:DWG7:DOD6:TF2O Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ WARNING: No swap limit support Insecure Registries: 127.0.0.0/8

And the "docker images" command shows: REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest abd130ec0722 6 weeks ago 664.6 kB danielsnider/mapproxy latest 571a6aeb022d 7 months ago 1.031 GB

I'm also trying to google (I did manage to use Google but on my Windows machine, and the Ubuntu was running on a virtual machine) why the container won't start. So any help is very much appreciated ^_^

Cheers, rocklinsuv

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331501816, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWMWfptQR6MDW3jTjACflMt8rHM76ks5sk-ZugaJpZM4PgemM .

danielsnider avatar Sep 22 '17 17:09 danielsnider

Okay, when I "docker ps -a", it showed:

image

So I "docker logs 3e0a5a21d387", it gave me:

image

rocklinsuv avatar Sep 22 '17 17:09 rocklinsuv

There's an error message in there but I'm not familiar with it. I would suggest start small, does the hello world docker image work for you? Does a simple python container work? docker run -it --rm python:2.7 bash

If these work and mapproxy doesn't then start with an empty Dockerfile and add lines of code from the mapproxy container Dockerfile (from https://github.com/danielsnider/docker-mapproxy-googlemaps/blob/master/Dockerfile) until you isolate where things start failing.

Daniel Snider ツ

On Fri, Sep 22, 2017 at 1:18 PM, rocklinsuv [email protected] wrote:

Okay, when I "docker ps -a", it showed:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 16deded98e59 ubuntu "/bin/bash" About a minute ago Up About a minute sharp_engelbart d971404de582 ubuntu "/bin/bash" 5 minutes ago Exited (127) 3 minutes ago backstabbing_ride 6ae9290f5773 ubuntu "/bin/bash" 5 minutes ago Exited (0) 5 minutes ago angry_elion 3e0a5a21d387 danielsnider/mapproxy "/bin/sh -c /start.sh" 12 minutes ago Exited (2) 12 minutes ago clever_fermi dc98973ac5a8 danielsnider/mapproxy "/bin/sh -c /start.sh" 13 minutes ago Exited (2) 13 minutes ago backstabbing_joliot 8cfcadf4878a danielsnider/mapproxy "/bin/sh -c /start.sh" 13 minutes ago Exited (2) 13 minutes ago sad_austin 9ed382475fa9 danielsnider/mapproxy "/bin/sh -c /start.sh" 14 minutes ago Exited (2) 14 minutes ago small_gates f6dbcbc482a2 danielsnider/mapproxy "/bin/sh -c /start.sh" 16 minutes ago Exited (2) 16 minutes ago elegant_volhard b67e6f21b9be danielsnider/mapproxy "/bin/sh -c /start.sh" 20 minutes ago Exited (2) 20 minutes ago cocky_almeida b95a65579f68 danielsnider/mapproxy "/bin/sh -c /start.sh" 29 minutes ago Exited (2) 29 minutes ago focused_saha e83124d21ad5 danielsnider/mapproxy "/bin/sh -c /start.sh" 32 minutes ago Exited (2) 32 minutes ago jovial_visvesvaraya 863d88a4bc7c danielsnider/mapproxy "/bin/sh -c /start.sh" 32 minutes ago Exited (2) 32 minutes ago boring_heyrovsky aa11c0414a17 danielsnider/mapproxy "/bin/sh -c /start.sh" 32 minutes ago Exited (2) 32 minutes ago sleepy_goldwasser cadc91345b97 hello-world "/hello" About an hour ago Exited (0) About an hour ago trusting_newton 2337e9bd7d22 hello-world "/hello" About an hour ago Exited (0) About an hour ago reverent_murdock

So I "docker logs 3e0a5a21d387", it gave me:

panic: standard_init_linux.go:178: exec user process caused "exec format error" [recovered] panic: standard_init_linux.go:178: exec user process caused "exec format error"

goroutine 1 [running, locked to thread]: panic(0x835c0c0, 0x975c4a00) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x326 github.com/opencontainers/runc/vendor/github.com/urfave/ cli.HandleAction.func1(0x975bd968) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/vendor/github.com/urfave/cli/app.go:478 +0x2c1 panic(0x835c0c0, 0x975c4a00) /usr/lib/go-1.6/src/runtime/panic.go:443 +0x3fd github.com/opencontainers/runc/libcontainer.(*LinuxFactory). StartInitialization.func1(0x975bd5f0, 0x975148f8, 0x975bd678) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0xfd github.com/opencontainers/runc/libcontainer.(*LinuxFactory). StartInitialization(0x97542f60, 0x86b7fd70, 0x975c4a00) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x474 main.glob.func8(0x97578320, 0x0, 0x0) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/main_unix.go:26 +0x57 reflect.Value.call(0x8302400, 0x842f600, 0x13, 0x838d5b8, 0x4, 0x975bd928, 0x1, 0x1, 0x0, 0x0, ...) /usr/lib/go-1.6/src/reflect/value.go:435 +0xeeb reflect.Value.Call(0x8302400, 0x842f600, 0x13, 0x975bd928, 0x1, 0x1, 0x0, 0x0, 0x0) /usr/lib/go-1.6/src/reflect/value.go:303 +0x8c github.com/opencontainers/runc/vendor/github.com/urfave/ cli.HandleAction(0x8302400, 0x842f600, 0x97578320, 0x0, 0x0) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/vendor/github.com/urfave/cli/app.go:487 +0x25f github.com/opencontainers/runc/vendor/github.com/urfave/ cli.Command.Run(0x838fac8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x840dfa0, 0x51, 0x0, ...) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/vendor/github.com/urfave/cli/command.go:191 +0xda7 github.com/opencontainers/runc/vendor/github.com/urfave/ cli.(*App).Run(0x9756a240, 0x97506070, 0x2, 0x2, 0x0, 0x0) /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/vendor/github.com/urfave/cli/app.go:240 +0x92b main.main() /build/runc-jpw_eJ/runc-1.0.0rc2+docker1.12.6/_build/src/git hub.com/opencontainers/runc/main.go:137 +0xaf3

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331507744, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWLWYuWkzL-UdRZRJ0xnsPT_VJxfaks5sk-v-gaJpZM4PgemM .

danielsnider avatar Sep 22 '17 17:09 danielsnider

Both hello-world and python:2.7 bash were running successfully. It is a bit late now (2am) so I'll try your method tomorrow. Thanks again for all your help!

rocklinsuv avatar Sep 22 '17 17:09 rocklinsuv

Thank you too for the help.

Daniel Snider ツ

On Fri, Sep 22, 2017 at 1:59 PM, rocklinsuv [email protected] wrote:

Both hello-world and python:2.7 bash were running successfully. It is a bit late now (2am) so I'll try your method tomorrow. Thanks again for all your help!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331518535, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWPlpEHauGhJIpA33DJ0YfBlafNGOks5sk_VzgaJpZM4PgemM .

danielsnider avatar Sep 22 '17 18:09 danielsnider

Hi Daniel,

It seems like there's a pip-install issue: image

Everything was fine until the "pip install" command. I also googled the "cannot import name _remove_dead_weakref" error. It said it was some kinda python version issue, but still I have no clue how to solve this.

Any thoughts? Thanks again for all your help :+1:

Cheers,

rocklinsuv avatar Sep 25 '17 03:09 rocklinsuv

Nice find. Can you isolate which package (out of Shapely Pillow MapProxy or uwsgi) is causing the error? or is it any package?

Daniel Snider ツ

On Sun, Sep 24, 2017 at 11:16 PM, rocklinsuv [email protected] wrote:

Hi Daniel,

It seems like there's a pip-install issue: [image: image] https://user-images.githubusercontent.com/7424627/30791080-038dd0ae-a165-11e7-8cd1-2857c25cb3e1.png everything was fine until the "pip install" command. I also googled the "cannot import name _remove_dead_weakref" error. It said it was some kinda python version issue, but still I have no clue how to solve this. Any thoughts? Thanks again for all your help 👍

Cheers,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331767280, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWOi8UOsdcmHVP5BQzRNtb_6S4aUBks5slxsqgaJpZM4PgemM .

danielsnider avatar Sep 25 '17 03:09 danielsnider

I believe it was any package. So it was the "pip install" which failed.

I even added a line "RUN pip install" before the original "RUN pip install Shapely" line and still got this error message: image

rocklinsuv avatar Sep 25 '17 03:09 rocklinsuv

Oh pip =(.

I'm not sure but maybe you can update your base layer of docker's python, the docker python 2.7 container, then maybe this bug will go away? I'm not sure how to do that.

Maybe try all this on a new machine. A fresh install might not see this problem.

Daniel Snider ツ

On Sun, Sep 24, 2017 at 11:38 PM, rocklinsuv [email protected] wrote:

I believe it was any package. So it was the "pip install" failed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331769618, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWPZqep5ExFGZxDkiFIryow-isqnzks5slyBCgaJpZM4PgemM .

danielsnider avatar Sep 25 '17 03:09 danielsnider

I'll see what I can do and keep you updated :D. Thanks!


From: Daniel Snider ツ [email protected] Sent: Monday, September 25, 2017 11:57 AM To: danielsnider/MapViz-Tile-Map-Google-Maps-Satellite Cc: rocklinsuv; Author Subject: Re: [danielsnider/MapViz-Tile-Map-Google-Maps-Satellite] docker run issue (#3)

Oh pip =(.

I'm not sure but maybe you can update your base layer of docker's python, the docker python 2.7 container, then maybe this bug will go away? I'm not sure how to do that.

Maybe try all this on a new machine. A fresh install might not see this problem.

Daniel Snider ツ

On Sun, Sep 24, 2017 at 11:38 PM, rocklinsuv [email protected] wrote:

I believe it was any package. So it was the "pip install" failed.

― You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331769618, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWPZqep5ExFGZxDkiFIryow-isqnzks5slyBCgaJpZM4PgemM .

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-331771518, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHFKcxqTZN-XS51K2uWkFgC7PbrFxNNXks5slyS9gaJpZM4PgemM.

rocklinsuv avatar Sep 25 '17 04:09 rocklinsuv

Hi Daniel,

I'm so glad that I've resolved the problem. I was using Ubuntu Mate 16.04 32bit with docker.io, so now I switched to Ubuntu Mate 16.04 64bit with docker-ce and the error is GONE! Now I'm re-installing ROS to test MapViz :D.

Best Regards, rocklinsuv

rocklinsuv avatar Sep 25 '17 10:09 rocklinsuv

Okay, it's done! Thank you so much for your help :+1: screenshot at 2017-09-25 09 17 36

Also, I'm wondering if we could install MapProxy individually (not in docker) and achieve the same thing? I suppose we just need to modify the yaml file to set the ports correctly. Is it correct?

rocklinsuv avatar Sep 26 '17 02:09 rocklinsuv

Yes you could achieve the same thing without docker, just follow mapproxy setup steps found in this file https://github.com/danielsnider/docker-mapproxy-googlemaps/blob/master/Dockerfile

Daniel Snider ツ

On Mon, Sep 25, 2017 at 10:06 PM, rocklinsuv [email protected] wrote:

Okay, it's done! Thank you so much for your help 👍 [image: screenshot at 2017-09-25 09 17 36] https://user-images.githubusercontent.com/7424627/30839067-0f8b3b42-a2a2-11e7-83eb-4a2898158ef1.png

Also, I'm wondering if we could install MapProxy individually (not in docker) and achieve the same thing? I suppose we just need to modify the yaml file to set the ports correctly. Is it correct?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite/issues/3#issuecomment-332064932, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqDWABTKu_7nmdyjee28smfvrEKWxWdks5smFxDgaJpZM4PgemM .

danielsnider avatar Sep 26 '17 13:09 danielsnider

Hi Daniel,

It's me again. I've encountered a seeding issue so I would like to see you have any thought. My seed.yaml file looks like this:

seeds: myseed1: caches: [gm_cache] grids: [gm_grid] coverages: [act] levels: to: 16 refresh_before: time: 2013-10-10T12:35:00 coverages: act: datasource: 'shp/ACT_STATE_POLYGON_shp.shp' srs: 'EPSG:4283'

The shape file contains the boundary of Australian Captial Territory in EPSG 4283 coordinate. I managed to cache the entire ACT area using the mapproxy-seed -f mapproxy.yaml -s seed.yaml -c 6 command. After seeding, I launched MapViz, zoomed in to the ACT area, disconnected the internet to see if MapViz will load the map from MapProxy local cache. However, the map looks like empty. I did check the cache_data folder and it contains the PNG files (several MBs of data). I'm wondering if there's anything I've done wrong, maybe the srs:EPSG stuff?. Any thought would be very much appreciated! BTW, I'm not using docker but directly porting MapProxy to MapViz.

Cheers, rocklinsuv

rocklinsuv avatar Oct 24 '17 03:10 rocklinsuv

LMAO, I'm such an idiot. A simple click on the "Save" button solved all the problem lol. Sorry to bother you again :D

rocklinsuv avatar Oct 24 '17 11:10 rocklinsuv