root@GIT:~# sudo gitlab-ctl status
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: 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
root@GIT:~# sudo systemctl start gitlab-runsvdir
^C
root@GIT:~# systemctl -t target
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
getty.target loaded inactive dead start Login Prompts
graphical.target loaded inactive dead start Graphical Interface
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
mail-transport-agent.target loaded active active Mail Transport Agent
multi-user.target loaded inactive dead start Multi-User System
network-online.target loaded active active Network is Online
network-pre.target loaded active active Network (Pre)
network.target loaded active active Network
nss-user-lookup.target loaded active active User and Group Name Lookups
paths.target loaded active active Paths
remote-fs-pre.target loaded active active Remote File Systems (Pre)
remote-fs.target loaded active active Remote File Systems
slices.target loaded active active Slices
sockets.target loaded active active Sockets
swap.target loaded active active Swap
sysinit.target loaded active active System Initialization
time-sync.target loaded active active System Time Synchronized
timers.target loaded active active Timers
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
JOB = Pending job for the unit.
21 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
lines 5-30/30 (END)
root@GIT:~# systemctl list-jobs
JOB UNIT TYPE STATE
93 plymouth-quit-wait.service start running
1 graphical.target start waiting
138 ureadahead-stop.timer start waiting
2 multi-user.target start waiting
125 systemd-update-utmp-runlevel.service start waiting
89 getty.target start waiting
48 setvtrgb.service start waiting
96 gitlab-runsvdir.service start waiting
91 getty@tty1.service start waiting
9 jobs listed.
root@GIT:~# systemctl stop plymouth-quit-wait.service
root@GIT:~# systemctl start gitlab-runsvdir.service
root@GIT:~# gitlab-ctl restart
ok: run: alertmanager: (pid 16980) 1s
ok: run: gitaly: (pid 17001) 0s
ok: run: gitlab-exporter: (pid 17030) 0s
ok: run: gitlab-workhorse: (pid 17037) 0s
ok: run: grafana: (pid 17102) 1s
ok: run: logrotate: (pid 17114) 0s
ok: run: nginx: (pid 17132) 1s
ok: run: node-exporter: (pid 17139) 0s
ok: run: postgres-exporter: (pid 17152) 1s
ok: run: postgresql: (pid 17177) 0s
ok: run: prometheus: (pid 17183) 0s
ok: run: redis: (pid 17259) 1s
ok: run: redis-exporter: (pid 17455) 0s
ok: run: sidekiq: (pid 17538) 1s
ok: run: unicorn: (pid 17576) 0s
root@GIT:~# ^C
该篇博客记录了在GitLab服务遇到运行状态异常的情况,通过`sudo gitlab-ctl status`检查发现多个服务未正常运行,如alertmanager、gitaly等。博主使用`sudo systemctl start gitlab-runsvdir`尝试启动服务但失败,随后通过`systemctl list-jobs`查看正在运行的作业,并停止了`plymouth-quit-wait.service`,接着重新启动`gitlab-runsvdir.service`。最终,使用`gitlab-ctl restart`成功重启所有服务,恢复正常运行状态。

1542

被折叠的 条评论
为什么被折叠?



