How can I solve this? (Ubuntu 16.04.1 LTS)
sudo service postgresql restart
Failed to restart postgresql.service: Unit postgresql.service is masked.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityHow can I solve this? (Ubuntu 16.04.1 LTS)
sudo service postgresql restart
Failed to restart postgresql.service: Unit postgresql.service is masked.
Ubuntu 15.04 and earlier used upstart. Upstart uses the service
command to handle services. As of 16.04 Ubuntu is using systemd. Any service commands you use get remapped to systemctl
commands. Systemd provides more functionality than upstart, including the ability to mask a service so that it cannot be started. Masking a service (from what I understand) essentially symlinks it to /dev/null. You should be able to unmask and restart the service with the following commands.
systemctl unmask postgresql
systemctl restart postgresql
if you are using Docker. then make sure the container is running. do that by typing Docker ps. if the container is missing but appears in Docker ps -a then just use Docker start