Automount through sssd issue

automount complains “[FONT=arial]mount(nfs): no hosts available” after retrieving the correct host and filesystem from LDAP.

Using exactly the same configuration as a working Leap 15.3 installation. Mounting the remote file system manually works properly.

What am I missing?

[/FONT]

mount.nfs cannot contact portmapper. Is network up when mount is attempted?

Network is up. I can mount manually, but cannot cd into an automounted partition.

I removed ypbind, rpcbind, and rpc-statd from autofs.service to match the setup on Leap 15.3 and rebooted. Same error.

Then at least show that configuration. We can not comment on it when we do not know it.

[quote="“hcvv,post:4,topic:149602”]

As requested. In order, sssd.conf, autofs.conf, auto.master, autofs.service.

autofs.service was modified to correct $OPTIONS to $AUTOFS_OPTIONS (bug to be submitted elsewhere) and I removed the dependencies on ypbind, rpcbind, and rpc-statd.


[sssd]
config_file_version = 2
services = nss, pam, autofs
domains = default


[nss]
filter_groups = root
filter_users = root


[pam]


[domain/default]
auth_provider = ldap
cache_credentials = True
chpass_provider = ldap
entry_cache_timeout = 30
enumerate = False
id_provider = ldap
ldap_group_object_class = posixGroup
ldap_group_search_base = ou=Group,dc=example,dc=com
ldap_id_use_start_tls = False
ldap_schema = rfc2307
ldap_search_base = dc=example,dc=com
ldap_tls_cert = /etc/openldap/certs/ritchie.pem
ldap_tls_reqcert = demand
ldap_uri = ldaps://ritchie.example.com
ldap_user_search_base = ou=People,dc=example,dc=com
max_id = 0
min_id = 1


[autofs]


 autofs ]
master_map_name = auto.master
timeout = 300
browse_mode = no
map_object_class = nisMap
entry_object_class = nisObject
map_attribute = nisMapName
entry_attribute = cn
value_attribute= nisMapEntry
mount_verbose = yes
 amd ]
dismount_interval = 300


/home ldaps://ritchie.example.com/nisMapName=auto.home,dc=example,dc=com
/user ldaps://ritchie.example.com/nisMapName=auto.user,dc=example,dc=com


[Unit]
Description=Automounts filesystems on demand
After=network.target sssd.service network-online.target remote-fs.target
Wants=network-online.target


[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/autofs
ExecStart=/usr/sbin/automount $AUTOFS_OPTIONS --systemd-service --dont-check-daemon
ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
TimeoutSec=180


[Install]
WantedBy=multi-user.target

[quote="“mleisher,post:5,topic:149602”]

Just to reiterate, the presence or absence of ypbind, rpcbind, and rpc-statd dependencies in autofs.service doesn’t seem to make any difference.

Got the same Problem without changing my configs on an up to date Tumbleweed. Guess it came with an update in the last days.

/etc/autofs.conf

 autofs ]timeout = 300
mount_verbose = no
browse_mode = no
logging = debug
 amd ]
dismount_interval = 300

/etc/auto.master.d/bebelbrux.autofs

/-      /etc/auto.master.d/bebelbrux.auto --timeout=60,--ghost

/etc/auto.master.d/bebelbrux.auto

/mnt/autofs/all                 -fstype=nfs4,rw,soft   192.168.0.1:/

When I call automount -fv and enter the automount directory I got following error

handle_packet: type = 5
handle_packet_missing_direct: token 9, name /mnt/autofs/all, request pid 12122
attempting to mount entry /mnt/autofs/all
lookup_mount: lookup(file): looking up /mnt/autofs/all
lookup_mount: lookup(file): /mnt/autofs/all -> -fstype=nfs4,rw,soft   192.168.0.1:/
parse_mount: parse(sun): expanded entry: -fstype=nfs4,rw,soft   192.168.0.1:/
parse_mount: parse(sun): gathered options: fstype=nfs4,rw,soft
parse_mount: parse(sun): dequote("192.168.0.1:/") -> 192.168.0.1:/
parse_mount: parse(sun): core of entry: options=fstype=nfs4,rw,soft, loc=192.168.0.1:/
sun_mount: parse(sun): mounting root /mnt/autofs/all, mountpoint /mnt/autofs/all, what 192.168.0.1:/, fstype nfs4, options rw,soft
mount(nfs): root=/mnt/autofs/all name=/mnt/autofs/all what=192.168.0.1:/, fstype=nfs4, options=rw,soft
mount(nfs): nfs options="rw,soft", nobind=0, nosymlink=0, ro=0
get_nfs_info: called with host 192.168.0.1(192.168.0.1) proto 6 version 0x40
get_portmap_client: error 0x3 getting portmap client
mount(nfs): no hosts available
lookup_mount: lookup(file): looking up /mnt/autofs/all
dev_ioctl_send_fail: token = 9
failed to mount /mnt/autofs/all

When I mount manually the same directory with exactly the same parameters it works

mount -t nfs4 -o rw,soft 192.168.0.1:/ /mnt/autofs/all

Does anybody knows about updates for automount or related libs in the last 7 Days?

Yes, that is the same problem. automountd tries to check that server is available and for some reasons fails.

When I mount manually the same directory with exactly the same parameters it works

mount -t nfs4 -o rw,soft 192.168.0.1:/ /mnt/autofs/all

mount.nfs just calls into kernel and lets kernel to do the job. Apparently kernel does something differently than automountd.

Does anybody knows about updates for automount or related libs in the last 7 Days?

It could be anything else that affects automountd. You should open bug report so developers are aware of this problem.

This is caused by an upstream bug in autofs-5.1.8
You can work-around it by adding “port=2049” to the mount options in your mount map.
Or you can install an rpm from https://download.opensuse.org/repositories/home:/neilbrown:/branches:/filesystems/openSUSE_Tumbleweed/
Or you can wait until that fix that I submitted gets merged into Tumbleweed

Thanks! That was the solution. I added the port option and now it is working again.

/etc/auto.master.d/somefilename.auto

/mnt/autofs/all                 -fstype=nfs4,rw,soft,***port=2049***  192.168.0.1:/

Finally got around to updating and restarting. Autofs through sssd works properly now. Thanks!