0
votes

I did the mongodb installation, but when I try to start in windows 10 console, the log shows me the following:

C:\WINDOWS\system32>"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" 2017-12-13T11:09:06.089-0700 I CONTROL [initandlisten] MongoDB starting : pid=11240 port=27017 dbpath=C:\data\db\ 64-bit host=DESKTOP-5GUM84N 2017-12-13T11:09:06.089-0700 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2 2017-12-13T11:09:06.090-0700 I CONTROL [initandlisten] db version v3.6.0 2017-12-13T11:09:06.091-0700 I CONTROL [initandlisten] git version: a57d8e71e6998a2d0afde7edc11bd23e5661c915 2017-12-13T11:09:06.092-0700 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016 2017-12-13T11:09:06.092-0700 I CONTROL [initandlisten] allocator: tcmalloc 2017-12-13T11:09:06.092-0700 I CONTROL [initandlisten] modules: none 2017-12-13T11:09:06.093-0700 I CONTROL [initandlisten] build environment: 2017-12-13T11:09:06.093-0700 I CONTROL [initandlisten] distmod: 2008plus-ssl 2017-12-13T11:09:06.094-0700 I CONTROL [initandlisten] distarch: x86_64 2017-12-13T11:09:06.095-0700 I CONTROL [initandlisten]
target_arch: x86_64 2017-12-13T11:09:06.095-0700 I CONTROL [initandlisten] options: {} 2017-12-13T11:09:06.100-0700 I -
[initandlisten] Detected data files in C:\data\db\ created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'. 2017-12-13T11:09:06.101-0700 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3534M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress), 2017-12-13T11:09:06.574-0700 I STORAGE [initandlisten] WiredTiger message [1513188546:574263][11240:140724166549840], txn-recover: Main recovery loop: starting at 10/4608 2017-12-13T11:09:06.787-0700 I STORAGE [initandlisten] WiredTiger message [1513188546:786400][11240:140724166549840], txn-recover: Recovering log 10 through 11 2017-12-13T11:09:07.034-0700 I STORAGE [initandlisten] WiredTiger message [1513188547:34042][11240:140724166549840], txn-recover: Recovering log 11 through 11 2017-12-13T11:09:07.732-0700 I CONTROL [initandlisten] 2017-12-13T11:09:07.732-0700 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2017-12-13T11:09:07.733-0700 I CONTROL [initandlisten] **
Read and write access to data and configuration is unrestricted. 2017-12-13T11:09:07.735-0700 I CONTROL [initandlisten] 2017-12-13T11:09:07.735-0700 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost. 2017-12-13T11:09:07.736-0700 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server. 2017-12-13T11:09:07.736-0700 I CONTROL [initandlisten] ** Start the server with --bind_ip to specify which IP 2017-12-13T11:09:07.737-0700 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to 2017-12-13T11:09:07.737-0700 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the 2017-12-13T11:09:07.738-0700 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning. 2017-12-13T11:09:07.738-0700 I CONTROL [initandlisten] 2017-12-13T11:09:07.739-0700 I CONTROL [initandlisten] 2017-12-13T11:09:07.739-0700 I CONTROL [initandlisten] ** WARNING: The file system cache of this machine is configured to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance. 2017-12-13T11:09:07.740-0700 I CONTROL [initandlisten] See http://dochub.mongodb.org/core/wt-windows-system-file-cache 2017-12-13T11:09:07.740-0700 I CONTROL [initandlisten] 2017-12-13T15:09:08.161-0300 W FTDC [initandlisten] Failed to initialize Performance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with 'The specified object is not found on the computer.' for counter '\Memory\Available Bytes' 2017-12-13T15:09:08.161-0300 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/data/db/diagnostic.data' 2017-12-13T15:09:08.165-0300 I NETWORK [initandlisten] waiting for connections on port 27017

I followed all the intructions in https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#run-mongodb-community-edition but i can't start mongodb. anyone knows how to fix this launch error ?

I hope your help guys :c

Regards!

3
To me, this looks like the server is up and running...?!dnickless
[initandlisten] waiting for connections on port 27017 seems like a normal "running" entry, and I don't see any errors except related to performance counters.crashmstr
It seems like a normal running, but the problem is in this phrase: '[initandlisten] Failed to initialize Performance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with 'The specified object is not found on the computer.' for counter '\Memory\Available Bytes' 'Rodrigo EPB

3 Answers

10
votes

Your mongod actually started successfully initially in the beginning. The log output:

NETWORK [initandlisten] waiting for connections on port 27017

indicates that the mongod is online and waiting for connections on the specified port. You could have at that point opened a mongo shell on the same machine to connect to the mongod.

However, I understand that the warnings as displayed could indicate that there was an issue in operation. We've updated our documentation to address this:

You can find the documentation in question here: Run MongoDB Community on Windows

It looks like other users have helped you with getting a good working configuration file, but I'd like to pick apart the original output to clarify any confusion encountered there.

Lets start by breaking up your original mongod process output:

CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2017-12-13T11:09:07.733-0700

This is a warning that indicates you did not start the mongod process using authentication or authorization. Since it seems like you are using the default settings for 3.6, this is an expected informational warning. Please read through the MongoDB documentation on authentication when you get a chance and plan for implementing simple authentication, especially if the mongod will be exposed to the public internet at any point in time.

The next warning is:

CONTROL [initandlisten] ** WARNING: This server is bound to localhost. 2017-12-13T11:09:07.736-0700

By default in MongoDB 3.6, the mongod binds to the localhost address. In short, the mongod only listens for connections on the local machine. This gives you time to configure authentication before you open up your MongoDB deployment to your private network or the public internet.

As noted by other users, you can resolve this by setting the net.bindIp in your configuration file:

net:
  bindIp: 127.0.0.1

When you are ready to open the mongod to non-localhost connections, just append an IP address associated to a network adapter on the host machine. For example, if the host machine has a network adapter 192.168.1.15, you can add that to bindIp. This tells the mongod to listen for incoming connections on both addresses.

net:
  bindIp: "127.0.0.1,192.168.1.15"

As far as the FTDC warning, the \Memory\Available Bytes counter is related to Windows Performance Management - you can read more about that here. You may need to configure some Windows components to enable that counter. Its also possible that the counter is only available (or accessible) in the Server architectures of Windows.

The warning is informational and should not impact normal operations, unless you are heavily reliant on FTDC data for your work.

You can find more information on log messages in MongoDB in our Log Message documentation.

2
votes

i believe this message is from mongod(mongodb server).

and now you have to run mongo.exe inside "bin"folder to connect to the server(with mongod on, don't close the window) in order to start mongodb.

make sure you created a mongod.cfg inside C:\Program Files\MongoDB\Server\3.6\mongod.cfg

which is from step 3 Create a configuration file.

open that file and type those things below to mongod.cfg

systemLog:
 destination: file
 path: c:\data\log\mongod.cfg
storage:
 dbPath: c:\data\db

if there's still error try to copy and past these code inside mongod.cfg:

systemLog:
   destination: file
   path: c:\data\log\mongod.cfg
   logAppend: true
storage:
   journal:
      enabled: true
processManagement:
   fork: true
net:
   bindIp: 127.0.0.1
   port: 27017
setParameter:
   enableLocalhostAuthBypass: false
0
votes

Put the following in your mongod.cfg

net:
  port: 27017
  bindIp: "127.0.0.1"

Then the MONGO command can connect to the local instance.