LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-14-2016, 12:17 PM   #1
Joseph2016
LQ Newbie
 
Registered: Jul 2016
Location: New York
Distribution: Centos
Posts: 22

Rep: Reputation: Disabled
systemctl restart network FAILED


Hello

I ran: command: nmtui

I set the IP4 and IP6 to automatic

I set the primary DNS with the IP my cable company gave

When I try to "activate" the connections they fail,

When I run this command,

systemctl restart network

I get an error

"job for network.service failed because the control process exited with the error code. See "systemctl status network.service" and "journalctl -xe" for details

I just had static IPS installed yesterday from my cable provider and trying to set up the server,

Can anyone give me advice or help me?
 
Old 07-14-2016, 12:32 PM   #2
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 831

Rep: Reputation: 229Reputation: 229Reputation: 229
whats in these files? im assuming centos 7

/etc/resolv.conf

/etc/sysconfig/network

/etc/sysconfig/network-scripts/<interface-name>

Last edited by erik2282; 07-14-2016 at 12:34 PM.
 
Old 07-14-2016, 01:29 PM   #3
Joseph2016
LQ Newbie
 
Registered: Jul 2016
Location: New York
Distribution: Centos
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by erik2282 View Post
whats in these files? im assuming centos 7

/etc/resolv.conf

/etc/sysconfig/network
I and getting permission denied, when enter those
 
Old 07-14-2016, 04:32 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
You need to sudo or use su to access those files as root.
 
Old 07-14-2016, 07:28 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
Should be user readable files.
 
Old 07-14-2016, 11:22 PM   #6
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 831

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Joseph2016 View Post
I and getting permission denied, when enter those
Code:
erik@mydesktop:~$ cat /etc/resolv.conf 


erik@mydesktop:~$ cat /etc/sysconfig/network


erik@mydesktop:~$ cat /etc/sysconfig/network-scripts/<interface-name>
if you still get permission denied, su - to root and run same commands. On third command change <interface-name> to your interface-name.

Also post:

Code:
erik@mydesktop:~$ /sbin/ifconfig
 
Old 07-16-2016, 08:02 PM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
If you can't read /etc/resolv.conf as a user, you can't look up hostnames either.

The normal network startup for systemd based systems is NetworkManager, not network, which is a legacy network startup. These two are not mixable.
 
Old 07-17-2016, 04:20 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Joseph2016 View Post
Hello

I ran: command: nmtui

I set the IP4 and IP6 to automatic

I set the primary DNS with the IP my cable company gave

When I try to "activate" the connections they fail,
what are you trying to achieve?
connect a desktop computer to the internet?
why do you think you need to set the DNS manually? it should just work.
Quote:
When I run this command,

systemctl restart network

I get an error

"job for network.service failed because the control process exited with the error code. See "systemctl status network.service" and "journalctl -xe" for details
then you should do what it says to get more details.

in any case, i'm pretty sure there's no systemd service called "network.service". it might be "networkd.service".

Quote:
I just had static IPS installed yesterday from my cable provider and trying to set up the server,

Can anyone give me advice or help me?
ahh, i see. you want to run a server.
what else have you done to set up a server?
what system?

Last edited by ondoho; 07-17-2016 at 04:22 AM.
 
Old 07-17-2016, 05:08 AM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by ondoho View Post
in any case, i'm pretty sure there's no systemd service called "network.service". it might be "networkd.service".
Not "service" but there is a network.target that can cause the invocation of other service units.

BTW, one added question to your list is:

What distribution are you using?
 
  


Reply



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
[SOLVED] /etc/init.d/network restart (failed) windstory Linux - Newbie 8 12-14-2020 03:25 AM
[SOLVED] Job failed. See system journal and 'systemctl status' for details boby.kumar Linux - Newbie 8 11-11-2015 11:11 PM
register_cnic failed error when restart network service wwipro Linux - Server 0 01-15-2014 10:44 PM
systemctl failed to get Dbus connection: No connection to service manager k84834 Linux - Software 2 07-14-2013 08:20 AM
NETWORK transmit errors - assuming offline / NETWORK restart failed, could not find gcan Linux - Networking 3 11-13-2009 07:01 PM

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

All times are GMT -5. The time now is 04:44 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
Open Source Consulting | Domain Registration