[SERVER-7031] Windows service shuts down when user logs out Created: 13/Sep/12  Updated: 11/Jul/16  Resolved: 02/Oct/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.0.7, 2.2.0
Fix Version/s: 2.2.2, 2.3.0

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: Windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, running as a Windows service


Issue Links:
Duplicate
Backwards Compatibility: Fully Compatible
Operating System: Windows
Participants:

 Description   

It is reported that mongod.exe shuts down when running as a service when a user logs out of an interactive Windows session. I am unable to duplicate this so far in Windows 7, but I may be able to with more information about how the reporter's system is configured.

See discussion at https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/08gx8nHHmx0 for details so far.



 Comments   
Comment by auto [ 06/Nov/12 ]

Author:

{u'date': u'2012-10-02T17:03:09Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7031 don't shut down in Windows on CTRL_LOGOFF_EVENT

Versions of Windows prior to Windows Vista send a CTRL_LOGOFF_EVENT
to services (at the handler set by SetConsoleCtrlHandler) when the
interactive user logs off. Return FALSE from this notification and
don't run consoleTerminate().
Branch: v2.2
https://github.com/mongodb/mongo/commit/8bb07be63af3bb27f5f03d767dbf0c7fbda07338

Comment by Tad Marshall [ 02/Oct/12 ]

Suggest backport to 2.2 and 2.0 branches (same code).

Comment by auto [ 02/Oct/12 ]

Author:

{u'date': u'2012-10-02T10:03:09-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7031 don't shut down in Windows on CTRL_LOGOFF_EVENT

Versions of Windows prior to Windows Vista send a CTRL_LOGOFF_EVENT
to services (at the handler set by SetConsoleCtrlHandler) when the
interactive user logs off. Return FALSE from this notification and
don't run consoleTerminate().
Branch: master
https://github.com/mongodb/mongo/commit/a375eb933859da6853789b29c36a0a282690a9d3

Comment by Tad Marshall [ 14/Sep/12 ]

Update 1 from original poster:

mongo service is installed in windows 2003 x86 machine and installed using out of the box support for installing same.

Update 2 from original poster:

Hi Tad,
thanks for the response.

in there check out the [consoleTerminate] in that log

anwers to questions
I am using MongoDB 2.2 for x86 on windows 2003 x86
i used the defaults service install procedure , using mongod --install
mongod.exe --config E:\MongoDB\mongo\config\config.properties --serviceName mdb27017 --serviceDisplayName "MongoDB Server Instance 27017" --serviceDescription "MongoDB Server Instance running on 27017" --install

No , i didnt do any thing as such
i am trying on windows 2008 R2 which is client is having
here is snippet of the log on this issue : http://pastebin.com/fkLbJ4Sv

Update 3 from original poster:

i tried to replicate same with both Windows 7 Ultimate x86 and Windows Server 2012 R2 x64 , it working with fine/ no issues.

but same in case of the Windows Server 2003 R2 EE, it is causing this issue.

Generated at Thu Feb 08 03:13:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.