-1

I have a server with CentOs 6.6 and I was trying to reboot it with the command reboot. It was taking forever and I thought the terminal in my mac froze and so I quitted the terminal app from my mac.

20 minutes have passed and now I can not login usin ssh. It shows me:

ssh: connect to host xxxx port 22: Operation timed out

Is my server turned off? What shoud I do? How can I turn the server on?

Thank you

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
user1349390
  • 101
  • 1
  • 4
  • `Operation timed out` usually points to a firewall problem. If the sshd wouldn't be running your ssh client would give a different error (`connection refused` or something like that). Log on to your server locally and check the firewall settings to allow incoming SSH connections. – Gerald Schneider Aug 14 '15 at 08:41
  • @GeraldSchneider You won't get connection refused if the server is turned off. – kasperd Aug 14 '15 at 08:46

3 Answers3

6

You'll need to log into the console when you can't access the OS normally. That allows you to see why the server is hanging on (re-) boot, resolve networking and firewall issues etc.

Typically enterprise class server hardware comes with provisions for out of band management, either based on the open IPMI standard or the more proprietary options such as HP's ILO, Dell's DRAC, Oracle/SUN ILOM, which allows you to access the console even though the OS (your SSH session) is not available.

Many VPS providers also allow you access to the console through their server management panel.

Sometimes waiting is sufficient, some processes may take a fair bit of time to shut correctly and some hardware takes a long time to pass the POST stage and if you have a large amount of storage undergoing a manadatory fsck that too can take some time.

Since you mention Hetzner in your comments: http://wiki.hetzner.de/index.php/LARA/en

HBruijn
  • 77,029
  • 24
  • 135
  • 201
1

lets see the options your have:

  1. press the power button
  2. send a wake on lan magic packet if u know the mac adres (check the router arp table maybe if u dont have it) if you have WOL on your network card
0

Worth having a read of this article, summarised below. I run some Hetzner servers and have fallen foul of panicking over re-gaining SSH access after a reboot or reset.

Most regular servers at the Hetzner datacenter are running Software RAID. It seems that after a reboot (especially if you send a Hardware Reset) the OS needs some time to re-sync or check the file system. I am not sure what caused the delay in my case. Re-syncing the entire RAID array can take up to 1-2 hours, depending on your hardware and disc space.

So, wait at least 1 hour for it to come online, especially after a hardware reset! When you activate Hetzner’s Rescue system (which is very good btw!) it will stay active for a minimum of 1 hour, so your server will be down for 1 hour at least, in any event. So you are not losing much by waiting a bit longer.

Andy Davies
  • 319
  • 2
  • 6