CentOS 8 KVM -- Reboot Yields fatal: parameter inet_interfaces Error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CentOS 8 KVM -- Reboot Yields fatal: parameter inet_interfaces Error

Greg Sims
Hi There,

We have a CentOS 7 Server that is running several KVMs of both CentOS 7 and CentOS 8.  We have a CentOS 7/Postfix KVM running as a production mail server in this environment.  

I am trying to build a CentOS 8/Postfix KVM -- but run into an error on reboot.  Here is the full error:

fatal: parameter inet_interfaces: no local interface found for 10.81.198.165

Postfix is only listening on the private network and localhost.  This is specified in main.cf using:

#   listen on the private network and localhost
inet_interfaces = 10.81.198.165, 127.0.0.1

The KVM has bridged interfaces to DOM0 for both the Private (ens3) & Public (ens4) networks.  Here is what "ip addr" looks like for ens3:

2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:61:1c:20 brd ff:ff:ff:ff:ff:ff
    inet 10.81.198.165/27 brd 10.81.198.191 scope global noprefixroute ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::687f:d0c7:d4fc:8b69/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

It is interesting to note the following:
  • If I "systemctl restart postfix", the restart will happen successfully.
  • If I reboot the KVM, I will see the error above after the reboot
  • I have tried changing Postfix and System configuration to get around this -- no luck so far.
Thanks in advance, Greg
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 8 KVM -- Reboot Yields fatal: parameter inet_interfaces Error

Pau Amma
On 2020-06-25 01:39, Greg Sims wrote:
> It is interesting to note the following:
>
>    - If I "systemctl restart postfix", the restart will happen
> successfully.
>    - If I reboot the KVM, I will see the error above after the reboot
>    - I have tried changing Postfix and System configuration to get
> around
>    this -- no luck so far.

I'm not a Centos (or even Linux) expert, but the above tells me that
Postfix starts on boot before ens3 is configured - or maybe even before
it exists.
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 8 KVM -- Reboot Yields fatal: parameter inet_interfaces Error

Bob Proulx
In reply to this post by Greg Sims
Greg Sims wrote:
> fatal: parameter inet_interfaces: no local interface found for 10.81.198.165

How is the network configured?  Netplan?  If netplan then what
"renderer" is configured?  systemd-networkd?  Is it a local static IP
configuration?  Or DHCP?

I have observed systemd-networkd to not wait for DHCP to complete but
start services that depend upon the network before the network has
been brought online.  Your description of the problem matches this
problematic behavior.

If so then I would set a static IP address when would initialize
faster than waiting for a DHCP server to respond.  And since the
description is for a mail server then it really should have a static
IP address assignment.  However I imagine that one might rely upon a
DHCP address reservation to always configure the same address.

> It is interesting to note the following:
>
>    - If I "systemctl restart postfix", the restart will happen successfully.

By the time you restart postfix the network has finished coming
online.  So of course there is no problem then.

>    - If I reboot the KVM, I will see the error above after the reboot

The error indicates that when Postfix is started the networking is not
yet available.

The problem as described seems not to involve Postfix so much as the
init system that is starting daemons needing the network without
waiting for the network to finish initializing.

Bob
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 8 KVM -- Reboot Yields fatal: parameter inet_interfaces Error

Peter Ajamian
In reply to this post by Greg Sims
On 25/06/20 11:39 am, Greg Sims wrote:
> Hi There,
>
> We have a CentOS 7 Server that is running several KVMs of both CentOS 7
> and CentOS 8.  We have a CentOS 7/Postfix KVM running as a production
> mail server in this environment.
...
>     fatal: parameter inet_interfaces: no local interface found for
>     10.81.198.165
...
>   * If I "systemctl restart postfix", the restart will happen successfully.
>   * If I reboot the KVM, I will see the error above after the reboot

This is actually a packaging problem from CentOS.  The systemd service
file is not configured to wait until networkign is up before it attempts
to start postfix.  Try the following:

Run "systemctl edit postfix.service" and insert:

[Unit]
After=network-online.target


This should tell systemd to wait until networking is up before it
attempts to start postfix.


Peter