如何调试失败的 CIFS 连接?

如何调试失败的 CIFS 连接?

仅通过一个特定的 ubuntu 实例/设备,与 Samba 共享的连接就会失败 — — 任何我可以检查的想法都将受到热烈欢迎。

    sudo dmesg:
    [ 1214.845174] CIFS: Attempting to mount \\server\share
    [ 1214.983692] CIFS: VFS: \\server failed to connect to IPC (rc=-13)
    [ 1214.983709] CIFS: VFS: session 00000000baa945de has no tcon available for a dfs referral request
    [ 1215.014863] CIFS: VFS: cifs_mount failed w/return code = -107

之前可以安装共享,但在系统发生未知更改后停止工作。为了解决这个问题,我从 22.04 LTS 升级到了 23.04 - 不幸的是问题仍然存在。其他设备仍然可以连接到共享。

示例挂载命令(fstab 之前已配置并运行良好)导致上述错误:

sudo mount -t cifs -o vers=3.0,username=user,password=secret //server/share /mnt/mountpoint/

我检查了 iptables - 似乎没有定义阻止 udp 的规则:

sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Apparmor 似乎也没有阻止任何东西:

sudo apparmor_status
apparmor module is loaded.
84 profiles are loaded.
82 profiles are in enforce mode.
   /snap/snapd/19993/usr/lib/snapd/snap-confine
   /snap/snapd/19993/usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /snap/snapd/20092/usr/lib/snapd/snap-confine
   /snap/snapd/20092/usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /usr/bin/evince
   /usr/bin/evince-previewer
   /usr/bin/evince-previewer//sanitized_helper
   /usr/bin/evince-thumbnailer
   /usr/bin/evince//sanitized_helper
   /usr/bin/evince//snap_browsers
   /usr/bin/man
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/NetworkManager/nm-dhcp-helper
   /usr/lib/connman/scripts/dhclient-script
   /usr/lib/cups/backend/cups-pdf
   /usr/lib/snapd/snap-confine
   /usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /usr/sbin/cups-browsed
   /usr/sbin/cupsd
   /usr/sbin/cupsd//third_party
   /{,usr/}sbin/dhclient
   libreoffice-senddoc
   libreoffice-soffice//gpg
   libreoffice-xpdfimport
   lsb_release
   man_filter
   man_groff
   nvidia_modprobe
   nvidia_modprobe//kmod
   rsyslogd
   snap-update-ns.chromium
   snap-update-ns.cups
   snap-update-ns.firefox
   snap-update-ns.fwupd
   snap-update-ns.snap-store
   snap-update-ns.snapd-desktop-integration
   snap.chromium.chromedriver
   snap.chromium.chromium
   snap.chromium.hook.configure
   snap.cups.accept
   snap.cups.cancel
   snap.cups.cups-browsed
   snap.cups.cupsaccept
   snap.cups.cupsctl
   snap.cups.cupsd
   snap.cups.cupsdisable
   snap.cups.cupsenable
   snap.cups.cupsfilter
   snap.cups.cupsreject
   snap.cups.cupstestppd
   snap.cups.driverless
   snap.cups.gs
   snap.cups.ippeveprinter
   snap.cups.ippfind
   snap.cups.ipptool
   snap.cups.lp
   snap.cups.lpadmin
   snap.cups.lpc
   snap.cups.lpinfo
   snap.cups.lpoptions
   snap.cups.lpq
   snap.cups.lpr
   snap.cups.lprm
   snap.cups.lpstat
   snap.cups.reject
   snap.firefox.firefox
   snap.firefox.geckodriver
   snap.firefox.hook.configure
   snap.firefox.hook.connect-plug-host-hunspell
   snap.firefox.hook.disconnect-plug-host-hunspell
   snap.firefox.hook.post-refresh
   snap.fwupd.dbxtool
   snap.fwupd.fwupd
   snap.fwupd.fwupdmgr
   snap.fwupd.fwupdtool
   snap.snap-store.hook.configure
   snap.snap-store.snap-store
   snap.snap-store.ubuntu-software
   snap.snap-store.ubuntu-software-local-file
   snap.snapd-desktop-integration.hook.configure
   snap.snapd-desktop-integration.snapd-desktop-integration
   tcpdump
2 profiles are in complain mode.
   libreoffice-oosplash
   libreoffice-soffice
0 profiles are in kill mode.
0 profiles are in unconfined mode.
27 processes have profiles defined.
27 processes are in enforce mode.
   /usr/sbin/cups-browsed (5965) 
   /usr/sbin/cupsd (4108) 
   /usr/lib/cups/notifier/dbus (4277) /usr/sbin/cupsd
   /usr/lib/cups/notifier/dbus (4278) /usr/sbin/cupsd
   /usr/lib/cups/notifier/dbus (4279) /usr/sbin/cupsd
   /usr/lib/cups/notifier/dbus (4280) /usr/sbin/cupsd
   /usr/lib/cups/notifier/dbus (4281) /usr/sbin/cupsd
   /usr/sbin/rsyslogd (3970) rsyslogd
   /usr/bin/dash (4113) snap.cups.cups-browsed
   /usr/bin/dash (5648) snap.cups.cups-browsed
   /usr/bin/sleep (5649) snap.cups.cups-browsed
   /usr/bin/dash (4115) snap.cups.cupsd
   /snap/cups/980/sbin/cupsd (5232) snap.cups.cupsd
   /snap/cups/980/sbin/cups-proxyd (5233) snap.cups.cupsd
   /snap/firefox/3131/usr/lib/firefox/firefox (11307) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (11682) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (11702) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (11858) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (12031) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (12323) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (15814) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (17439) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (17601) snap.firefox.firefox
   /snap/firefox/3131/usr/lib/firefox/firefox (17801) snap.firefox.firefox
   /snap/snap-store/959/usr/bin/snap-store (7739) snap.snap-store.ubuntu-software
   /snap/snapd-desktop-integration/83/usr/bin/snapd-desktop-integration (7984) snap.snapd-desktop-integration.snapd-desktop-integration
   /snap/snapd-desktop-integration/83/usr/bin/snapd-desktop-integration (8126) snap.snapd-desktop-integration.snapd-desktop-integration
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
0 processes are in mixed mode.
0 processes are in kill mode.

谢谢您的任何意见或想法。我想避免再次设置系统。

答案1

所有功劳归于 Morbius1:在 mount 命令中添加以下选项解决了该问题:

nodfs

安装再次正常工作!

相关内容