Modprobe: ERROR: failed to insert "tun": unknown character in the module or unknown parameter (see dmesg)

My server starts the openvpn client, it works fine. But after rebooting the server, I could not start the openvpn client.

openvpn log says:

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 "dmesg" says:

 [ 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.

+6
source share
3 answers

The message “There is no such device” means that there is no device driver with primary and minor node device numbers (10 and 100 in your case). The reason for this is most likely that the tun driver failed to load, and the reason for this is that the __sk_attach_filter and __sk_detach_filter characters do not exist in the kernel in which you work.

Since you say that this happened after a reboot, it is likely that the kernel image was updated some time before this reboot, and this is the first time the system boots with a new kernel. Missing character errors are usually associated with module versions that do not match the kernel version.

Did you build the kernel yourself, or did you install it from the som package manager? If you installed it yourself, try again and be sure to run the "make modules_install" command (see, for example, https://unix.stackexchange.com/questions/20864/what-happens-in-each-step-of-the -linux-kernel-building-process information about the goals of building the kernel). If you installed through the package manager, check if there is a kernel module package or a driver package that needs to be updated.

+4
source

I had the same problem after updating the system. A reboot fixed it, so one of the updates was supposed to be a kernel update.

Make sure your modules and kernel match.

+1
source

Make sure your bootloader loads the kernel, which you think is loading.

In my case, there was a knocked out RAID1 member (sdb1) in the system, and the bootloader loaded (wrong, old?) Kernel from this faulty sdb1, and not from healthy RAID1 members sda1 or sdc1.

0
source

Source: https://habr.com/ru/post/1015310/


All Articles