0

I have Ubuntu 16.04 and I have just made some changes to interfaces file. I ran sudo /etc/init.d/networking restart as advised in the documentation here.

However, it resulted in an error and now when I try to connect to my server again, and it won't start. After doing some Googling, I found that network-manager should have been restarted instead.

How can I fix this?

Thank you in advance.

TheOdd
  • 3,012
Pawel
  • 11
  • 1
  • 6
  • Could you please provide the error message that you are getting. – karan Oct 13 '16 at 13:08
  • Network error: connection timed out. I also cannot ping the IP anymore. I do have access to the machine itself though through a VM. I tried sudo ifdown ens160 && sudo ifup ens160 but no luck – Pawel Oct 13 '16 at 13:12
  • First thing I would do is enter through the remote console and revert the changes you made to the interfaces file - it's likely those (rather than the fact that you restarted the service) that have broken things. – steeldriver Oct 13 '16 at 13:21
  • Tried doing that and ran ifdown and ifup but still nothing (though this might be because our IT guys gave me a wrong IP to use and had to change it to forward external IP to a correct IP). Just FYI: I had run the initial networking restart through SSH, not sure if that messed anything up? – Pawel Oct 13 '16 at 13:35
  • You may need to restart both the networking service and network manager service to get back to the original config - for 16.04 (which uses systemd) the correct commands would be systemctl restart networking.service and systemctl restart NetworkManager.service I think (note that the documentation you linked to doesn't appear to have been updated since 2009). – steeldriver Oct 13 '16 at 13:51
  • I ran systemctl restart networking.service but I don't believe I have NetworkManager as I get the following error: Failed to start NetworkManager.service. Unit NetworkManager.service not found. Unfortunately, still down after restarting networking. – Pawel Oct 13 '16 at 14:06
  • What does ifconfig -a show? And I would check with your IT guy that IP you're trying to use is correct – meccooll Oct 13 '16 at 15:40
  • Mystery solved. I updated the interfaces and restarted the Ubuntu machine and all works fine now. Thanks for the help. – Pawel Oct 13 '16 at 16:13
  • You can fix this problem : please view this link – mah454 Sep 24 '17 at 07:57

1 Answers1

0

Restarting the Linux system using the remote console fixed the issue. Some network interfaces were not showing in ifconfig -a until the reboot.

Pawel
  • 11
  • 1
  • 6