[SERVER-39025] Windows MSI unattended installation missing mongod.exe with ADDLOCAL Created: 16/Jan/19  Updated: 29/Oct/23  Resolved: 05/Apr/19

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 4.0.5
Fix Version/s: 4.1.10, 4.0.10

Type: Bug Priority: Major - P3
Reporter: Wan Bachtiar Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-12609 Docs for SERVER-39025: Windows MSI un... Closed
Duplicate
is duplicated by SERVER-39111 msiexec installation fails with any A... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: Windows
Backport Requested:
v4.0
Sprint: Security 2019-03-11, Dev Tools 2019-02-11, Dev Tools 2019-02-25, Security 2019-03-25, Security 2019-04-08
Participants:
Case:

 Description   

The installation tutorial for unattended windows installation: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#install-mdb-edition states:

To install specific MongoDB component sets, you can specify them in the ADDLOCAL argument using a comma-separated list including one or more of the following component sets:

with Server as the component that includes mongod.exe binary.

After downloading mongodb-win32-x86_64-2008plus-ssl-4.0.5-signed.msi, executing this via msiexec:

msiexec /qb /i mongodb-win32-x86_64-2008plus-ssl-4.0.5-signed.msi ADDLOCAL="Server"

Resulting in missing mongod.exe in C:\Program Files\MongoDB\Server\4.0\bin

C:\Program Files\MongoDB\Server\4.0>dir bin
Volume in drive C has no label.
Volume Serial Number is 544D-E427
 
Directory of C:\Program Files\MongoDB\Server\4.0\bin
 
16/01/2019  02:38 PM    <DIR>          .
16/01/2019  02:38 PM    <DIR>          ..
03/04/2018  06:58 PM         2,462,720 libeay32.dll
16/01/2019  02:38 PM               616 mongod.cfg
19/12/2018  07:20 PM       357,355,520 mongod.pdb
03/04/2018  06:58 PM           357,888 ssleay32.dll
               4 File(s)    360,176,744 bytes
               2 Dir(s)  38,985,547,776 bytes free



 Comments   
Comment by Luke Chen [ 11/Apr/19 ]

Fixing up fixversion as this ticket was not included as part of 4.0.9 release.

Comment by Henrik Edin [ 10/Apr/19 ]

proff The fix has not yet been released for MongoDB 4.0.x. You're right about your workaround by installing all features to make unattended installation work.

When the fix is released you'll be able to install a single feature and that error about "Failed to find yaml file" should be gone.

Comment by Githook User [ 10/Apr/19 ]

Author:

{'email': 'henrik.edin@mongodb.com', 'name': 'Henrik Edin', 'username': 'henrikedin'}

Message: SERVER-39025 Fix feature subset installation from MSI. Missing yaml file is no longer critical.

(cherry picked from commit 39dba5ab553c53dfdc1e6d070c07adcfffc80ec1)
Branch: v4.0
https://github.com/mongodb/mongo/commit/8118404371f5cac4e0fd2d98da78f33ed4521df8

Comment by Sergey [ 10/Apr/19 ]

Henrik Edin, I succesfully installed MongoDB 4.0.8 by msiexec.exe:

msiexec.exe /quiet /norestart /n /l*v mdbinstall.log /qb /i C:\Soft\mongodb\mongodb4.0.8.msi ADDLOCAL="Server,ServerNoService,Client,Router,MonitoringTools,ImportExportTools,MiscellaneousTools"

If i do not use "Server" feature, i recieve error "Received GetLastError 2" and then "Failed to find yaml file". MongoDB is not installed.

Comment by Henrik Edin [ 05/Apr/19 ]

Note: The "Server" feature set should not be used. The two valid options to install mongod.exe is "ServerService" and "ServerNoService" depending on if it should be installed as a Windows service or not.

Comment by Githook User [ 05/Apr/19 ]

Author:

