简体   繁体   English

modprobe:错误:无法插入'tun':模块中的未知符号或未知参数(请参阅dmesg)

[英]modprobe: ERROR: could not insert 'tun': Unknown symbol in module, or unknown parameter (see dmesg)

My server runs openvpn client, it was working fine. 我的服务器运行openvpn客户端,它工作正常。 But after a server reboot, I couldn't startup the openvpn client. 但是在服务器重启后,我无法启动openvpn客户端。

openvpn log says: openvpn日志说:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)

but

lyq@server:~$ ls /dev/net/tun -l
crw-rw-rw- 1 root root 10, 200 Feb 27 13:44 /dev/net/tun

After some searching, I found this command: 经过一番搜索,我找到了这个命令:

lyq@server:~$ sudo modprobe tun
modprobe: ERROR: could not insert 'tun': Unknown symbol in module, or unknown parameter (see dmesg)

and the 'dmesg' says: 而'dmesg'说:

[  991.073261] tun: Unknown symbol __sk_attach_filter (err 0)
[  991.073347] tun: Unknown symbol __sk_detach_filter (err 0)

I need help, thank you very much. 我需要帮助,非常感谢你。

The "No such device" message means that no device driver with the major and minor numbers of the device node (10 and 100 in your case) exists. “没有这样的设备”消息意味着没有设备驱动程序具有设备节点的主要和次要编号(在您的情况下为10和100)。 The reason for that is most likely that the "tun" driver failed to load, and the reason for that appears to be that the __sk_attach_filter and __sk_detach_filter symbols do not exist in the kernel you're running. 原因很可能是“tun”驱动程序无法加载,原因似乎是您正在运行的内核中不存在__sk_attach_filter和__sk_detach_filter符号。

Since you say this happened after a reboot, it is likely that the kernel image was upgraded some time before that reboot, and this is the first time the system boots with the new kernel. 由于您说这是在重新启动后发生的,因此很可能在重新启动之前的某个时间内升级了内核映像,这是系统第一次使用新内核启动。 Missing symbol errors tend to be due to the module versions not matching the kernel version. 缺少符号错误往往是由于模块版本与内核版本不匹配。

Did you build the kernel yourself, or did you install it from som package manager? 您是自己构建内核还是从som软件包管理器安装它? If you installed it by yourself, try again and make sure to run "make modules_install" (see eg https://unix.stackexchange.com/questions/20864/what-happens-in-each-step-of-the-linux-kernel-building-process for information about the kernel build targets). 如果您自己安装,请再次尝试并确保运行“make modules_install”(参见https://unix.stackexchange.com/questions/20864/what-happens-in-each-step-of-the-linux -kernel-building-process以获取有关内核构建目标的信息。 If you installed via a package manager, check if there some kernel modules package or tun driver package that needs to be upgraded. 如果您是通过包管理器安装的,请检查是否有某些内核模块包或者需要升级的tun驱动程序包。

I had this same problem after updating the system. 更新系统后我遇到了同样的问题。 A reboot fixed it, so one of the updates must have been a kernel update. 重新启动修复它,因此其中一个更新必须是内核更新。

Make sure your modules and kernel match. 确保您的模块和内核匹配。

Make sure that your bootloader is loading the kernel that you think it is loading. 确保引导加载程序正在加载您认为正在加载的内核。

In my case, there was a knocked out RAID1 member (sdb1) in the system and the boot loader was loading the (incorrect, old?) kernel from that faulty sdb1, and not from healthy RAID1 members sda1 or sdc1. 在我的情况下,系统中有一个被淘汰的RAID1成员(sdb1),并且引导加载程序正在从该错误的sdb1加载(错误的,旧的?)内核,而不是从健康的RAID1成员sda1或sdc1加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM