1

I am trying to install MongoDB on my local machine using the Wired Tiger storage engine and experiencing some issues. I downloaded the binaries and following the guide installed it to C:\MongoDB. This got installed using the default engine MMAPV1 but I want to change this to Wired Tiger. To do this I simply used the following command.

mongod.exe --storageEngine "wiredTiger" --dbpath "c:\mongodb\data\wt"

Should mention I have also installed the hotfix and still get the same issue.

It seems this command works as it creates a bunch of files in the specified folder above such as WiredTiger, storage.bson, WiredTiger.turtle etc.

PS C:\MongoDB\bin> .\mongod.exe --storageEngine "wiredTiger"
2015-09-02T15:07:41.266+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-02T15:07:41.270+0100 E NETWORK  [initandlisten] listen(): bind() failed errno:10048 Only one usage of each socke
t address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017
2015-09-02T15:07:41.271+0100 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory C:\data\db\ not fo
und., terminating
2015-09-02T15:07:41.271+0100 I CONTROL  [initandlisten] dbexit:  rc: 100
PS C:\MongoDB\bin> .\mongod.exe --storageEngine "wiredTiger" --dbpath C:\MongoDB\data\wt
2015-09-02T15:10:38.844+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-02T15:10:38.847+0100 E NETWORK  [initandlisten] listen(): bind() failed errno:10048 Only one usage of each socke
t address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017
2015-09-02T15:10:38.848+0100 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7G,session_max=20000,e
viction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(c
lose_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] MongoDB starting : pid=24296 port=27017 dbpath=C:\MongoDB\data\w
t 64-bit host=WSX-111-9999
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] db version v3.0.6
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] git version: 1ef45a23a4c5e3480ac919b28afcba3c615488f2
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, buil
d=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] allocator: tcmalloc
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] options: { storage: { dbPath: "C:\MongoDB\data\wt", engine: "wir
edTiger" } }
2015-09-02T15:10:39.057+0100 I CONTROL  [initandlisten] now exiting
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to close sockets...
2015-09-02T15:10:39.057+0100 I STORAGE  [initandlisten] WiredTigerKVEngine shutting down
2015-09-02T15:10:39.074+0100 I STORAGE  [initandlisten] shutdown: removing fs lock...
2015-09-02T15:10:39.075+0100 I CONTROL  [initandlisten] dbexit:  rc: 48
PS C:\MongoDB\bin> .\mongo.exe
2015-09-02T15:11:03.091+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
MongoDB shell version: 3.0.6
connecting to: test
> db.serverStatus().storageEngine
{ "name" : "mmapv1" }
> exit
bye
PS C:\MongoDB\bin>

Any ideas why this isn't playing ball? I have installed this as a windows service which starts fine and also when using the shell and use the command

db.serverStatus().storageEngine

I get the value mmappv1 back.

Dr Schizo
  • 4,045
  • 7
  • 38
  • 77

1 Answers1

3

Personally, for me to get this working I had to remove the service via the command: .\mongod.exe --remove followed by an install however this time specifying the storage engine etc. So the command becomes

.\mongod.exe --dbpath c:\mongodb\data\wt --logpath c:\mongodb\log\mongo.log --storageEngine wiredTiger --install

Enter the shell and use the command db.serverStatus().storageEngine the world suddenly becomes a happier place { "name" : "wiredTiger" }

Dr Schizo
  • 4,045
  • 7
  • 38
  • 77
  • Sorry for my meddling, but i have questions to this too. 1 - i changed the order of commands, i put --storageEngine wiredTiger after --install, have problem? 2 - I not removed the service via command, i simple put this in the powerShell: ".\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.4\mongod.cfg" --install --storageEngine wiredTiger and works for me...retieving storage engine i get this: { "name" : "wiredTiger", "supportsCommittedReads" : true, "readOnly" : false, "persistent" : true } – Linces Marques Mar 30 '17 at 20:06