[SERVER-1070] mongod.exe does not run from a path with spaces in it, and does not give a good error message Created: 30/Apr/10  Updated: 12/Jul/16  Resolved: 24/May/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.4.2
Fix Version/s: 1.4.3, 1.5.2

Type: Bug Priority: Minor - P4
Reporter: Justin Dearing Assignee: Mathias Stearn
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Confirmed on Windows 7 and windows 2008 server. Most likely all versions of windows, and likely other OSes


Participants:

 Description   

Steps to reproduce on windows:

Unzip mongo to "C:\Program Files\mongodb-
win32-i386-1.4.2"
from a command prompt run "C:\Program Files\mongodb-
win32-i386-1.4.2\bin\mongod" – install

You will get the following output
C:\Program Files\mongodb-win32-i386-1.4.2>"c:\Program Files\mongodb-
win32-i386-1.4.2\bin\mongod.exe" --install
Wed Apr 28 12:49:30 dbexit:
Wed Apr 28 12:49:30 shutdown: going to close listening sockets...
Wed Apr 28 12:49:30 shutdown: going to flush oplog...
Wed Apr 28 12:49:30 shutdown: going to close sockets...
Wed Apr 28 12:49:30 shutdown: waiting for fs preallocator...
Wed Apr 28 12:49:30 shutdown: closing all files...
Wed Apr 28 12:49:30 closeAllFiles() finished
Wed Apr 28 12:49:30 dbexit: really exiting now
C:\Program Files\mongodb-win32-i386-1.4.2>"c:\Program Files\mongodb-
win32-i386-1.4.2\bin\mongod.exe" --service
Wed Apr 28 12:49:37 dbexit:
Wed Apr 28 12:49:37 shutdown: going to close listening sockets...
Wed Apr 28 12:49:37 shutdown: going to flush oplog...
Wed Apr 28 12:49:37 shutdown: going to close sockets...
Wed Apr 28 12:49:37 shutdown: waiting for fs preallocator...
Wed Apr 28 12:49:37 shutdown: closing all files...
Wed Apr 28 12:49:37 closeAllFiles() finished
Wed Apr 28 12:49:37 dbexit: really exiting now

Mongod choked on the space in the path name, but does not properly report it. One of two things should happen:
1) A helpful error message when this occurs.
2) Let mongod handle paths with spaces with them, at least on windows.
Its not common to have spaces in paths on windows, but as a windows
guy I want to stick all my stuff in "c:\Program Files".



 Comments   
Comment by Mathias Stearn [ 24/May/10 ]

if the service is currently installed, you will need to --remove and re --install it.

Comment by auto [ 24/May/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: fix windows service registration
(cherry picked from commit d0eccc9c80123e1d7e1fbfad32431d044b925008)

(Backport of SERVER-1070 to v1.4)
http://github.com/mongodb/mongo/commit/dc461306241ec2263f16220947ac6d49b6d77ee7

Comment by Eliot Horowitz (Inactive) [ 24/May/10 ]

re-opening till committed on 1.4.3

Comment by Justin Dearing [ 24/May/10 ]

Any chance this could be added to 1.4.3?

Comment by Mathias Stearn [ 11/May/10 ]

mongod ran fine, it just didn't properly register itself as a service. Fixed in git master with http://github.com/mongodb/mongo/commit/d0eccc9c80123e1d7e1fbfad32431d044b925008

Comment by Mathias Stearn [ 03/May/10 ]

I can confirm that this works correctly on linux if there is a space in the path name. I'll take a look at windows soon.

Generated at Thu Feb 08 02:55:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.