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

NFS Client Connection Error #39

Open
capriciousduck opened this issue Dec 12, 2019 · 10 comments
Open

NFS Client Connection Error #39

capriciousduck opened this issue Dec 12, 2019 · 10 comments

Comments

@capriciousduck
Copy link

I deployed this image on my linux laptop and trying to mount the shares in my raspberry pi(running debian). I get the following error.

sudo mount -v 10.0.0.58:/ /mnt/nfs-p4
mount.nfs: timeout set for Thu Dec 12 10:20:10 2019
mount.nfs: trying text-based options 'vers=4.2,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.58'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Unable to receive
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.58'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Unable to receive
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.58'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Unable to receive
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.58,clientaddr=10.0.0.33'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.58'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Unable to receive
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused

Though, my container logs show no errors. The log from container is below.


docker logs 09665f043dfd
Writing SHARED_DIRECTORY to /etc/exports file
The PERMITTED environment variable is unset or null, defaulting to '*'.
This means any client can mount.
The READ_ONLY environment variable is unset or null, defaulting to 'rw'.
Clients have read/write access.
The SYNC environment variable is set, using 'sync' mode.
Writes will be immediately written to disk.
Displaying /etc/exports contents:
/nfsshare *(rw,fsid=0,sync,no_subtree_check,no_auth_nlm,insecure,no_root_squash)

Starting rpcbind...
Displaying rpcbind status...
   program version netid     address                service    owner
    100000    4    tcp6      ::.0.111               -          superuser
    100000    3    tcp6      ::.0.111               -          superuser
    100000    4    udp6      ::.0.111               -          superuser
    100000    3    udp6      ::.0.111               -          superuser
    100000    4    tcp       0.0.0.0.0.111          -          superuser
    100000    3    tcp       0.0.0.0.0.111          -          superuser
    100000    2    tcp       0.0.0.0.0.111          -          superuser
    100000    4    udp       0.0.0.0.0.111          -          superuser
    100000    3    udp       0.0.0.0.0.111          -          superuser
    100000    2    udp       0.0.0.0.0.111          -          superuser
    100000    4    local     /var/run/rpcbind.sock  -          superuser
    100000    3    local     /var/run/rpcbind.sock  -          superuser
Starting NFS in the background...
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: -2 -3
rpc.nfsd: Created AF_INET TCP socket.
rpc.nfsd: Created AF_INET6 TCP socket.
Exporting File System...
exporting *:/nfsshare
/nfsshare       <world>
Starting Mountd in the background...These
Startup successful.
@nickma82
Copy link

nickma82 commented Apr 8, 2021

Which command did you use to start it up?

@sureshjoshi
Copy link

@capriciousduck Any luck with this? I have the same issue

@sureshjoshi
Copy link

Nevermind, turns out I had mis-typed my ports.

docker run --name nfs --privileged -v /tmp/nfs:/nfsshare -e SHARED_DIRECTORY=/nfsshare -p "2049:2049" itsthenetwork/nfs-server-alpine:latest

@fvfvsda
Copy link

fvfvsda commented Mar 28, 2022

I have the same problem. Have you found a way to solve it? @capriciousduck

@TheNexter
Copy link

@fvfvsda @capriciousduck Hello, same problem, do you find a way to solve the problem ? 3 Months stuck with simple thing like this :(

@fvfvsda
Copy link

fvfvsda commented Apr 27, 2022

You can try to refer to docker-compose.yml in this website. I hope this can help you. https://blog.siaimes.me/2021/01/01/p54.html#more @TheNexter

@TheNexter
Copy link

You can try to refer to docker-compose.yml in this website. I hope this can help you. https://blog.siaimes.me/2021/01/01/p54.html#more @TheNexter

It's work for you ? :(

@fvfvsda
Copy link

fvfvsda commented Apr 29, 2022

You can try to refer to docker-compose.yml in this website. I hope this can help you. https://blog.siaimes.me/2021/01/01/p54.html#more @TheNexter

It's work for you ? :(

The file in the container named nfsd.sh also need to be modified. You can refer to this. siaimes@15ff1e0

@jaykishan007
Copy link

jaykishan007 commented Feb 7, 2024

Do we have a solution yet? Stuck with this for a while now. @sureshjoshi @capriciousduck @sjiveson

I am running this as a stand alone container, facing the same problem and yes the privileged: true

version: '3'
services:
  nfs-server:
    image: itsthenetwork/nfs-server-alpine:latest-arm
    container_name: nfs-server
    ports:
      - "2049:2049"
    volumes:
      - ./shared:/nfsshare
    environment:
      - SHARED_DIRECTORY=/nfsshare
    privileged: true
    restart: always

Yet when I try to mount from host

sudo mount -v 192.168.29.203:/nfsshare ./somelocalplace

gives connection refused.

Screenshot 2024-02-07 at 4 52 51 PM

@AiAutomationAgency
Copy link

AiAutomationAgency commented Aug 30, 2024

Hi,
Try this:
sudo mount.nfs4 -v 192.168.29.203:/ ./somelocalplace
Without "nfsshare" just "/"

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

7 participants