I have a weird issue that if I RDP into a Windows 2003 server, and then logoff (not reboot or restart) that the application services are being restarted.

I do use the /admin flag when I launch RDP if it matters.

EDIT - It seems it only happens with the /Admin flag.

I have no idea what is going on, but we have critical applications on this server, and I find I cannot logon to troubleshoot during they day because as soon as I logoff the application restarts.

Has anyone see something like this before?

  • 2
    Does the problem happen if you disconnect without logging off? – Joseph Apr 21 '11 at 17:00
  • 1
    What are the services? – mfinni Apr 21 '11 at 17:05
  • @mfinni - It's an java application server, it basically restarts the webapp. – ProfessionalAmateur Apr 21 '11 at 18:03
  • @Joseph - No if I disconnect from RDP but leave my session active services are not restarted. – ProfessionalAmateur Apr 21 '11 at 18:06

/admin opens the 'Console Session". That is, it opens the local session as opposed to a RDP session. If your Java app is started with the same account, then as you log out it may be closing the associated processes for you Java app too.

Try creating a different admin account specifically to launch your service. Remember to specify the new account in your service start up.

| improve this answer | |
  • The service is started as 'Local Ssytem', but is also set to start automatically. I found an article that deals with another Oracle JAS server that sounds like the same thing Im dealing with. This may just be an Oracle bug. – ProfessionalAmateur Apr 21 '11 at 20:30
  • 1
    That's not an oracle bug, it's java behavior. It's the -Xrs flag that's going to make it ignore termination signals from the OS. – mfinni Apr 21 '11 at 23:40
  • @mfinni - But normally logging off a console shouldn't send termination signals right? – ProfessionalAmateur Apr 22 '11 at 13:44
  • 1
    Clearly it is. "If the JVM is run as a service (for example, the servlet engine for a web server), it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown since the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs command-line option has been added beginning with J2SE 1.3.1. When the -Xrs option is used on Sun's JVM, the JVM does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT. " – mfinni Apr 22 '11 at 14:26
  • 1

I've seen strange things with RDP. You might try disabling Remote Desktop rebooting and reenabling it to see if that does anything.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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