shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

Mount volume on windows server 2016 with docker-ce

Open countzero2323 opened this issue 6 years ago • 8 comments

Hello, I am trying to start a rstudio-container with a specific folder mounted via shinyproxy. It is working very well under Linux but in Windows I only get the shinyproxy navbar and a blank screen. If I start the rstudio-image via docker alone, the folder gets mounted without problems:

docker run -d -e ROOT=TRUE -e PASSWORD=12345 -p 8787:8787 -v C:\specific_folder:/home/rstudio --restart=always rstudio

In the application.yml I tried:

    container-volumes: 
        - "/host_mnt/c/specific_folder:/home/rstudio" 

which gave me the blank screen and

    container-volumes: 
        - "C:\specific_folder:/home/rstudio" 

which crashed the shinyproxy container almost immediately. Perhaps you can give me a small hint what I am doing wrong? Thanks in advance!

countzero2323 avatar Sep 30 '19 17:09 countzero2323

Hello, Please try the suggestions mentioned in https://support.openanalytics.eu/t/container-volumes-question/1018/3 and https://support.openanalytics.eu/t/shinyproxy-in-container-mounting-volumes-on-windows/1205

mnazarov avatar Oct 01 '19 08:10 mnazarov

Hi, I tried container-volumes: [ “C:/specific_folder:/home/rstudio” ] and the shinyproxy-container crashed 4 seconds after starting.. the same with container-volumes: [ “/c/specific_folder:/home/rstudio” ] Perhaps the log could bring some insight?

