aminvakil / docker-alpine-nfs-server

A handy Alpine Linux based NFS Server image running NFS v4 only, over TCP on port 2049
https://quay.io/aminvakil/alpine-nfs-server
GNU General Public License v3.0
5 stars 2 forks source link

Client hangs on mount #39

Open delanym opened 3 weeks ago

delanym commented 3 weeks ago

Setup

services:
  nfs-server:
    #image: itsthenetwork/nfs-server-alpine:latest
    image: quay.io/aminvakil/alpine-nfs-server:latest
    cap_add:
      - SYS_ADMIN
      - SETPCAP
    ports:
      - 10.1.1.207:2049:2049
    volumes:
      - nfsshare:/nfsshare
    restart: unless-stopped
    environment:
      - SHARED_DIRECTORY=/nfsshare

volumes:
  nfsshare:
    external: true

Logs

$ sudo docker compose up
[+] Running 1/1
 ✔ Container nfs-server-nfs-server-1  Recreated                                                                                                                                                             0.1s Attaching to nfs-server-1
nfs-server-1  | Writing SHARED_DIRECTORY to /etc/exports file
nfs-server-1  | The PERMITTED environment variable is unset or null, defaulting to '*'.
nfs-server-1  | This means any client can mount.
nfs-server-1  | The READ_ONLY environment variable is unset or null, defaulting to 'rw'.
nfs-server-1  | Clients have read/write access.
nfs-server-1  | The SYNC environment variable is unset or null, defaulting to 'async' mode.
nfs-server-1  | Writes will not be immediately written to disk.
nfs-server-1  | Displaying /etc/exports contents:
nfs-server-1  | /nfsshare *(rw,fsid=0,async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)
nfs-server-1  |
nfs-server-1  | Starting rpcbind...
nfs-server-1  | Displaying rpcbind status...
nfs-server-1  |    program version netid     address                service    owner
nfs-server-1  |     100000    4    tcp6      ::.0.111               -          superuser
nfs-server-1  |     100000    3    tcp6      ::.0.111               -          superuser
nfs-server-1  |     100000    4    udp6      ::.0.111               -          superuser
nfs-server-1  |     100000    3    udp6      ::.0.111               -          superuser
nfs-server-1  |     100000    4    tcp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    3    tcp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    2    tcp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    4    udp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    3    udp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    2    udp       0.0.0.0.0.111          -          superuser
nfs-server-1  |     100000    4    local     /var/run/rpcbind.sock  -          superuser
nfs-server-1  |     100000    3    local     /var/run/rpcbind.sock  -          superuser
nfs-server-1  | Starting NFS in the background...
nfs-server-1  | 2: Unsupported version
nfs-server-1  | Exporting File System...
nfs-server-1  | exporting *:/nfsshare
nfs-server-1  | /nfsshare       <world>
nfs-server-1  | Starting Mountd in the background...These
nfs-server-1  | Startup successful.
^CGracefully stopping... (press Ctrl+C again to force)

On other machine mount -t nfs 10.1.1.207:/ /media/nfs hangs.

showmount -e 10.1.1.207 gives clnt_create: RPC: Program not registered

aminvakil commented 1 week ago

Sorry, I've missed this, I'll check it.

aminvakil commented 1 week ago

@delanym I had another problem which got fixed by https://github.com/aminvakil/docker-alpine-nfs-server/commit/40aeb46 .

But I cannot reproduce your error as I'm facing

nfs-server-1  | Displaying rpcbind status...
nfs-server-1  | rpcinfo: can't contact rpcbind: : RPC: Unable to receive; errno = Connection reset by peer

for getting rpcbind up :)

Can you try again?