MongoError: connect ECONNREFUSED 127.0.0.1:27017

For the past day, I keep randomly getting the error " MongoError: connect ECONNREFUSED 127.0.0.1:27017" Never had this issue as I have the service auto start on boot. When starting the mongod service I get the message below, not sure if this has something to do with it. Thanks

/lib/systemd/system/mongod.service:11: PIDFile= references path below legacy directory /var/run/, updating /var/run/mongodb/mongod.pid → /run/mongodb/mongod.pid; please update the unit file accordingl

I think your mongod.config file and systemd service file should have same path for mongod.pid