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

Getting "device not found, try 'modprobe fuse' first" error on using sshfs #286

Closed
hongooi73 opened this issue Nov 15, 2021 · 4 comments
Closed

Comments

@hongooi73
Copy link

Hi Dirk/Carl,

I'm trying to use sshfs to connect to the filesystem on one of our servers. Everything works when I do this inside an Ubuntu-based container (jupyter/datascience-notebook to be precise) but I get the above error when I try it with rocker/rstudio.

Things are complicated slightly by the fact that I also have to set some proxy info/copy certs into the image for it to connect to our network. Here is a minimal example of the dockerfile I use to do this:

FROM rocker/rstudio:latest

USER root

RUN echo 'Acquire::http::proxy "http://internal.proxy.server";' >> /etc/apt/apt.conf.d/99proxy
ENV HTTP_PROXY http://internal.proxy.server
ENV HTTPS_PROXY http://internal.proxy.server
ENV http_proxy http://internal.proxy.server
ENV https_proxy http://internal.proxy.server
ENV NO_PROXY artifactory.srv.westpac.com.au
ENV SSL_CERT_DIR /etc/ssl/certs
ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt

# Point utilities to zscaler certificate
COPY certificates/* /usr/local/share/ca-certificates/
RUN update-ca-certificates

USER rstudio

ENV HTTP_PROXY http://internal.proxy.server
ENV HTTPS_PROXY http://internal.proxy.server
ENV http_proxy http://internal.proxy.server
ENV https_proxy http://internal.proxy.server
ENV NO_PROXY artifactory.srv.westpac.com.au
ENV SSL_CERT_DIR /etc/ssl/certs
ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt

In the image, I then run

apt update
apt install sshfs

mkdir -p /opt/sas
sshfs -o idmap=user myacct@internal.sas.server:/opt/sas /opt/sas

But this results in the error shown above. The same code works without issue in an Ubuntu container, as noted.

Is there some trick to getting sshfs to work on rocker and/or Debian?

@eddelbuettel eddelbuettel transferred this issue from rocker-org/rocker Nov 15, 2021
@eddelbuettel
Copy link
Member

Good question. I only ever played a little with sshfs on my local machines here, and very rarely with remote ones I had ssh access for.

@eitsupi
Copy link
Member

eitsupi commented Nov 15, 2021

The base image of rocker/rstudio:latest is now rocker/r-ver:4.1.2, and the base image of rocker/r-ver:4.1.2 is ubuntu:focal (same with jupyter/datascience-notebook).
Is it work fine on rocker/r-ver:4.1.2 ?

If I search for the error I can find the answer that we need the --privileged option of the docker run command.
s3fs-fuse/s3fs-fuse#647

@hongooi73
Copy link
Author

@eitsupi adding --privileged did the trick. Thanks so much!

Bit weird that Ubuntu doesn't need this flag, but oh well, as long as it works.

@eitsupi
Copy link
Member

eitsupi commented Nov 16, 2021

--privileged is generally considered to be undesirable for security reasons, I believe.

If it works for the root user on ubuntu:focal, I have no idea why it would not work for the root user on rocker/rstudio.
What was the user when you ran the command in each container?
The default user of jupyter/datascience-notebook is jovyan, did you run the command as jovyan?

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

3 participants