is possible recovery SERVER ACCESS with network.service OFF ?

Issues related to applications and software problems and general support
Post Reply
Windows
Posts: 59
Joined: 2021/06/16 13:20:01

is possible recovery SERVER ACCESS with network.service OFF ?

Post by Windows » 2021/06/16 13:28:34

Hello,

by error we run:

Code: Select all

ip link set eth0 down && ip link set eth0 up
to restart NETWORK

The problem is SECOND instruction NEVER run.

Then server is ON but not reachable.

Response from DC: "we only reinstall SO, we NEVER touch your server"

now I can´t login in server.

Exist some option to recovery ACCESS ?

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

Re: is possible recovery SERVER ACCESS with network.service OFF ?

Post by TrevorH » 2021/06/16 13:55:32

Unless you have some sort of remote console access like an iDRAC/iLO then there is nothing you can do except by physically rebooting the machine
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

Windows
Posts: 59
Joined: 2021/06/16 13:20:01

Re: is possible recovery SERVER ACCESS with network.service OFF ?

Post by Windows » 2021/06/16 14:14:30

thanks,

restart NOT is problem,

but if we REBOOT, then eth0 = ON ??

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

Re: is possible recovery SERVER ACCESS with network.service OFF ?

Post by TrevorH » 2021/06/16 14:32:17

The commands you ran are transient not permanent so as long as you didn't touch the config files it should come back after a reboot the same as it was before.
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

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: is possible recovery SERVER ACCESS with network.service OFF ?

Post by jlehtone » 2021/06/16 14:49:33

A service like (deprecated, not installed by default) network.service or NetworkManager.service is started by systemd during boot.
When the service starts, it reads configuration from files and sets up network accordingly -- most likely by calling tools like ip.
The 'ip' commands do not modify any file; do not change persistent configuration. They just change the current state in the kernel.


Your command had a conditional (&&). The ip link set eth0 up did run only if the ip link set eth0 down did return success.
That creates a question. Did ip link set eth0 down not return success?
Or, did ip link set eth0 up run, but not set up the link properly?

We know that the 'ip' command neither writes nor reads configuration from files. Hence a reboot should restore access, unless you did edit some config file before the fatal commands.

Logically, you should "restart network" by restarting the service that configures the network. Not by transient commands, like 'ip'.

Windows
Posts: 59
Joined: 2021/06/16 13:20:01

Re: is possible recovery SERVER ACCESS with network.service OFF ?

Post by Windows » 2021/06/16 19:25:50

oh yes!,
I request REBOOT to DC
then server is ON again.

I no request BEFORE becouse I believe AFTER of REBOOT -> "DETAH TOTAL, not ONLY net"

Many thanks :-)

Because:
viewtopic.php?f=54&t=77757
and here I read "A service like (deprecated, not installed by default) network.service or NetworkManager...."
some command to check BEFORE of REBOOT if AFTER of REBOOT the service NET continue is ON or OFF ?

Post Reply