Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

7 Answers

up vote 2 down vote accepted

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
share|improve this answer
    
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. –  Richard West May 11 '09 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). –  Richard West May 11 '09 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 '09 at 18:30
add comment

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.

share|improve this answer
    
This worked for me. Thank you. –  Keith Sirmons Jan 11 '10 at 0:13
    
Good call, thanks. I ran into this issue recently and it worked for me also. –  ajk Feb 11 '13 at 20:39
add comment

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.

share|improve this answer
    
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 '09 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 :-) –  Richard West May 11 '09 at 18:06
add comment

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.

share|improve this answer
    
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. –  Richard West May 11 '09 at 16:09
add comment

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)

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.