Test configuration file KO

ciao, mi trovo bloccato in chapter1- MongoDB -LAB:Configuration FILE. Inserisco il comando di connessione alla porta 27000 con MONGOD --PORT 27000
rimane su waiting for connection . cosa posso fare?
grazie

Hi,

  1. That’s not using any configuration file
  2. mongod lauches the server,
  3. To test, launch the client i.e mongo.

You can connect using mongo --port 27000

grazie per il supporto.
inserendo il comando indicato ottengo errore come segue:

bash-4.4# mongo --port 27000
MongoDB shell version v4.0.5
connecting to: mongodb://127.0.0.1:27000/?gssapiServiceName=mongodb
2020-12-28T00:56:29.449+0000 E QUERY [js] Error: couldn’t connect to server 127.0.0.1:27000, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27000 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

--PORT is not an option, the server is probably running on 27017.

Try:

killall mongod
mongod --port 27000

And then mongo --port 27000.

You’ll be connecting using the localhost exception.

You are supposed to start mongod with the configuration file.

The instructions indicates that you must modify the configuration file so that mongod starts with:

  • run on port 27000
  • authentication is enabled

Post a screenshot of the configuration file.

The instructions also indicate that the command to use is either

mongod --config mongod.conf

or

mongod -f mongod.conf

And the third step is:

Once mongod is running, open a new Terminal window and use the following command to create an admin user. You will need to create this user in order to validate your work.

So just to be clear. The command mongod --port 27000 is definitively not a command that you have to run for this lab.

grazie ma sonio veramente bloccato. dal m001 a m103 mi trovo in difficoltà. non capisco la sequenza logica delle cose da fare. per favore aiutatemi a sbloccare il percorso. grazie

Hi @Giuseppe_cellitti,

I can understand your concerns.

Why don’t you take a look at the following resources and see if it helps.

Let me know if something is not clear. Do take a look at this (Convert Command-Line Options to YAML) in particular.

Hope it helps!

~ Shubham