Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion MongoDB Windows service shuts down after logoff the windows os user session

Received: by 10.68.213.68 with SMTP id nq4mr417476pbc.6.1347603193243;
        Thu, 13 Sep 2012 23:13:13 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.68.222.39 with SMTP id qj7ls11344347pbc.2.gmail; Thu, 13 Sep
 2012 23:13:01 -0700 (PDT)
Received: by 10.68.237.163 with SMTP id vd3mr494009pbc.9.1347603181105;
        Thu, 13 Sep 2012 23:13:01 -0700 (PDT)
Date: Thu, 13 Sep 2012 23:13:00 -0700 (PDT)
From: ajduke <perry.a...@gmail.com>
To: mongodb-user@googlegroups.com
Message-Id: <92d7ac0e-8c53-441e-9ca4-3a08e998f55a@googlegroups.com>
In-Reply-To: <7a41aa5a-b86d-4b65-9c88-983332e67962@googlegroups.com>
References: <d9d2250c-1c9a-4451-aa1c-9e63a4e668f3@googlegroups.com>
 <692de723-7d23-4b40-8043-3eb31c1ddd8e@googlegroups.com>
 <7a41aa5a-b86d-4b65-9c88-983332e67962@googlegroups.com>
Subject: Re: MongoDB Windows service shuts down after logoff the windows os
 user session
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_906_5042063.1347603180675"

------=_Part_906_5042063.1347603180675
Content-Type: multipart/alternative; 
	boundary="----=_Part_907_17016019.1347603180675"

------=_Part_907_17016019.1347603180675
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi Tad,
thanks for the response.

in there check out the* **[consoleTerminate] *in that log 

anwers to questions

   1. I am using MongoDB 2.2 for x86 on windows 2003 x86
   2. 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
   
    
   
   3. No , i didnt do any thing as such 
   4. i am trying on windows 2008 R2 which is client is having 
   5. here is snippet of the log on this issue : 
   http://pastebin.com/fkLbJ4Sv 



On Thursday, September 13, 2012 9:47:03 PM UTC+5:30, Tad Marshall wrote:
>
> I can't duplicate this in Windows 7.  I created a mongod service using 
> --install, rebooted to get a fresh start, logged in to my user account, 
> verified that mongod.exe was running as a service, then logged out of my 
> user account.  Logging back in, the service was still running, showing 
> uptime of 22 minutes and no SERVER RESTARTED messages except the first one 
> from creating the service and then letting it start after a reboot.
>
> There should be no console associated with a service (since we don't 
> allocate one but would inherit one if started from the console) so 
> the CTRL_LOGOFF_EVENT should not be sent to us.
>
> 1)  What OS are you running?
> 2)  How did you set up the Windows service?  Can you post the command line 
> you used?
> 3)  Did you configure the service to run under a particular login id, or 
> check "Allow service to interact with desktop", or do some other 
> configuration change?
> 4)  Can you reproduce this on other machines?
> 5)  Anything else that might enable me to reproduce your problem?
>
> If this is more than a misunderstanding or misconfiguration, we should 
> probably move this to a Jira ticket.
>
> On Thursday, September 13, 2012 7:49:45 AM UTC-4, Tad Marshall wrote:
>>
>> This may be a bug in mongod.exe, but I need to play with it to see what's 
>> going on.
>>
>> We once had a bug where logging out while mongod.exe was running in a 
>> console window caused the process to be terminated by the system, leading 
>> to an unclean shutdown.  I fixed that by reacting to the logout callback. 
>>  Maybe we need to ignore it when we are running as a service.
>>
>> If you want, file a Jira ticket about it or let me know and I will file 
>> one.
>>
>> Is the service running as LOCAL_SERVICE or as something else?
>>
>> On Wednesday, September 12, 2012 7:54:21 AM UTC-4, ajduke wrote:
>>>
>>> i installed 2.2 mongodb  as windows service, it installed and started 
>>> properly. 
>>> As windows session is logged off, mongodb also got killed . 
>>>
>>> This should not be case, as it is running as daemon/bg service then it 
>>> should not be halted, even after all sessions are logged off.
>>> (This is not done in production environment, as client of ours wants 
>>> session to be closed,  once finished with work ) 
>>>
>>> Further, I see from mongo logs that 
>>> that mongo service is listening onto various event such as 
>>> CTRL_LOGOFF_EVENT, CTRL_C_EVENT. which may be the cause 
>>>
>>> Please help with this , or any thing i am missing ?
>>>
>>
------=_Part_907_17016019.1347603180675
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<div>Hi Tad,</div><div>thanks for the response.</div><div><br></div><div>in=
 there check out the<b>&nbsp;</b><span style=3D"color: rgb(0, 0, 0); font-f=
