Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two mongod.exe running in 4.4.1-windowsservercore-1809 docker image #426

Closed
mail2hjain opened this issue Oct 21, 2020 · 4 comments · Fixed by #438
Closed

Two mongod.exe running in 4.4.1-windowsservercore-1809 docker image #426

mail2hjain opened this issue Oct 21, 2020 · 4 comments · Fixed by #438

Comments

@mail2hjain
Copy link

mail2hjain commented Oct 21, 2020

The docker image mongo:4.4.1-windowsservercore-1809 starts two mongo daemon processes one as windows service and another as standalone process.

Command used to start the container : docker run mongo:4.4.1-windowsservercore-1809
Once container is started, enter the container and run command tasklist /svc gives output as -

Image Name PID Services
========================= ======== ============================================
System Idle Process 0 N/A
System 4 N/A
smss.exe 948 N/A
csrss.exe 976 N/A
wininit.exe 260 N/A
services.exe 280 N/A
lsass.exe 504 SamSs
fontdrvhost.exe 788 N/A
svchost.exe 580 RpcEptMapper, RpcSs
svchost.exe 1032 DcomLaunch, LSM, SystemEventsBroker
svchost.exe 1096 gpsvc, iphlpsvc, ProfSvc, Schedule, SENS,
UserManager, Winmgmt
svchost.exe 1144 EventSystem, nsi, RemoteRegistry
CExecSvc.exe 1168 cexecsvc
svchost.exe 1228 Dhcp, EventLog, TimeBrokerSvc,
WinHttpAutoProxySvc
mongod.exe 1272 N/A
svchost.exe 1340 CryptSvc, Dnscache, LanmanWorkstation, WinR
svchost.exe 1428 CoreMessagingRegistrar
svchost.exe 1464 DiagTrack
mongod.exe 1500 MongoDB
svchost.exe 1544 SysMain
WmiPrvSE.exe 2068 N/A
conhost.exe 2176 N/A
cmd.exe 2188 N/A
tasklist.exe 2236 N/A

Console Out: mongo-container-console-out.txt

@tianon
Copy link
Member

tianon commented Oct 21, 2020

Oh, interesting -- I guess we need to disable the installed service while we build. 😞

Probably just something like Set-Service MongoDB -StartupType Disabled after we install?

I also have to wonder if there's some way to ask the installer not to register the service in the first place. 🤔

@mail2hjain
Copy link
Author

As a temporary workaround I am stopping the service manually with my startup script. Hoping to get it fixed within the image itself.
Also any plans to provide a windows equivalent of docker-entrypoint.sh 🤓

@yosifkit
Copy link
Member

Also any plans to provide a windows equivalent of docker-entrypoint.sh

It is extremely unlikely, see also #291 (comment).

@TBBle
Copy link

TBBle commented Nov 27, 2020

It would be possible to flick the container over to using the Service, rather than running the mongod.exe, using https://github.com/Microsoft/IIS.ServiceMonitor as (per #291 (comment))

a process monitor as well to sit between Docker and mongod for the lifetime of the session (all for some simple initialization behavior, which is kind of a heavy toll).

That's what IIS's Dockerfile does, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants