5

I've got a Windows 2003 server that's at my remote data center. This morning I tried to connect to it via RDP, but the connection fails with the following error:

This computer can't connect to the remote computer. Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.

I have also trying issuing a remote shutdown/restart command using the "shutdown -i" command from my local system. No error is reported, however the system does not reboot.

This server runs SQL Server 2005 and it is still fully operational and responsive to queries.

I can also remotely connect to the services control panel of the remote system.

Is there anything that I can try to regain control of the system, short of having an operator in the data center do a hard reboot on the server for me?

8 Answers 8

3

Try instead:

shutdown -r -f -m \\hostname -c "Comment goes here"

That's a bit drastic, but I've had the need to do that in a very similar environment to what you describe. I also open a cmd window and start a ping -t against the server to watch when the IP stack goes down and comes back up. This is a very useful indicator of activity when you don't have physical access to the server (or are too lazy to get up and walk over to it).

EDIT: (based on your comment) Ok, do this first and then try the above again (or restart it as normal if this works). See it that gets you farther. The -a will abort a system shutdown.

shutdown -a -m \\hostname
3
  • I've tried you command with the -f (force) option. The command returns a result of "A system shutdown is in progress.(1115)", but the system appears to be hung in this state. The ping -t command (I love this and use it all the time) never shows the system going down. May 11, 2009 at 16:28
  • squillman: I tried the -a suggestion to about the current shutdown operation, however the same message is being returned "A system shutdown is in progress (1115). May 11, 2009 at 18:09
  • Hmm. Sorry boss, that's what's always done it for me in the past. I'll continue to think on it, though!
    – squillman
    May 11, 2009 at 18:30
7

I encountered the same issue trying to perform a remote reboot on a Windows XP machine. What I ended up doing was using the PsKill command, part of the SysInternals PsTools suite, to kill the Winlogon process, like so:

pskill \\hostname winlogon

This will cause the remote machine to reboot immediately.

2
  • Good call, thanks. I ran into this issue recently and it worked for me also.
    – ajk
    Feb 11, 2013 at 20:39
  • This didn't work for me on Windows Server 2012 R2 core, but this one did: taskkill /s \\somepc /U administrator /P pass /im lsass.exe
    – Stritof
    Apr 9, 2016 at 13:33
3

Well, this is kind of crazy but you can enable xp_cmdshell on SQL Server then execute commands as the user that is running SQL Server, so you can do a shutdown -r if it won't listen to remote commands.

If you want to try and re-start RDP w/o rebooting the box, you may try (this is untested; I'm not going to do this on any of my boxes :D):

Figure out what is listening on 3389 (RDP port) by asking for:

xp_cmdshell 'netstat -anO | findstr ":3389"'

Kill the pid with taskkill. Finally, issue a

NET START "TERMINAL SERVICES"

Hold your breath, then try RDP again.

2
  • This is a great idea for SQL sysadmins! +1 If you have to enable xp_cmdshell to do this, I would make sure to disable it as soon as you the server back to a responsive state because of the security implications of xp_cmdshell.
    – squillman
    May 11, 2009 at 16:53
  • +1 for a very creative solution. In my case it did not resolve this issue at hand, but it did not crash my server either :-) May 11, 2009 at 18:06
1

If you issued a shutdown/restart and the server just will not go down, you can kill the wininit.exe process with the pskill tool. In windows 2012, you can use taskkill native tool.

0

First check to always do whether you're sure of it, check if firewall let RDP go through ;) That's not stupid, It's just sometime happen out from nowhere ;)

Also check that Terminal Service is on, and maybe try to reboot it if you have a chance to get physically on the server.

This kind of thing also happen to me on my 2003 R2 server.

1
  • The firewall rules are good. I can connect to other servers in the data cetner over RDP. I have confirmed that the Terminal Service is on and is in the started state. I'm not able to restart this service though through the services interface remotely. May 11, 2009 at 16:09
0

When Terminal Services stops working.

This is less an answer to your question and more an explanation to what might have caused it. I have seen RDP stop working several times on Windows Server 2003, and it's usually occurs in one of two scenarios;

  1. Post-patching. The system is restarting after an automatic update, but never fully shuts down. Terminal sessions are logged off and no new connections are accepted, but the server (file, mssql, DC) keeps on working.

  2. This KB article CTX116901 describes a fault where the session image space is too small and it can't load any more video or printer drivers, (hence it being a problem for MetaFrame servers).

To set the size of the session image space via registry key, try

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "SessionImageSize" /t REG_DWORD /d 0x20  

Try values like,
0x10 (16 Mb)
0x20 (32 Mb)

0

I had same problem the PSKill worked like a charm - have looked for at program like this for ages - never knew that sysinternals had released one.

0

this is usually caused by a task that will not shut down, the server awaits the task shutdown in order to continue with the restart. you can solve this by finding the culprit task and remotely closing it. use: tasklist /s HostName usually SQL is the immediate suspect. use Taskkill to kill it, and the server will than carry on with the restart.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .