802
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.
A) How to identify if MongoDB is responsible for NV5 Geospatial License Server failure
B) How to check if MongoDB Server service is well configured and is running fine
C) How to check MongoDB version
D) How to check MongoDB logs
E) What to do if the MongodDB database is corrupted?
F) What to do if the MongodDB services stops working daily?
G) What is the default port used by MongoDB service and how to change it if needed ?
A) 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
B) 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
C) 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 the NV5 Geospatial License Server requires a specific version of MongoDB to run. The needed version is included in the NV5 License Server installer. See this link for more information about versioning.
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 correct, 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.
D) 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
E) 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 fix 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/ (RedHat 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
F) What to do if the MongodDB service stops working daily?
It may happen that MongoDB service stops daily at a given time. An error similar to the one below (Windows example) can then be found in the MongoDB logs:
"Failed to open minidump file","attr":{"dumpName":"C:\\Program Files\\MongoDB\\Server\\6.0\\bin\\mongod.XXX_XX.mdmp","error":"Access is denied."}}
The service can then be restarted manually until it will stop the day after at a similar time.
To avoid this issue, please exclude the MongoDB folder from the antivirus scan
Windows: C:\\Program Files\\MongoDB\\
Linux: /var/log/mongodb
Restart the service afterwards. It should prevent the service to fail the day after.
G) What is the default port used by MongoDB service and how to change it if needed ?
The default port used by the MongoDB service is 27017. This port needs to be opened to allow MongoDB to communicate with the Next Generation License Server service.
In case you need to change it
- Edit the following file:
Windows: C:\Program Files\MongoDB\Server\x.x\bin\mongod.cfg
Linux: /etc/mongod.conf
- Change the default port (27017) to its new value (27018 for example) in the field below:
# network interfaces
net:
port: 27018
- Save and close the file
- Restart the MongoDB service
Windows: from the Windows Services app, right-click on the MongoDB Server service and select Restart.
Linux: run the command below
sudo systemctl restart mongod
- Add the below environment variable to your system and set its value to the new port value
Name : IDL_LICENSE_SERVER_MONGODB_PORT
Value: 27018
Windows: from the Windows Environment Variables panel, select New to add a new System variable
Linux: edit the file /etc/systemd/system/nv5geospatiallicenseserver.service and adjust the section in bold as below
[Service]
[...]
Environment="NODE_ENV=production" "IDL_LICENSE_SERVER_MONGODB_PORT=27018"
[...]
- Restart the NV5 Geospatial License Server service
Windows: from the Windows Services app, right-click the NV5 Geospatial License Server service and click Restart.
Linux: run the command below
sudo INSTALL_DIR/node/bin/node INSTALL_DIR/service.js start
--------------------------------------
created by BC on 05/07/2024 -updated on 1/24/25
reviewed by BC (US) on 04/10/2025