Failed to start couchbase-server.service: Unit couchbase-server.service is masked - linux

couchbase service stopped , so i started it manually by exec following command:
sudo service couchbase-server start and got response
Failed to start couchbase-server.service: Unit couchbase-server.service is masked.
I have ubuntu 16.04LTS and couchbase 5.1

you can unmask your service
sudo systemctl unmask couchbase-server
sudo systemctl start couchbase-server

Go to $CouchbaseHome and run following command to start and stop manually
Start
 ./bin/couchbase-server \-- -noinput -detached
Shutdown
./bin/couchbase-server -k

Related

command systemctl start libvirtd.service openstack-nova-compute.service doesn't finished

I am trying to install opnenstack-nova and after i confing /etc/nova/nova.conf and run command:
systemctl start libvirtd.service openstack-nova-compute.service
it doesn't finish and show anything.
how to solve it???
image

GitHub action self-host runner as service fails

I have installed GitHub self-hosted runner on my Ubuntu system. Getting below error when i try to configure it as service.
$ sudo ./svc.sh start
Failed to start actions.runner._services.Linux-Host01.service: Unit actions.runner._services.Linux-Host01.service is not loaded properly: Exec format error.
See system logs and 'systemctl status actions.runner._services.Linux-Host01.service' for details.
Failed: failed to start actions.runner._services.Linux-Host01.service
$ systemctl status actions.runner._services.Linux-Host01.service
● actions.runner._services.Linux-Host01.service - GitHub Actions Runner (_services.Linux-Host01)
Loaded: error (Reason: Exec format error)
Active: inactive (dead)
$ cat /etc/systemd/system/actions.runner._services.Linux-Host01.service
[Unit]
Description=GitHub Actions Runner (_services.Linux-Host01)
After=network.target
[Service]
ExecStart=/home/admin.user/actions-runner/runsvc.sh
User=admin.user
WorkingDirectory=/home/admin.user/actions-runner
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target
$ sudo journalctl -u actions.runner._services.Linux-Host01.service -f
Aug 04 08:40:47 Linux-Host01 systemd[1]: /etc/systemd/system/actions.runner._services.Linux-Host01.service:7: Invalid user/group name or numeric ID: admin.user
Additionally have provided executable permission to actions.runner._services.Linux-Host01.service but still it results same error.
What is wrong here?
I have changed User=admin.user to User=uid in the /etc/systemd/system/actions.runner._services.Linux-Host01.service file and then executed
systemctl daemon-reload
Now action service started and it is running fine.
Good morning,
First of all stop the service:
sudo ./svc.sh stop
Then make sure you have given permissions to the user:
sudo usermod -a -G <USER>
Now try to start the service:
sudo ./svc.sh start
And tell me if this works when check the status.
If not works please do the same but sudo permissions:
sudo su
And then try again all without sudo command because you are actually on root.
Have a great day!
This simply means you've not installed the runner
sudo ./svc.sh install // install the runner
sudo ./svc.sh start // then start it
Remember, this is the best way to go about it than using the ./run.sh script, as the runner will always be running in the background.
Use sudo ./svc.sh status to confirm that the runner is up and running.

Failed to start mongod.service: Unit mongod.service not found on Ubuntu 20.04

i followed the official instruction of mongodb install_intruction on my Ubuntu 20.04 LTS,
when i started mongodb by this line:
sudo systemctl start mongod
i got an error like this:
Failed to start mongod.service: Unit mongod.service not found.
of course i tried to reload as mongdb instruction:
sudo systemctl daemon-reload
it still shows:
Failed to start mongod.service: Unit mongod.service not found.
then i tried:
systemctl list-unit-files --type=service
to find mongod.service but i couldnt find it. and i tried:
ls /lib/systemd/system
that didnt work either there is no mongod.service file
i really need a hand!!!
It's too late to answer, but may be it will help someone.
In my case, if my run ls /lib/systemd/system | grep mongo there was no file relating to Mongo. So, I created one service file manually.
Step 1.
sudo touch /lib/systemd/system/mongod.service
Step 2.
Open file in vim/nano and paste below script.
[Unit]
Description=MongoDB Database Server
Documentation=https://docs.mongodb.org/manual
After=network-online.target
Wants=network-online.target
[Service]
User=mongodb
Group=mongodb
EnvironmentFile=-/etc/default/mongod
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
PIDFile=/var/run/mongodb/mongod.pid
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
# Recommended limits for mongod as specified in
# https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
[Install]
WantedBy=multi-user.target
This is default service file for mongod. Now run sudo systemctl start mongod. It will hopefully work.
Do a reinstall, after purging the current installation.
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
Run the command without sudo for the first time
systemctl start mongod.service

I'm not able to communicate with Kibana server

I'm getting this error kibana server is not ready yet can anyone help.
Just stop and start your kibana service.
sudo systemctl stop kibana.service
sudo systemctl start kibana.service
Restart the Kibana By using following cmnds
sudo service kibana stop
sudo service kibana start

Stopping postgresql from starting on ubuntu startup

Ubuntu 16.04.1 LTS
I have tried:
sudo update-rc.d -f postgresql remove
and
sudo vim /etc/postgresql/9.5/main/start.conf
then i change the word "auto" to "disabled"
Then i reboot the computer, and when it starts, i login and do:
sudo service --status-all | grep postgresql
Which returns:
[ + ] postgresql
So it is still starting when the server starts.
What is left for me to do? I don't want this service running when the computer starts, only when i manually start it with:
sudo service postgresql start
Use systemctl command to manage postgresql service:
stop service:
systemctl stop postgresql
start service:
systemctl start postgresql
show status of service:
systemctl status postgresql
disable service(not auto-start any more)
systemctl disable postgresql
enable service postgresql(auto-start)
systemctl enable postgresql
Ok. it's fixed thanks to Koen De Groote.
I did:
echo manual | sudo tee /etc/init/postgresql.override
and
sudo systemctl disable postgresql.service
and
sudo systemctl disable postgresql
....I don't know which one of them did it, but its not starting any more... Thank you...

Resources