Open tadly opened 4 years ago
Hello and my apologies for the super-long delay in responding.
A quick look at your docker-compose.yml
indicates that you perhaps forgot to expose the container ports. i.e. it should look something like this:
version: '3'
services:
nfs:
container_name: nfs
image: erichough/nfs-server:latest
network_mode: 'host'
privileged: true
volumes:
# Config
- '/docker/data/nfs/exports:/etc/exports:ro'
# Shares
- '/mnt/Backups:/Backups'
- '/mnt/Documents:/Documents'
- '/mnt/Multimedia:/Multimedia'
restart: unless-stopped
# THESE LINES ARE MISSING ...
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ports:
- 2049:2049
- 2049:2049/udp
- 111:111
- 111:111/udp
- 32765:32765
- 32765:32765/udp
- 32767:32767
- 32767:32767/udp
Give that a try?
No worries and thanks for getting back to me.
I am using network_mode: 'host'
though so I really shouldn't need that.
I tested anyways (removing host mode) and as expected I have the exact same issue.
Edit:
I just figured out the issue. It's rpcbind
which runs on port uses port 111
.
If I start the container in host
mode, nothing ever complains but silently fails to bind to that port.
When testing earlier using port-mapping I used non-existing nfs-paths as I restructured some stuff some time ago.
Okay, one more update.
I wasn't aware that rpcbind
is basically part of nfs.
On ubuntu systems, nfs-common
seems to be pre-installed which also installes and enables rpcbind
.
As such docker-nfs silently fails in host-mode or complains when trying to bind to 111
.
Solution: Either remove nfs-common
if you don't need it or systemctl mask rpcbind
Solution: Either remove nfs-common if you don't need it or systemctl mask rpcbind
On top of systemctl mask rpcbind
, I also had to:
systemctl stop rpcbind.socket
systemctl disable rpcbind.socket
While the container starts up properly without any errors, I'm unable to connect from any client. While using the hosts
nfs-server.service
everything works as expected.I sadly have no idea how to debug any of this but will gladly help any way I can. Not sure if this is connected to #41 maybe?
Infos
Apparmor I disabled and I ultimately outright purged it (don't need it)
Edit Friend just told me that it's part of the kernel. I did test with
apparmor=0
though which didn't work eitherdocker-compose
Startup-log