amily: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaV=
u Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px=
; line-height: 21px; "><b>[consoleTerminate] </b>in that log&nbsp;</span></=
div><div><br></div><div>anwers to questions</div><div><ol><li><span style=
=3D"line-height: normal;">I am using MongoDB 2.2 for x86 on windows 2003 x8=
6</span></li><li><span style=3D"line-height: normal;">i used the defaults s=
ervice install procedure , using mongod --install<br></span><blockquote cla=
ss=3D"gmail_quote" style=3D"line-height: normal; margin: 0px 0px 0px 0.8ex;=
 border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left=
-style: solid; padding-left: 1ex; ">mongod.exe --config E:\MongoDB\mongo\co=
nfig\config.properties --serviceName mdb27017 --serviceDisplayName "MongoDB=
 Server Instance 27017" --serviceDescription "MongoDB Server Instance runni=
ng on 27017" --install</blockquote><blockquote class=3D"gmail_quote" style=
=3D"line-height: normal; margin: 0px 0px 0px 0.8ex; border-left-width: 1px;=
 border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-l=
eft: 1ex; ">&nbsp;</blockquote></li><li><span style=3D"line-height: normal;=
">No , i didnt do any thing as such&nbsp;</span></li><li><span style=3D"lin=
e-height: normal;">i am trying on windows 2008 R2 which is client is having=
&nbsp;</span></li><li><span style=3D"line-height: normal;">here is snippet =
of the log on this issue : http://pastebin.com/fkLbJ4Sv&nbsp;</span></li></=
ol><div><br></div></div><div><br></div>On Thursday, September 13, 2012 9:47=
:03 PM UTC+5:30, Tad Marshall wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;">I can't duplicate this in Windows 7. &nbsp;I created a mongod service=
 using --install, rebooted to get a fresh start, logged in to my user accou=
nt, verified that mongod.exe was running as a service, then logged out of m=
y user account. &nbsp;Logging back in, the service was still running, showi=
ng uptime of 22 minutes and no SERVER RESTARTED messages except the first o=
ne from creating the service and then letting it start after a reboot.<div>=
<br></div><div>There should be no console associated with a service (since =
we don't allocate one but would inherit one if started from the console) so=
 the&nbsp;CTRL_LOGOFF_EVENT should not be sent to us.</div><div><br></div><=
div>1) &nbsp;What OS are you running?</div><div>2) &nbsp;How did you set up=
 the Windows service? &nbsp;Can you post the command line you used?</div><d=
iv>3) &nbsp;Did you configure the service to run under a particular login i=
d, or check "Allow service to interact with desktop", or do some other conf=
iguration change?</div><div>4) &nbsp;Can you reproduce this on other machin=
es?</div><div>5) &nbsp;Anything else that might enable me to reproduce your=
 problem?</div><div><br></div><div>If this is more than a misunderstanding =
or misconfiguration, we should probably move this to a Jira ticket.<br><br>=
On Thursday, September 13, 2012 7:49:45 AM UTC-4, Tad Marshall wrote:<block=
quote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left=
:1px #ccc solid;padding-left:1ex">This may be a bug in mongod.exe, but I ne=
ed to play with it to see what's going on.<div><br></div><div>We once had a=
 bug where logging out while mongod.exe was running in a console window cau=
sed the process to be terminated by the system, leading to an unclean shutd=
own. &nbsp;I fixed that by reacting to the logout callback. &nbsp;Maybe we =
need to ignore it when we are running as a service.</div><div><br></div><di=
v>If you want, file a Jira ticket about it or let me know and I will file o=
ne.</div><div><br></div><div>Is the service running as LOCAL_SERVICE or as =
something else?<br><br>On Wednesday, September 12, 2012 7:54:21 AM UTC-4, a=
jduke wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left=
:0.8ex;border-left:1px #ccc solid;padding-left:1ex">i installed 2.2 mongodb=
 &nbsp;as windows service, it installed and started properly.&nbsp;<div>As =
windows session is logged off, mongodb also got killed .&nbsp;</div><div><b=
r></div><div>This should not be case, as it is running as daemon/bg service=
 then it should not be halted, even after all sessions are logged off.</div=
><div>(This is not done in production environment, as client of ours wants =
session to be closed, &nbsp;once finished with work )&nbsp;<br></div><div><=
br></div><div>Further, I see from mongo logs that&nbsp;</div><div>that mong=
o service is listening onto various event such as CTRL_LOGOFF_EVENT, CTRL_C=
_EVENT. which may be the cause&nbsp;</div><div><br></div><div>Please help w=
ith this , or any thing i am missing ?</div></blockquote></div></blockquote=
></div></blockquote>
------=_Part_907_17016019.1347603180675--

------=_Part_906_5042063.1347603180675--