After change bind ip of mongodb, mongodb can't be up

Hi Free5GC team,

Would you pls help.
As I want to run all 5GC NFs on machine A, and UPF on machine B.
So I don’t want to use for all NFs on machine A, I changed in all conf files, and then I realized that I also need to change ‘’ in file /etc/mongodb.conf’ to machine A’s IP (, I changed it, but mongodb can’t be up.


Where to store the data.


#where to log


bind_ip =
port = 27017

andrew@andrew-:~$ sudo systemctl restart mongodb
andrew@andrew-:~$ sudo systemctl status mongodb
● mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-09-08 01:10:07 PDT; 6s ago
     Docs: man:mongod(1)
  Process: 5581 ExecStart=/usr/bin/mongod --unixSocketPrefix=${SOCKETPATH} --config ${CONF} $DAEMON_OPTS (code=exited, status=2)
 Main PID: 5581 (code=exited, status=2)

Sep 08 01:10:07 andrew systemd[1]: Started An object/document-oriented database.
Sep 08 01:10:07 andrew-mongod[5581]: Error reading config file: Permission denied
Sep 08 01:10:07 andrew- mongod[5581]: try '/usr/bin/mongod --help' for more information
Sep 08 01:10:07 andrew- systemd[1]: mongodb.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 08 01:10:07 andrew-systemd[1]: mongodb.service: Failed with result 'exit-code'.

Thanks a lot!


I don’t think you need to change the config file of mongodb because only NRF and UDR will use mongodb and they are on machine A right? Just let them to enable to access to mongodb is enough.

thanks. Yes, I change all back to and it worked.