network.service failed because the control process exited with error code

Issues related to configuring your network
Post Reply
kissellj
Posts: 96
Joined: 2015/01/05 19:39:24

network.service failed because the control process exited with error code

Post by kissellj » 2022/02/21 23:21:25

Hi,

I recently tried to edit (as su) my

ifcfg-enp0s31f6

in folder /etc/sysconfig/network-scripts
ifcfg-enp0s31f6
I wanted to modify the file to create a static IP address. I made a backup copy before editing the file.

After making modifications to the file I ran the following command
systemctl restart network

I opened up my router using the Ip address in the file but have been unable to connect with Filezilla to FTP and out through my firewall.

I copied the backup of original config file ifcfg-enp0s31f6 back into the directory /etc/sysconfig/network-scripts.

Now when I run "systemctl restart network" I get errors which are in listed below after running
"Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details."
When I run
systemctl status network.service
and
journalctl -xe
I get detailed messages

[jkissell@localhost network-scripts]$ systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2022-02-21 15:53:12 MST; 14min ago
Docs: man:systemd-sysv-generator(8)
Process: 5074 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain network[5074]: RTNETLINK answers: File exists
Feb 21 15:53:12 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Feb 21 15:53:12 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Feb 21 15:53:12 localhost.localdomain systemd[1]: Unit network.service entered failed state.
Feb 21 15:53:12 localhost.localdomain systemd[1]: network.service failed.

[jkissell@localhost network-scripts]$ journalctl -xe
Feb 21 16:10:25 localhost.localdomain dhclient[6098]: exiting.
Feb 21 16:10:25 localhost.localdomain network[5908]: Bringing up interface myqwest4255: [ OK ]
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain network[5908]: RTNETLINK answers: File exists
Feb 21 16:10:25 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Feb 21 16:10:25 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
-- Subject: Unit network.service has failed

Can this be fixed so when I run
systemctl restart network
this restarts the network without errors?
What was wrong with my process?

Any suggestions on how to setup a static IP address to would be helpful?