[11:47:10.084][ApiProxy       ][Info   ] time="2019-10-01T11:47:10+02:00" msg="proxy >> GET /_ping\n"
[11:47:10.086][ApiProxy       ][Info   ] time="2019-10-01T11:47:10+02:00" msg="proxy << GET /_ping (1.9996ms)\n"
[11:47:10.087][ApiProxy       ][Info   ] time="2019-10-01T11:47:10+02:00" msg="proxy >> GET /v1.39/containers/json?all=1\n"
[11:47:10.091][ApiProxy       ][Info   ] time="2019-10-01T11:47:10+02:00" msg="proxy << GET /v1.39/containers/json?all=1 (4.9981ms)\n"
[11:47:17.404][ApiProxy       ][Info   ] time="2019-10-01T11:47:17+02:00" msg="proxy >> GET /_ping\n"
[11:47:17.406][ApiProxy       ][Info   ] time="2019-10-01T11:47:17+02:00" msg="proxy << GET /_ping (1.9975ms)\n"
[11:47:17.407][ApiProxy       ][Info   ] time="2019-10-01T11:47:17+02:00" msg="proxy >> DELETE /v1.39/containers/shinyproxy?force=1\n"
[11:47:17.417][ApiProxy       ][Info   ] time="2019-10-01T11:47:17+02:00" msg="proxy << DELETE /v1.39/containers/shinyproxy?force=1 (10.006ms)\n"
[11:47:20.500][ApiProxy       ][Info   ] time="2019-10-01T11:47:20+02:00" msg="proxy >> GET /_ping\n"
[11:47:20.502][ApiProxy       ][Info   ] time="2019-10-01T11:47:20+02:00" msg="proxy << GET /_ping (2.936ms)\n"
[11:47:20.502][ApiProxy       ][Info   ] time="2019-10-01T11:47:20+02:00" msg="proxy >> GET /v1.39/containers/json\n"
[11:47:20.505][ApiProxy       ][Info   ] time="2019-10-01T11:47:20+02:00" msg="proxy << GET /v1.39/containers/json (2.9448ms)\n"
[11:47:23.797][ApiProxy       ][Info   ] time="2019-10-01T11:47:23+02:00" msg="proxy >> GET /_ping\n"
[11:47:23.799][ApiProxy       ][Info   ] time="2019-10-01T11:47:23+02:00" msg="proxy << GET /_ping (1.9995ms)\n"
[11:47:23.799][ApiProxy       ][Info   ] time="2019-10-01T11:47:23+02:00" msg="proxy >> GET /v1.39/images/json\n"
[11:47:23.806][ApiProxy       ][Info   ] time="2019-10-01T11:47:23+02:00" msg="proxy << GET /v1.39/images/json (6.9996ms)\n"
[11:47:33.797][ApiProxy       ][Info   ] time="2019-10-01T11:47:33+02:00" msg="proxy >> GET /_ping\n"
[11:47:33.800][ApiProxy       ][Info   ] time="2019-10-01T11:47:33+02:00" msg="proxy << GET /_ping (2.9956ms)\n"
[11:47:33.801][ApiProxy       ][Info   ] time="2019-10-01T11:47:33+02:00" msg="proxy >> DELETE /v1.39/images/shinyproxy_win?force=1\n"
[11:47:34.144][ApiProxy       ][Info   ] time="2019-10-01T11:47:34+02:00" msg="proxy << DELETE /v1.39/images/shinyproxy_win?force=1 (343.0065ms)\n"
[11:47:43.934][ApiProxy       ][Info   ] time="2019-10-01T11:47:43+02:00" msg="proxy >> GET /_ping\n"
[11:47:43.936][ApiProxy       ][Info   ] time="2019-10-01T11:47:43+02:00" msg="proxy << GET /_ping (1.9937ms)\n"
[11:47:43.939][ApiProxy       ][Info   ] time="2019-10-01T11:47:43+02:00" msg="proxy >> POST /v1.39/images/load?quiet=0\n"
[11:48:04.788][ApiProxy       ][Info   ] time="2019-10-01T11:48:04+02:00" msg="proxy << POST /v1.39/images/load?quiet=0 (20.8482858s)\n"
[11:49:00.847][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> GET /_ping\n"
[11:49:00.850][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy << GET /_ping (2.9971ms)\n"
[11:49:00.851][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> POST /v1.39/containers/create?name=shinyproxy [rewriteBinds]\n"
[11:49:00.851][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="Rewrote mount /var/run/docker.sock:/var/run/docker.sock (volumeDriver=) to /var/run/docker.sock:/var/run/docker.sock"
[11:49:00.852][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> POST /v1.39/containers/create?name=shinyproxy\n"
[11:49:00.990][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy << POST /v1.39/containers/create?name=shinyproxy (138.7922ms)\n"
[11:49:00.990][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> POST /v1.39/containers/d50d70056536c54eb3b0bf78ce7398890e002c90b36174a51475618c3a06d3bf/wait?condition=next-exit\n"
[11:49:00.996][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> POST /v1.39/containers/d50d70056536c54eb3b0bf78ce7398890e002c90b36174a51475618c3a06d3bf/start [start]\n"
[11:49:00.996][ApiProxy       ][Info   ] time="2019-10-01T11:49:00+02:00" msg="proxy >> POST /v1.39/containers/d50d70056536c54eb3b0bf78ce7398890e002c90b36174a51475618c3a06d3bf/start\n"
[11:49:01.037][Moby           ][Info   ] [24490.982712] br-b63ec553e741: port 1(veth4767eca) entered blocking state
[11:49:01.068][Moby           ][Info   ] [24491.016197] br-b63ec553e741: port 1(veth4767eca) entered disabled state
[11:49:01.092][Moby           ][Info   ] [24491.047853] device veth4767eca entered promiscuous mode
[11:49:01.122][Moby           ][Info   ] [24491.071786] IPv6: ADDRCONF(NETDEV_UP): veth4767eca: link is not ready
[11:49:01.262][Moby           ][Info   ] [24491.215377] IPVS: Creating netns size=2104 id=21
[11:49:01.289][Moby           ][Info   ] [24491.241442] IPVS: ftp: loaded support on port[0] = 21
[11:49:01.534][Moby           ][Info   ] [24491.491308] eth0: renamed from vethcd8fd94
[11:49:01.617][Moby           ][Info   ] [24491.560636] IPv6: ADDRCONF(NETDEV_CHANGE): veth4767eca: link becomes ready
[11:49:01.650][Moby           ][Info   ] [24491.596456] br-b63ec553e741: port 1(veth4767eca) entered blocking state
[11:49:01.682][Moby           ][Info   ] [24491.628807] br-b63ec553e741: port 1(veth4767eca) entered forwarding state
[11:49:01.918][ApiProxy       ][Info   ] time="2019-10-01T11:49:01+02:00" msg="proxy << POST /v1.39/containers/d50d70056536c54eb3b0bf78ce7398890e002c90b36174a51475618c3a06d3bf/start (922.435ms)\n"
[11:49:01.921][ApiProxy       ][Info   ] time="2019-10-01T11:49:01+02:00" msg="Cancel connection..."
[11:49:01.922][ApiProxy       ][Info   ] time="2019-10-01T11:49:01+02:00" msg="proxy << POST /v1.39/containers/d50d70056536c54eb3b0bf78ce7398890e002c90b36174a51475618c3a06d3bf/wait?condition=next-exit (932.4312ms)\n"
[11:49:03.865][Moby           ][Info   ] [24493.810524] br-b63ec553e741: port 1(veth4767eca) entered disabled state
[11:49:03.888][Moby           ][Info   ] [24493.845458] vethcd8fd94: renamed from eth0
[11:49:04.024][Moby           ][Info   ] [24493.965847] br-b63ec553e741: port 1(veth4767eca) entered disabled state
[11:49:04.047][Moby           ][Info   ] [24494.004268] device veth4767eca left promiscuous mode
[11:49:04.078][Moby           ][Info   ] [24494.027162] br-b63ec553e741: port 1(veth4767eca) entered disabled state
[11:49:04.784][ApiProxy       ][Info   ] time="2019-10-01T11:49:04+02:00" msg="proxy >> GET /_ping\n"
[11:49:04.785][ApiProxy       ][Info   ] time="2019-10-01T11:49:04+02:00" msg="proxy << GET /_ping (1.0035ms)\n"
[11:49:04.786][ApiProxy       ][Info   ] time="2019-10-01T11:49:04+02:00" msg="proxy >> GET /v1.39/containers/json\n"
[11:49:04.801][ApiProxy       ][Info   ] time="2019-10-01T11:49:04+02:00" msg="proxy << GET /v1.39/containers/json (15.0061ms)\n"
[11:49:09.261][ApiProxy       ][Info   ] time="2019-10-01T11:49:09+02:00" msg="proxy >> GET /_ping\n"
[11:49:09.263][ApiProxy       ][Info   ] time="2019-10-01T11:49:09+02:00" msg="proxy << GET /_ping (1.999ms)\n"
[11:49:09.264][ApiProxy       ][Info   ] time="2019-10-01T11:49:09+02:00" msg="proxy >> GET /v1.39/containers/json\n"
[11:49:09.273][ApiProxy       ][Info   ] time="2019-10-01T11:49:09+02:00" msg="proxy << GET /v1.39/containers/json (9.0109ms)\n"

countzero2323 avatar Oct 01 '19 09:10 countzero2323

Have you tried to open the link in Chrome?

shrektan avatar Oct 01 '19 14:10 shrektan

I run shinyproxy in a container too. So, if I try to mount the volumes with container-volumes: [ “C:/specific_folder:/home/rstudio” ] or container-volumes: [ “/c/specific_folder:/home/rstudio” ] the shinyproxy-container crashes. No shinyproxy-container, no frontend.. guess I will have to spend some time with java and spring.. Shinyproxy is an essential part of my diy-framework but still a blackbox for me. Thx for your time and your ideas!

countzero2323 avatar Oct 02 '19 13:10 countzero2323

I think shinyproxy's framework is quite straightforward. If you can run it in the command line, then it must be related to some configuration being set-up wrongly. If you are using shinyproxy on Windows, you may try to use my docker-compose example https://github.com/shrektan/shinyproxy-docker-compose-example to see if it works.

shrektan avatar Oct 02 '19 15:10 shrektan

I think it is a matter of finding how the volumes need to be defined on docker compose for windows, and not a shinyproxy issue per se. Unfortunately, I don't have much experience with running docker compose on windows, and I am sorry to hear that suggestions from the forum didn't work. Could you check the error in the shinyproxy's log file? The log you posted doesn't look like the shinyproxy one...

mnazarov avatar Oct 03 '19 07:10 mnazarov

The log I posted is from the docker client. Because of running shinyproxy in a container and thanks to the immediate crashing, I cant exec /bin/bash into the container. Tried to copy the log with

docker cp <container>:/opt/shinyproxy/shinyproxy.log c:\temp

but the silent container doesn't seem to have a log at all. Meanwhile I will give Shrektans docker-compose examples a shot. It may only be a matter of time until I find the right configuration pattern;) Thx for your help so far!

countzero2323 avatar Oct 04 '19 11:10 countzero2323

also you can configure the log to be stored in a volume-mapped folder, so that it persists on the host for you to check later.

mnazarov avatar Oct 06 '19 19:10 mnazarov