{'name': 'Henrik Edin', 'username': 'henrikedin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-39025 Fix feature subset installation from MSI. Missing yaml file is no longer critical.
Branch: master
https://github.com/mongodb/mongo/commit/39dba5ab553c53dfdc1e6d070c07adcfffc80ec1

Comment by Wan Bachtiar [ 13/Feb/19 ]

henrik.edin,
Just tried to reproduce this with v4.0.6 MSI installer mongodb-win32-x86_64-2008plus-ssl-4.0.6-signed.msi, and still seeing the issue of missing mongod.exe.

 
PS C:\Program Files\MongoDB\Server> Remove-Item .\4.0\ -recurse
PS C:\Program Files\MongoDB\Server> dir
 
    Directory: C:\Program Files\MongoDB\Server
 
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       13/11/2017   7:24 PM                3.4
d-----       24/04/2018  12:35 PM                3.6
d-----        6/12/2018   4:18 PM                4.1
 
PS C:\Users\bach\Downloads> msiexec /qb /i mongodb-win32-x86_64-2008plus-ssl-4.0.6-signed.msi ADDLOCAL="Server"
PS C:\Users\bach\Downloads> dir 'C:\Program Files\MongoDB\Server\4.0\bin\'
 
    Directory: C:\Program Files\MongoDB\Server\4.0\bin
 
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        3/04/2018   5:58 PM        2462720 libeay32.dll
-a----       13/02/2019   1:28 PM            616 mongod.cfg
-a----        5/02/2019   5:40 AM      358813696 mongod.pdb
-a----        3/04/2018   5:58 PM         357888 ssleay32.dll

Are you seeing a different result when you reproduced the issue ?

Comment by Henrik Edin [ 12/Feb/19 ]

wan.bachtiar, alex.bevilacqua Now when 4.0.6 is released containing the fix for SERVER-35936 are you okay with closing this as fixed? Have you verified that it's ok now?

Comment by Alex Bevilacqua [ 23/Jan/19 ]

matt.lord You are correct. The packaged Install-Compass.ps1 was failing (as could be seen in the logs). It is unrelated to the ADDLOCAL option.

Comment by Matt Lord (Inactive) [ 23/Jan/19 ]

alex.bevilacqua, assuming that the compass issue was in fact due to SERVER-35936 and not related to the ADDLOCAL option, then that is fixed in the upcoming 4.0.6 release (see BACKPORT-2853). 

Comment by Alex Bevilacqua [ 22/Jan/19 ]

UPDATE Compass installation is failing as a result of COMPASS-3358 (also reported in SERVER-35936)

daniel.hatcher - not sure if I should open a new SERVER for this, but the Compass installation fails as well:

MSI (s) (1C:C0) [10:16:18:613]: Source for file 'InstallCompassScript' is compressed
MSI (s) (1C:C0) [10:16:18:614]: Executing op: RegisterSharedComponentProvider(,,File=vcruntime140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,Component={B33258FD-750C-3B42-8BE4-535B48E97DB4},ComponentVersion=14.0.24210.0,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:C0) [10:16:18:616]: Executing op: RegisterSharedComponentProvider(,,File=msvcp140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,Component={22824972-0C4A-31B4-AEEF-9FC7596F1305},ComponentVersion=14.0.24210.0,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:C0) [10:16:18:617]: Executing op: RegisterSharedComponentProvider(,,File=concrt140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,Component={35B5C1D2-EB5B-3569-83EB-78E34F5C3254},ComponentVersion=14.0.24210.0,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:C0) [10:16:18:617]: Executing op: RegisterSharedComponentProvider(,,File=vccorlib140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,Component={D227D7DF-D9F8-33AF-B935-4BF2F47F2EA4},ComponentVersion=14.0.24210.0,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:C0) [10:16:18:620]: Executing op: CacheRTMFile(,FileKey=concrt140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,Attributes=512,MediaCabinet=media1.cab,ModuleFileName=C:\WINDOWS\Installer\3bd98769.msi,,CopierFlags=10,FileSize=333632,,,,,)
MSI (s) (1C:C0) [10:16:18:661]: Executing op: CacheRTMFile(,FileKey=msvcp140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,Attributes=512,,,,CopierFlags=2,FileSize=633152,,,,,)
MSI (s) (1C:C0) [10:16:20:206]: Executing op: CacheRTMFile(,FileKey=vccorlib140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,Attributes=512,,,,CopierFlags=2,FileSize=395592,,,,,)
MSI (s) (1C:C0) [10:16:20:216]: Executing op: CacheRTMFile(,FileKey=vcruntime140.dll.363ED482_721F_3A34_85B3_A96CD936D64F,,ProductCode={91DB5B5B-C2DF-4DD7-9D37-BC0178DCFF9E},ProductVersion=4.0.5,Attributes=512,,,,CopierFlags=2,FileSize=87888,,,,,)
MSI (s) (1C:C0) [10:16:20:219]: Executing op: CacheSizeFlush(,)
MSI (s) (1C:C0) [10:16:20:219]: Executing op: ActionStart(Name=InstallCompassScript,Description=Installing MongoDB Compass... (this may take a few minutes),)
MSI (s) (1C:C0) [10:16:20:226]: Executing op: CustomActionSchedule(Action=InstallCompassScript,ActionType=1089,Source=BinaryData,Target=WixQuietExec64,CustomActionData="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "& 'C:\Program Files\MongoDB\Server\4.0\bin\InstallCompass.ps1' ; exit $($Error.Count)")
MSI (s) (1C:64) [10:16:20:228]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIAC4D.tmp, Entrypoint: WixQuietExec64
WixQuietExec64:  Downloading Compass from https://compass.mongodb.com/api/v2/download/latest/compass/stable/windows
WixQuietExec64:  Error installing Compass.
WixQuietExec64:  Error 0x80070001: Command line returned an error.
WixQuietExec64:  Error 0x80070001: QuietExec64 Failed
WixQuietExec64:  Error 0x80070001: Failed in ExecCommon method

To reproduce:

msiexec.exe /l*v mdbinstall.log /qb /i mongodb-win32-x86_64-enterprise-windows-64-4.0.5-signed.msi SHOULD_INSTALL_COMPASS="1"

Generated at Thu Feb 08 04:50:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.