Thanks
John Kissell
[email address redacted, you really don't want all the SPAM)

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network.service failed because the control process exited with error code

Post by TrevorH » 2022/02/22 00:48:42

Feb 21 16:10:25 localhost.localdomain network[5908]: Bringing up interface myqwest4255: [ OK ]
What is myqwest4255?

Where did you copy the original file to when you backed it up and how did you copy it back to /etc/sysconfig/network-scripts? The exact commands?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kissellj
Posts: 96
Joined: 2015/01/05 19:39:24

Re: network.service failed because the control process exited with error code

Post by kissellj » 2022/02/22 17:42:11

Trevor,

Thanks for the response.

I believe the myquest4255 is my old dsl modem file but not totally sure of that. I went from a dsl line in my house to gigabit ethernet. I thought I had a fresh install of CentOS 7 several years back but maybe not.

I can not give you a direct caption of the exact commands I used because I closed out the Terminal Window I was using. I'll do my best to describe what I did.

After running ip - a, I was guided to the file ifcfg-enp0s31f6. I wanted to modify this file to set a static IP address.
An article pointed me to the directory "/etc/sysconfig/network-scripts/" and said I would find the file ifcfg-INTERFACENAME or ifcfg-enp0s31f6
From that directory I did an "su" command and did the following
cp ifcfg-enp0s31f6 ifcfg-enp0s31f6_bkup
You can see this in a directory listing now.
-rw-r--r--. 1 root root 381 Oct 21 2019 ifcfg-CenturyLink8913
-rw-r--r--. 1 root root 254 Feb 21 14:29 ifcfg-enp0s31f6
-rw-r--r--. 1 root root 254 Feb 21 10:39 ifcfg-enp0s31f6_bkup
-rw-r--r--. 1 root root 254 May 22 2020 ifcfg-lo
-rw-r--r--. 1 root root 346 Jun 5 2018 ifcfg-myqwest4255
lrwxrwxrwx. 1 root root 24 Jan 16 2021 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 22 2020 ifdown-bnep
-rwxr-xr-x. 1 root root 6532 May 22 2020 ifdown-eth
-rwxr-xr-x. 1 root root 6190 Apr 28 2021 ifdown-ib
-rwxr-xr-x. 1 root root 781 May 22 2020 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 22 2020 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Jan 16 2021 ifdown-isdn -> ifdown-ippp

I then made edits to the file ifcfg-enp0s31f6 and ran
systemctl restart network
no errors were reported with this change.

I tried to then setup my NAT router to get out from behind my local network using FileZilla but was unable to make that happen.
I then using the cp command as root copied the backup file ifcfg-enp0s31f6_bkup back to ifcfg-enp0s31f6 and ran
systemctl restart network
but then I got those errors.

I"m unfamiliar with logs for Terminal windows and do not know how to access it if there is one. If you could provide me with how to find a Terminal log file I
might be able to find the exact commands I issued.

Thanks you so much.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network.service failed because the control process exited with error code

Post by TrevorH » 2022/02/22 19:28:30

From that directory I did an "su" command and did the following
cp ifcfg-enp0s31f6 ifcfg-enp0s31f6_bkup
It processes ALL files starting with ifcfg so making a backup copy is not what you did, you made a duplicate. You need to copy them to a totally different name say xfcfg-enp0s31f6 not enp0s31f6_bkup. I would suggest renaming all of ifcfg-CenturyLink8913 (assuming this one is also a dead one) ifcfg-enp0s31f6_bkup and ifcfg-myqwest4255 to something that does not start with ifcfg. Once that's done then restart the system to pick up the changes and if you still have problems then post the contents of ifcfg-enp0s31f6 so we can see it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kissellj
Posts: 96
Joined: 2015/01/05 19:39:24

Re: network.service failed because the control process exited with error code

Post by kissellj » 2022/02/22 21:01:25

Trevor,

ifcfg-CenturyLink8913, I believe CenturyLink8913 is my current router config file. So should I leave this alone?

kissellj
Posts: 96
Joined: 2015/01/05 19:39:24

Re: network.service failed because the control process exited with error code

Post by kissellj » 2022/02/22 21:18:21

Trevor,

I created the following
-rw-r--r--. 1 root root 254 Feb 22 14:10 xfcfg-enp0s31f6
-rw-r--r--. 1 root root 254 Feb 22 14:13 xfcfg-enp0s31f6_bkup
-rw-r--r--. 1 root root 254 Feb 22 14:12 xfcfg-lo
-rw-r--r--. 1 root root 346 Feb 22 14:14 xfcfg-myqwest4255
Now do I delete the following files
-rw-r--r--. 1 root root 254 Feb 21 14:29 ifcfg-enp0s31f6
-rw-r--r--. 1 root root 254 Feb 21 10:39 ifcfg-enp0s31f6_bkup
-rw-r--r--. 1 root root 254 May 22 2020 ifcfg-lo
-rw-r--r--. 1 root root 346 Jun 5 2018 ifcfg-myqwest4255
then run the systemctl restart network command?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network.service failed because the control process exited with error code

Post by TrevorH » 2022/02/22 22:40:15

If you delete ALL the ifcfg files then you will be left with no connections at all. You need to pick only the unnecessary ones.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kissellj
Posts: 96
Joined: 2015/01/05 19:39:24

Re: network.service failed because the control process exited with error code

Post by kissellj » 2022/02/22 23:13:49

Trevor,

Works great no errors when I ran
systemctl restart network

So I'm trying to use Filezilla on my linux box to get from behind my personal network c3000Z to a GoDaddy website.
Can you send me some information on how to setup a static ip address and do I need this? An example of a ifcfg-FILENAME would
be great if you have one.

Also I'm getting ready to migrate an ATX motherboard with a SSD to another box. I'm currently running Windows but want to reconfigure for CentOS. Do you have a recommendation on what version of CentOS to install?

Thank you

Post Reply