[SERVER-59344] sudo systemctl start mongod fails after updating dbPath Created: 14/Aug/21 Updated: 11/Oct/21 Resolved: 11/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tes La | Assignee: | Edwin Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Steps To Reproduce: | sudo apt-get purge mongodb-org*
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
#Following works:
|
| Participants: |
| Description |
|
I am performing clean install on ubuntu 20.04.
Immediately after doing clean install i am removing following /var/lib/mongodb /var/log/mongodb Then I update /etc/mongod.conf file to new database path and log path Then I try to start mongod using following : sudo systemct start mongod and it fails
However it works if I use following command: sudo mongod --config /etc/mongod.conf Listing steps in following box.
|
| Comments |
| Comment by Edwin Zhou [ 11/Oct/21 ] | ||
|
We haven’t heard back from you for some time, so I’m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket. Best, | ||
| Comment by Edwin Zhou [ 04/Oct/21 ] | ||
|
We still need additional information to diagnose the problem. If this is still an issue for you, would you please run the commands above and attach the output to this ticket? Best, | ||
| Comment by Edwin Zhou [ 16/Sep/21 ] | ||
|
After running
can you also run
and attach the output of that command to this ticket? In your reproduction steps, after creating a new directory, we typically change the owner of the new directory so MongoDB has access to it. Can you ls -l the parent directory that contains your new directories you've created and confirm that they have the correct ownership? Best, | ||
| Comment by JOEL SANSON [ 03/Sep/21 ] | ||
|
the bug is only at the documentation level. the documentation should indicate that if a service is used to start/stop the mongodb engine and the default configurations like the dbpath, and pid log are non default values then the service should be also modified. | ||
| Comment by JOEL SANSON [ 03/Sep/21 ] | ||
|
I deployed the Community Edition 4.4.8. i do have the same issue while i have installed it on RHEL 8.2 and i wanted to start it from a service of systemctl after having changed to non default data and log paths. the description of the service shows: sudo cat /etc/systemd/system/multi-user.target.wants/mongod.service [Unit] [Service]
[Install]
in a nutshell, the service should be also amended to reflect the new locations. |