Gitlab Cannot start runsv is not running - gitlab

I just upgraded my gitlab-ce version to the latest version using this command
sudo yum install gitlab-ce-12.1.3-ce.0.el7.x86_64
the upgrade works well, but after restart the gitlab service won't start,
when I run this command
sudo gitlab-ctl start
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-monitor: runsv not running
fail: gitlab-workhorse: runsv not running
fail: grafana: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
and then I try to start the gitlab-runsv by using this command
systemctl start gitlab-runsvdir.service
But it freezes and not doing anything!!, I must use the CTRL+C to quit
and when I run the journal-ctl it don't showing anything.
journalctl -u gitlab-runsvdir.service
-- No entries --
My Environment is Centos 7.

I faced the problem on my ubuntu-20. Previously i had disabled my gitlab-runsvdir.service. That was the reason for my problem. so what i did
sudo systemctl enable gitlab-runsvdir.service
sudo systemctl start gitlab-runsvdir.service

I left this answer on a similar issue: Gitlab not starting after upgrade to Ubuntu 18.04
I ran into a similar runsv error, but only saw it for once service, not the whole list you have. These steps are a log of my attempts to get it working - probably not a direct line, but my local Gitlab does work now:
In the CentOS vm:
vi /etc/gitlab/gitlab.rb
change the external_url from http://example.gitlab.com to http://192.168.1.131
sudo gitlab-ctl reconfigure
first observed the error runsv not running
yum update -y
sudo gitlab-ctl status
sudo gitlab-ctl restart
sudo gitlab-ctl reconfigure
systemctl start gitlab-runsvdir.service
systemctl status gitlab-runsvdir.service
sudo gitlab-ctl reconfigure
still saw an error about runsv not running, several times, but it was never a blocker and the reconfigure was successful
On host
navigate to 192.168.1.131
See the prompt for root password
As for the issue with Postgres, I'm not sure

I did the yum update and restart again after that I did the gitlab-ctl reconfigure, now the gitlab services are working again.

Related

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.

How to run an Ubuntu NFS V4 kernel server in an Ubuntu docker instance without port mapper?

I need to operate a NFS server in docker in pure V4 mode, i.e. without portmapper port 111. (Reason: NFS server in Docker in WSL2 in Windows.)
I found instructions how to operate the Ubuntu default kernel NFS server without port 111 being open:
From https://peteris.rocks/blog/nfs4-single-port/
$ sudo vim /etc/default/nfs-kernel-server
...
RPCMOUNTDOPTS="--no-nfs-version 2 --no-nfs-version 3 --nfs-version 4 --no-udp"
RPCNFSDOPTS="--no-nfs-version 2 --no-nfs-version 3 --nfs-version 4 --no-udp"
...
$ sudo systemctl disable --now rpcbind.service rpcbind.socket
$ sudo systemctl mask rpcbind.service rpcbind.socket
However, this instructions rely on the commands "systemctl disable/mask" which are not available in my Ubuntu docker image, as there's no systemd or init around naturally in docker. When I exclude versions 2 and 3 in /etc/default/kernel-server and start nfs, I get the error message:
Not starting: portmapper is not running
Questions:
How can I run a pure NFS V4 tftp server in docker (Ubuntu) that does not need portmapper / port 111 ?
How can I do systemctl disable --now rpcbind-service rpcbind-socket and systemctl mask epcbind-service rpcbind.socket when I have no systemctl available ?
Do I maybe need to patch /etc/init.d/nfs-kernel-server start ?
Are there better alternatives to nfs-kernel-server for a pure V4 mode ?
Thanks very much.
Solution:
A) Disable check for rpcbind in init script
sudo vim /etc/init.d/nfs-kernel-server
Remove 8 lines near #See if rpcbind is running ... if ...fi
B) Use --privileged when starting rocker run

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

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

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...

Running "sudo /sbin/service --status-all" restarts a service (Apache)

I'm looking to understand how running the command "sudo /sbin/service --status-all" on a RedHat 6.7 64bit system could restart Apache?
I've always used this command to list all running and stopped services, this is the first time I've seen it restart a service though. Is this down to a bad Apache config or can issuing this command restart services in certain circumstances?
Update:
The status of httpd is that it is stopped:
sudo /etc/rc.d/init.d/httpd status
httpd is stopped
sudo /etc/init.d/httpd status
httpd is stopped
If I run "sudo /sbin/service --status-all" I see:
X is installed
Y is running...
X is stopped
httpd (pid xxx) already running
root xxx 1 0 18:10 ? 00:00:00 /usr/sbin/httpd -f
/httpd.conf -k start

Resources