You are not logged in.

#1 2015-07-21 21:51:41

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 458

[Solved] systemd: Failed to insert module 'ip_tables': Functi

Hello!

Systemd prints the following message during bootup:

systemd[1]: Failed to insert module 'ip_tables': Function not implemented

While I can see the message during boot of the default kernel of Archlinux (linux-4.1.2), it is not shown by dmesg (maybe a different log level?). With my self compiled vanilla kernel (4.1.2) I can see the message with dmesg, also after the bootup. I assume, this is releated to this new feature of systemd-222, but the dependencies seem not to have been modified lately.

Can you help me? I even don't use networkd, but NetworkManager.
Hoschi

// edit
I've modified the config of my custom kernel and included nearly everything from here:

  │   Location:                                                                                 │  
  │     -> Networking support (NET [=y])                                                        │  
  │       -> Networking options                                                                 │  
  │         -> Network packet filtering framework (Netfilter) (NETFILTER [=y])                  │  
  │           -> IP: Netfilter Configuration  

The message printed by dmesg is now gone and replaced by:

[    2.159241] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.159249] systemd[1]: Inserted module 'ip_tables'

This looks fine, but message "Failed to insert module 'ip_tables': Function not implemented is still printed on the terminal during bootup." is still printed on the terminal during bootup.

// edit
Final solution.

Last edited by hoschi (2015-07-22 00:06:30)

Offline

#2 2015-07-21 23:44:49

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

I would like to first say, Hi!! Beautiful country you have. I was stationed in Neu Ulm in '89-'91. Loved it there. Einstein and The Scorpions were from Ulm, weren't they?

I don't think anything is really being affected by the error. I've been watching it for the past few weeks and I don't really see anything going wrong. It might be one of those things we can ignore. I haven't really found anything about it causing any issues on the web. So, I would say to just watch it and see if anything bad happens.

Last edited by Buddlespit (2015-07-21 23:45:08)

Offline

#3 2015-07-21 23:45:41

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 458

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

Hello!

The solution is two folded:

1. If your using a self compiled kernel, enable the options in your kernel under Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration (NFT_*, including NFT_COMPAT and NETFILTER_XTABLES) and pretty much everything under IP: Netfilter Configuration
2. If your using a INITRAMFS (required with default kernel), use the "base and udev" (default) hook and not the "systemd" hook. More info could be found here. I've used the "systemd" hook in the past years, because I thought it will eventually replace the "base" and "udev" but this didn't happend. The "systemd" hook indeed looks like a little stepchild wink

With a self compiled kernel it is very likely that you don't need a INITRAMFS (mkinitcpio) at all and you could boot straight without that and therefore skip step two. With the default kernel from Archlinux you can skip step two.

Last edited by hoschi (2015-07-22 00:12:04)

Offline

#4 2015-07-22 00:00:26

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 458

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

Buddlespit wrote:

I would like to first say, Hi!! Beautiful country you have. I was stationed in Neu Ulm in '89-'91. Loved it there.

Hello. Thank you! At least during the summer Ulm is really nice. Yesterday was Schwoermontag (german language) with lots of drunken people around the entire city. Visitors are always welcome wink

Buddlespit wrote:

Einstein

Yes!

Buddlespit wrote:

...and The Scorpions were from Ulm, weren't they?

Hannover. Maybe I can offer Die Happy as replacement?

Buddlespit wrote:

I don't think anything is really being affected by the error. I've been watching it for the past few weeks and I don't really see anything going wrong. It might be one of those things we can ignore. I haven't really found anything about it causing any issues on the web. So, I would say to just watch it and see if anything bad happens.

See above, the "systemd" hooks seems to be the cause. You can revert to the default with "base and udev" or use a kernel without a INITRAMFS at all.

Good night smile

Last edited by hoschi (2015-07-22 00:07:20)

Offline

#5 2015-07-23 16:31:57

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

Here are some results from my own investigation:

- The message appears very early in systemd startup in initramfs, even before systemd logs its "welcome" message: "systemd 222 running in system mode. [...]"
- AFAICT, the message comes from the function src/core/kmod-setup.c:kmod_setup() , which early loads some kernel modules which need special treetment.
- The "Function not implemented" is a generic error message from glibc.

What worries me most is that the "Failed to insert module" message isn't logged to the journal at all, and neither is any debugging output from kmod, no matter what kernel commandline parameters I try, e.g. "systemd.log_level=debug".
This means that there is a "blind spot" between kernel boot and initramfs systemd startup in which messages simply disappear from view. Maybe someone should file a bug on systemd for this.

Last edited by ackalker (2015-07-23 16:44:44)

Offline

#6 2015-07-23 17:15:42

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

@hoschi
You were right all along! My investigation turned up the real problem: the mkinitramfs systemd hook (and also my own systemd-ng hook).
Currently, the systemd hook doesn't add the ip_tables kernel module to the initramfs. Adding the module makes the "Failed to insert" message go away.
This leaves only the "blind spot" in the logging...

Offline

#7 2015-07-23 17:57:03

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

I've taken the liberty of submitting a bug on the systemd package: https://bugs.archlinux.org/task/45754

Last edited by ackalker (2015-07-23 17:57:31)

Offline

#8 2015-07-24 12:26:56

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 458

Re: [Solved] systemd: Failed to insert module 'ip_tables': Functi

@ackalker: Well done!

Offline

Board footer

Powered by FluxBB