Frequently Asked Question
MongoDB installation
Last Updated a year ago
Symptom
- MongoDB can be installed automatically with N4V but you can skip this installation.
- MongoDB is not mandatory for the using of N4V, it's only recommended to use it when you use Google Map geocoding (addresses resolution), to limit the cost of Google API.
- You can decide to install MongoDB after the initial installation of N4V.
- You can also decide to install MongoDB on a dedicated server for a clustered/split N4V deployment
Environment
- Windows Server
- Need4Viz : all versions
Resolution
- If needed, download MongoDB setup here
- Install MongoDB on the N4V servers (or on a dedicated server)
- If Mongo is installed on a separated server, after installation, open the mongod.conf file and update the network interfaces section. By default, only the local server (127.0.0.1 IP) can access the MongoDB instance so you need to add the IP of the server to authorize external servers to access the instance:
After the update you need to restart the mongod service to apply the update.
- Open the config.js file of your N4V server(s) and update the following properties to activate the using of MongoDB (Use_MongoDB = true and fill the URLmongoDB property with the IP of the mongoDB instance or localhost if MongoDB is installed on the N4V server then a name for the instance - N4V for example):
- Restart the N4V services in a PowerShell windows by running the command "pm2 start all". Check in the logs (Need4Viz/logs) that there is no error. If the MongoDB instance is not accessible by the services, you'll find errors relative to the failed connection in the n4v_xxx_err.log files.
If the MongoDB service is installed on a dedicated server, you need to open the flow on port 27017 between the N4V server(s) and the MongoDB server.