Node.js

[Node.js] [MongoDB] System has not been booted with systemd as init system (PID 1). Can't operate.Failed to connect to bus: Host is down

brightlightkim 2022. 4. 5. 14:56

WSL doesn't accept the command of systemctl. We use service instead then change the location of the service that we are trying to use

$ sudo systemctl status mongodb
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
$ sudo service mongodb status
 * Checking status of database mongodb                                                                                                                 [fail] 
$ sudo service mongodb start
 * Starting database mongodb                                                                                                                           [ OK ] 
$ sudo service mongodb status
 * Checking status of database mongodb