[SERVER-45054] Windows Installation - mongod.cfg Created: 11/Dec/19 Updated: 27/Mar/20 Resolved: 10/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | 4.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ulf Rößler | Assignee: | Carl Champain (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
I'm installing community edition (4.2.2) on Windows. When I accept all the default settings (just clicking "next" all the time) there's an invalid "snmp" entry (only valid for enterprise version), which prevents the service from starting. Furthermore, I'd like to change data and log directories. The installer asks for these to be given. I use C:\mongodb\data and C:\mongodb\log. Again the service fails to start. Looking into the config file it contains %MONGO_DATA_PATH% or %MONGO_LOG_PATH%, respectively. There's no snmp entry though. This bug seems to be there since the installer is able to create the service by itself.
|
| Comments |
| Comment by Ulf Rößler [ 27/Mar/20 ] |
|
that's what I told you
Thanks for getting back to this ticket
|
| Comment by Carl Champain (Inactive) [ 26/Mar/20 ] |
|
The issue related to the MSI installer producing incorrect config file was indeed a bug. Thank you! |
| Comment by Carl Champain (Inactive) [ 11/Mar/20 ] |
|
We were able to recreate the error, and we fixed it by adding the directory db to the path. You should get an answer on the the MongoDB Community Forums or Stack Overflow with the mongodb tag. Thank you, |
| Comment by Ulf Rößler [ 11/Mar/20 ] |
|
Sorry - I don't understand. Yes, I agree, this is not a bug in server code. However, it's clearly a bug in the installation procedure. And it took me a lot of time to pinpoint it. Which, btw, would have been easier if someone simply tried (at least after I sent a demo). Where is the correct place to post this? Do you really think I can get a solution from community forum or Stack Overflow?
|
| Comment by Carl Champain (Inactive) [ 10/Mar/20 ] |
|
Thanks for your interest in MongoDB; however, the SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to be a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Community Forums or on Stack Overflow with the mongodb tag. Kind regards, |
| Comment by Ulf Rößler [ 07/Mar/20 ] |
|
Well, I created an installation log and had a look at https://github.com/mongodb/mongo/blob/master/src/mongo/installer/msi/ca/CustomAction.cpp Reason for buggy mongod.cfg in case of clean install is that you're not accounting for path names shorter than %MONGO_DATA_PATH% or %MONGO_LOG_PATH%, respectively. When I choose a path (instead of c:\mongodb\data) that's at least two chars longer everything is fine. That's why there's leftover from "#snmp". BTW - LOG_INFO("CA - Writing file - '%s'", buf.get()); should use str, not buf.
Furthermore, from the log I see, that in case of upgrade (say 4.2.2 to 4.2.3) the CA UpdateMongoYAML is not called at all! Must be because of the conditions inside InstallExecuteSequence. However, I'm not that familiar with msi so I cannot say what the correct condition. Maybe this helps: https://resources.flexera.com/web/pdf/archive/is-chs-common-msi-conditions.pdf I wonder why this doesn't happen to you. Or do you only ever test clean installs?
|
| Comment by Ulf Rößler [ 07/Mar/20 ] |
|
Yes, there was no "db" subdirectory. Unfortunately, creating it did not change anything: the setup still is not able to start the service and mongod.cfg llooks exactly the same as in the demonstration.
|
| Comment by Carl Champain (Inactive) [ 06/Mar/20 ] |
|
Thanks for getting back to us. |
| Comment by Ulf Rößler [ 06/Mar/20 ] |
|
The black parts, btw, appear while I have to confirm UAC.
The I installed 4.2.2 (from community link above), which behaves like 4.2.3 in the last posting. I fixed the config file, and try to update to 4.2.3:
IMO, the setup should offer my custom paths instead of the default setting, but that's another story. Again, the service cannot be started, because the paths in mongod.cfg are invalid. There's no remaining part of snmp this time.
|
| Comment by Ulf Rößler [ 06/Mar/20 ] |
|
Please reopen - the issue persists. Unfortunately I haven't had time to visualize so far.
First, I'm trying a clean install of MongoDb 4.2.3 from https://www.mongodb.com/download-center/community - Win10 1909 x64
The service fails to start because of invalid entries in mongod.cfg - it's sometimes only "p:" (invalid), sometimes even "smtp:"(which is not valid for community edition). When I don't explicitely set data and log directory but accept the default values, the setup is able to start the service successfully. I'll go without a seperate demo movie.
|
| Comment by Carl Champain (Inactive) [ 25/Feb/20 ] |
|
Hi, We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket. Regards, |
| Comment by Carl Champain (Inactive) [ 11/Dec/19 ] |
|
Thanks for the report.
Kind regards, |