178
Suggestions to investigate potential MongoDB issues preventing the NV5 License Server to start
MongoDB Server service is mandatory to be able to run NV5 Geospatial License Server. If the MongoDB server is not well configured or does not start, NV5 Geospatial License Server will not start either.
Below are some suggestions to investigate potential issues with MongoDB Server service.
How to identify if MongoDB is responsible for NV5 Geospatial License Server failure
- open the NV5 Geospatial License Server log called license_server.log
Default directory on Linux is
/usr/local/nv5/license_server/logs/
Default directory on Windows is
C:\Program Files\NV5\license_server\logs
- If this log includes a MongoDB error such as
[FATAL] server - Unable to connect to MongoDB: connect ECONNREFUSED 127.0.0.1:27017
we recommend to investigate the mongoDB Server service to confirm if it is running or not
How to check if MongoDB Server service is well configured and is running fine
On Windows,
- Open the Windows Services app,
- Locate the MongoDB Server service,
- Check if its status is running or not,
- If it is not running, right click on it and try to restart it using the Start menu
On Linux,
- run the below command to check the MongoDB service status
sudo systemctl status mongod
- If it is not running, try to start it using the command
sudo systemctl start mongod
How to check MongoDB version
If MongoDB starts fine and NV5 Geospatial License Server is still failing, we recommend to check the MongoDB version that is installed on your system
Note that NV5 Geospatial License Server requires version 6.0 of MongoDB to run. This is the version included in the NV5 License Server installer.
On Windows,
- Open the Windows Services app,
- Locate the MongoDB Server service,
- Right click on it and select Properties,
- Path to executable should point to
"C:\Program Files\MongoDB\Server\6.0\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\6.0\bin\mongod.cfg" --service
On Linux
- run the below command to check the MongoDB version
mongod --version
- The output should includes a version line such as
version": "6.0.x"
If the MongoDB version is not 6.0, we recommend to uninstall MongoDB on your system (assuming it is not used by another application) and to reinstall the version provided by the NV5 License Server installer
How to check MongoDB logs
In case MongoDB Server 6.0 does not start it may be useful to check the MongoDB log itself. It is called mongod.log and it is located in the below directory:
On Linux
/var/log/mongodb
On Windows
C:\Program Files\MongoDB\Server\6.0\log
What to do if the MongodDB database is corrupted?
It mongod.log includes the following error:
WiredTiger metadata corruption detected
it could mean that MongoDB database is corrupted, and the following steps may help fixing this issue.
WARNING: deleting database files if MongoDB is used for other purposes besides NV5 License Server could cause data loss. Proceed with caution or with the help of your system administrator
On Windows :
- Stop the MongoDB service: launch the Windows Services app, right-click on the MongoDB Server service and select Stop.
- Empty the MongoDB database folder: from Windows Explorer, navigate to
C:\Program Files\MongoDB\Server\6.0\data
and remove all folders and files from this folder. This will require Administrator privileges.
- Restart the MongoDB service: from the Windows Services app, right-click on the MongoDB Server service and select Start.
- Start the NV5 Geospatial License Server service: from the Windows Services app, right-click the NV5 Geospatial License Server service and click Start.
On Linux :
- Stop the MongoDB service :
sudo systemctl stop mongod
- Empty the MongoDB database folder: move to the below directory
/var/lib/mongodb/ (Debian based) OR /var/lib/mongo/ (RH based)
and remove all folders and files from this folder. This will require Administrator/sudo privileges.
- Restart the MongoDB service :
sudo systemctl start mongod
- Start the NV5 Geospatial License Server service :
sudo INSTALL_DIR/node/bin/node INSTALL_DIR/service.js start
--------------------------------------
created by BC on 05/07/2024
reviewed by BC (US) on 05/07/2024