-1

I was testing some things and breaking things in order to see if I could fix them. I was connected to a remote machine via Putty ssh and ended up changing fs.file-max to a very (comparatively) small number (4096) using the command

sudo sysctl -w fs.file-max=4096

Things began shutting down and freezing up and eventually, the connection got shut down (pretty much expected). It seems like it may have shutdown physically, but I'm unsure (it's remote and I don't have physical access). I've tried reconnecting via putty, winscp, and just pinging it, but no responses. Is there any way to fix this from my local machine since I have no physical access to the machine possible? The remote machine is a CentOS 64 bit with a decent bit of disk space, RAM, and computing power if that matters.

Also, I have seen this: https://stackoverflow.com/questions/32473740/how-to-solve-a-fs-file-max-value-too-low but as I said, I have no physical access.

  • 1
    So why did you do this again? – ewwhite Jul 05 '17 at 23:26
  • 1
    You're going to need to reboot. – quadruplebucky Jul 05 '17 at 23:30
  • @ewwhite I admittedly don't have a very good reason for doing this to a remote machine. – user8261740 Jul 05 '17 at 23:33
  • @quadruplebucky If that's absolutely necessary, would that even fix the problem? Would the variable be set back to default or something when it's restarted? – user8261740 Jul 05 '17 at 23:33
  • 1
    As long as you just used sysctl -w (and didn't write it to sysctl.conf) it shouldn't be permanent. – quadruplebucky Jul 05 '17 at 23:35
  • @quadruplebucky at least I have that going for me. So, what exactly is the state of the machine now? It's clearly offline, but is it actually shut/powered off? Or does that depend on what processes kernel decided to kill first? – user8261740 Jul 05 '17 at 23:37
  • 1
    It's state is **f*cked**. You can't log in, you don't know what state it's in. Neither do we. It depends on what process was trying to allocate a file handle at the time and failed to get one. Power's probably still on, but I don't see how that matters without physical access. –  Jul 05 '17 at 23:40
  • As others mentioned, this machine will need to be power cycled. Next time, do this type of testing on a VM of which you have console access to reset the VM. Most VPS providers provide this and some are quite affordable. You could also spin up a VM on your laptop or workstation. Or a server with a remote management card. Dell is idrac, HP is ILO but there are many other options. – Aaron Jul 06 '17 at 03:45

1 Answers1

2

Someone with physical access (or IPMI) will need to hard reboot your remote machine.

84104
  • 12,905
  • 6
  • 45
  • 76
  • IPMI seems interesting and I had not heard of that before. It's refreshing to hear something new when talking about a powered off machine (rather than the usual "gonna have to go power it on"). Thank you. – user8261740 Jul 05 '17 at 23:59