LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2017, 04:14 AM   #1
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Rep: Reputation: Disabled
Question network.service


Hello and thank you for viewing my thread. I don't now what I'm doing.

I have installed CentOS 7.4.1708 onto my VPS, updated to the latest kernel and attempted to install WHM/cPanel. During the installation I received a colorful red message that said

cPanel does not support NetworkManager enabled
systems. The installation cannot proceed.
Please consult your system documentation to
remove NetworkManager, replacing it with the network.service


I then removed NetworkManager and attempted to
Code:
systemctl start network.service
I got a message saying "Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details."

After entering systemctl status network.service I got this output

Code:
● 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 2017-10-30 23:30:43 EDT; 20min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7765 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
I have googled here and there and found some solutions. Creating a ifcfg-enp0s3 file in /etc/sysconfig/network-scripts directory is one solution. Is this a viable idea? I am also wondering how I can still connect to my vps if I uninstalled the program that was managing my connections (NetworkManager).

If you do not know the solution to this problem but have a good resource for understanding CentOS networking better please feel free to post that too.


Thanks
 
Old 10-31-2017, 04:59 AM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
You could configure a network interface config file (/etc/sysconfig/network-scripts/ifcfg-***) by hand as explained here
https://wiki.centos.org/FAQ/CentOS7#...b1ff9954bec881

This CentOS 6 guide should still be relevant for manual network configuration as well...
http://www.serverlab.ca/tutorials/li...work-settings/
 
1 members found this post helpful.
Old 10-31-2017, 05:04 AM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
BTW, make sure that network.service is enabled as well, so that it is active at boot
Code:
systemctl enable network.service
Explicit cPanel doucumentation on the steps required for network configuration...
https://documentation.cpanel.net/dis...etwork+Manager
 
1 members found this post helpful.
Old 10-31-2017, 06:00 AM   #4
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
BTW, make sure that network.service is enabled as well, so that it is active at boot
Code:
systemctl enable network.service
Explicit cPanel doucumentation on the steps required for network configuration...
https://documentation.cpanel.net/dis...etwork+Manager

Thank you the cPanel documentation did it even though I do not know what it was I was doing. Editing the ifcfg-eth0 and ifcfg-eth0:0 THEN enabling AND starting (What's the difference?) network.services seemed to do fix the problem of:

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 2017-10-30 23:30:43 EDT; 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 7765 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

But now I can no longer SSH to my server. Was I suppose to configure a network interface file before I stopped networkmanager and switched over to network.service? The cPanel directions did not state that. There is one thing I did notice my ifcfg-eth0 and ifcfg-eth0:0 files did not contain a NM_CONTROLLED value that was according to the cPanel instructions suppose to be set to no "NM_CONTROLLED=no". So I added this to both eth0, eth0:0, and ifcfg-lo.

So I turned off network manager, edited the configuration files according to that documentation then enabled and started network.service but that left me unable to ssh to my server (currently vnc). Any ideas? Would configure a network interface file do anything?


Thanks

Last edited by nordsense; 10-31-2017 at 06:02 AM.
 
Old 10-31-2017, 09:31 PM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
Have you checked to see if there is an SSH server listening on port 22 (or whatever you configured it on)? Are you trying to reach it by a particular IP address, and is it still the same?

Code:
ip address
 
Old 10-31-2017, 09:41 PM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
Simply starting a .service unit won't create the symlinks to get the unit started at boot.

From the systemctl man page
Quote:
enable NAME...
Enable one or more unit files or unit file instances, as specified on the command
line. This will create a number of symlinks as encoded in the "[Install]" sections of
the unit files. After the symlinks have been created, the systemd configuration is
reloaded (in a way that is equivalent to daemon-reload) to ensure the changes are
taken into account immediately. Note that this does not have the effect of also
starting any of the units being enabled. If this is desired, either --now should be
used together with this command, or an additional start command must be invoked for
the unit. Also note that, in case of instance enablement, symlinks named the same as
instances are created in the install location, however they all point to the same
template unit file.
 
Old 10-31-2017, 11:23 PM   #7
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Have you checked to see if there is an SSH server listening on port 22 (or whatever you configured it on)? Are you trying to reach it by a particular IP address, and is it still the same?

Code:
ip address
I have checked the sshd file and nothing has changed there and it is "allowed" through SELlinux. I have been searching the internet to try to find a command to check if the ssh port is open in iptables but can not find out how to do this. I thought I had CSF installed but I guess not. When I type in IP address I get the output of the attached picture. I am still trying to ssh to the same IP address and from the same IP address.
Attached Thumbnails
Click image for larger version

Name:	wat2.png
Views:	394
Size:	8.1 KB
ID:	26202  
 
Old 10-31-2017, 11:55 PM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
Your config files (ifcfg-eth0 and ifcfg-eth0:0) don't match the network device node name present (ens3)!
 
Old 11-01-2017, 12:07 AM   #9
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Your config files (ifcfg-eth0 and ifcfg-eth0:0) don't match the network device node name present (ens3)!
So to fix this I would have to change the name of the configuration files (ifcfg-eth0 ifcfg-eth0:0) to match the device node name? If this is correct where do I find the device node name and when I find it do I simply change the name of ifcfg-eth0 file and ifcfg-eth0 file to the name of this device node or do more changes have to be made in the configuration file itself?
 
Old 11-01-2017, 12:22 AM   #10
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
The network device node name(s) can be got via ifconfig...
Code:
/sbin/ifconfig -a
although that command has been deprecated in favour of the ip command eg
Code:
ip link
Code:
ip address

Last edited by ferrari; 11-01-2017 at 12:23 AM.
 
Old 11-01-2017, 12:23 AM   #11
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
If the relevant interface is ens0, then the matching configuration file naming would be ifcfg-ens0
 
Old 11-01-2017, 12:34 AM   #12
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
So I have to change:

ifcfg-eth0 to ifcfg-lo

and

ifcfg-eth0:0 to ifcfg-ens3 ???
 
Old 11-01-2017, 01:02 AM   #13
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
I changed ifcfg-eth0 to ifcfg-ens3 but am still not able to SSH
 
Old 11-01-2017, 01:18 AM   #14
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,077

Rep: Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717Reputation: 717
Quote:
So I have to change:

ifcfg-eth0 to ifcfg-lo

and

ifcfg-eth0:0 to ifcfg-ens3 ???
No!

Show the output of
Code:
ip a
 
Old 11-01-2017, 02:19 AM   #15
nordsense
LQ Newbie
 
Registered: Aug 2017
Location: United States of America
Distribution: CentOS
Posts: 14

Original Poster
Rep: Reputation: Disabled
This is the output of ip a
Attached Thumbnails
Click image for larger version

Name:	wat2.png
Views:	839
Size:	8.0 KB
ID:	26203  
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network is running even if network service is stopped achtani_jeetu Linux - Newbie 3 03-10-2010 12:32 AM
Network Manager service vs Network service jeromeNP7 Fedora 2 07-18-2009 04:28 PM
what is the difference between service network reload and service network restart ? markraem Linux - Networking 3 11-21-2007 04:08 PM
In FC6 network interface doesn't come up if 'service network restart' command is run rajat Linux - Networking 2 05-03-2007 12:53 AM
LXer: Telsasoft, a Telecommunications Service Assurance Software Company Based in Minneapolis, Minnesota Received Order for a Set of GSM CDR (Call Detail Record) Reports from a Regional GSM Network Service LXer Syndicated Linux News 0 01-03-2006 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration