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

Can't execute install_splash() #3

Closed
fzenoni opened this issue Feb 15, 2017 · 9 comments
Closed

Can't execute install_splash() #3

fzenoni opened this issue Feb 15, 2017 · 9 comments
Assignees
Labels

Comments

@fzenoni
Copy link

fzenoni commented Feb 15, 2017

Hi,
Following the instructions reported on this blog post, I got stuck when executing install_splash().
The provided error is the following one:
Error in sys::exec_internal(docker, args = args, error = TRUE) : Executing '/usr/bin/docker' failed with status 1
despite the fact that I can definitely execute docker by typing /usr/bin/docker or even only docker in the terminal. My OS is Ubuntu 16.04.2 LTS.

@The-Dub
Copy link

The-Dub commented Feb 15, 2017

Almost the same, I tried to follow the blog post and reproduce the example, but when trying to run the install_splash, I have the following error
Error: Failed to execute '' (No such file or directory)

Same OS as @fzenoni, Ubuntu 16.04, latest version of R and RStudio

@hrbrmstr
Copy link
Owner

Cool. Thx for posting. I tested on a 16.04.1 system about an hour ago and it worked w/o a hitch. Can you provide a bit more detail on your respective setups? I can try to replicate in a Vagrant VM to see what I need to do to accommodate. In reality, it's a bit of code in wch/harbor that's really the issue but I'm the maintainer on that now so the issue here is fine.

The code in question in harbor is: https://github.com/wch/harbor/blob/master/R/localhost.R#L17-L28. It's not doing much, but from both reports I suspect there's something PATH-related and it'd be gd to triage this to ensure smoother working of harbor and any revdeps of it.

@fzenoni
Copy link
Author

fzenoni commented Feb 16, 2017

Thanks for you answer. I run on a virtual machine (VirtualBox) with Ubuntu 16.04.2 LTS 64 bit.
RStudio Version 1.0.136
R version 3.2.3
Running echo $PATH gives the following:
/home/fzenoni/anaconda2/bin:/home/fzenoni/geckodriver:/home/fzenoni/anaconda3/bin:/home/fzenoni/bin:/home/fzenoni/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Are you looking for other specific information?

@The-Dub
Copy link

The-Dub commented Feb 16, 2017

So i tried to figure out what's going on, by using the terminal.

  1. docker_run use docker_cmd, which builds the call that sys::exec_internal executes afterwards. The help file for docker in the command line states that a proper call should be done using 'run', like 'docker run ...'. I might be wrong, but it seems that the function doesn't do that.

  2. Once I manually add 'run' to the command (e.g. docker run --name='test' 'hrbrmstr/splashttpd' -p 5023:5023 -p 8050:8050 -p 8051:8051), I get the following error:

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/containers/create?name=test: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

If I run the previous command as sudo, then it seems to be working (Which is pretty much the command line you specify in the overall description to start the docker)

So I'm a bit lost, I'm quite a newbie with dockers, but if we always have to execute them as sudo, that might be an issue to do that from R. :/

@The-Dub
Copy link

The-Dub commented Feb 17, 2017

All right, I'm a noob. You can throw stuff at me, I deserved it. I didn't add myself as part of the docker group, since I was running everything using sudo.

https://docs.docker.com/engine/installation/linux/linux-postinstall/

@fzenoni try the following in terminal

sudo groupadd docker
sudo usermod -aG docker $USER

Then log out and log back in, and give it another try.

On another note, for me, splash is located at '0.0.0.0' instead of 'splash', using the default start_splash function.

(so to access splash, you need to use splash('0.0.0.0', 8050L) %>% stuff

@fzenoni
Copy link
Author

fzenoni commented Feb 17, 2017

@The-Dub It worked! Thanks a lot! I must share your mea culpa -- I haven't read enough documentation.

@The-Dub
Copy link

The-Dub commented Feb 17, 2017

@hrbrmstr maybe add something about this on the harbor page description
I think this can be closed now

@hrbrmstr
Copy link
Owner

wow. #ty for poking at this! I will add that to the front-matter but will leave this open until i do.

@hrbrmstr
Copy link
Owner

in README now. #ty again!

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

No branches or pull requests

3 participants