惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
V
V2EX
IT之家
IT之家
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
D
Docker
S
Secure Thoughts
Recent Announcements
Recent Announcements
Webroot Blog
Webroot Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
博客园_首页
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Security Archives - TechRepublic
Security Archives - TechRepublic
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
I
InfoQ
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
T
Troy Hunt's Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Attack and Defense Labs
Attack and Defense Labs
美团技术团队
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Scott Helme
Scott Helme
T
Tor Project blog
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
G
Google Developers Blog

博客园 - xcywt

IT人备考心得分享 一个大龄程序员的回乡记 一种刚接触的语法。只在linux可用 固件打包流程 malloc底层实现以及和new的比较 C++异步调用 future async promise packaged_task 如果在单例模式中返回share_ptr ??? 记录一道面试题(哈希表 稀疏矩阵) Qt实现自定义控件-按钮 一个线程池的例子 C++ 条件变量condition_variable的例子 C++中share_ptr中循环引用的问题 C++14的一些新特性 C++11的一些特性 ubuntu编译grpc & protobuf perf笔记 一个cmakelist的例子(自动处理多个proto) Linux下eCal测试计划及进度记录 windows编译ecal
记录一次重装gitlab
xcywt · 2024-09-13 · via 博客园 - xcywt

之前在局域网内部署了一个gitlab服务器,由于断电出问题了,需要重装。记录一下:

注意:

1)还是需要定期备份。

2)重装时要选择和之前相同的版本。如果版本不同,很可能备份文件无法重新恢复。

背景:

断电后,gitlab再启动,一直报502的错。但是能备份,其他都是正常的。

于是先备份一下。

问题1:

看状态报这个错:

alertmanager 这个一直启动不了别的都能启动。

通过看gitlab-ctl tail alertmanager 看log:

/opt/gitlab/embedded/bin/alertmanager: file does not exist

折腾了老半天,一直好不了。于是卸载重装了一下,发现前面几次没有卸载干净。一定要卸载干净再重装。

如果重装后还是会启动 alertmanager 则说明没卸载干净。

重装后,不会启动alertmanager。我也不知道为啥。

下面这样就是正常的。

root@localgitlab-Default-string:/opt/zbox# gitlab-ctl status

run: gitaly: (pid 19613) 2212s; run: log: (pid 19227) 2236s

run: gitlab-monitor: (pid 19637) 2212s; run: log: (pid 19432) 2224s

run: gitlab-workhorse: (pid 19599) 2213s; run: log: (pid 19068) 2249s

run: logrotate: (pid 19144) 2242s; run: log: (pid 19143) 2242s

run: nginx: (pid 31413) 985s; run: log: (pid 19087) 2248s

run: node-exporter: (pid 19389) 2230s; run: log: (pid 19388) 2230s

run: postgres-exporter: (pid 19678) 2211s; run: log: (pid 19561) 2214s

run: postgresql: (pid 18652) 2288s; run: log: (pid 18651) 2288s

run: prometheus: (pid 27889) 1320s; run: log: (pid 19512) 2216s

run: redis: (pid 18099) 2309s; run: log: (pid 18098) 2309s

run: redis-exporter: (pid 19456) 2222s; run: log: (pid 19455) 2222s

run: sidekiq: (pid 31305) 999s; run: log: (pid 19024) 2255s

run: unicorn: (pid 31533) 977s; run: log: (pid 18985) 2256s

root@localgitlab-Default-string:/opt/zbox#

问题2:

还遇到过一次重装完后,也是报错502.看log会提示8080端口被占用了。实际发现8080倍阿帕奇服务器占用了,但是不大明白为啥之前能启动。不知道这个阿帕奇是不是gitlab自带的。

gitlab listener failed addr=127.0.0.1:8080 (in use)

改了一下端口: /etc/gitlab/gitlab.rb

external_url 'http://192.168.1.75'

unicorn['port'] = 8089

gitlab_rails['backup_path'] = "/home/localgitlab/disk_new/backup"

1)下载特定版本的gitlab镜像

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/apt/packages.gitlab.com/gitlab/gitlab-ce/ubuntu/pool/xenial/main/g/gitlab-ce/

2)根据备份重新恢复

gitlab-rake gitlab:backup:restore BACKUP=1590381836_2020_05_25_10.7.3

gitlab-ctl restart

gitlab-ctl start

gitlab-ctl stop

gitlab-ctl status

gitlab-ctl tail

刚安装完需要先刷新配置文件,再start:

gitlab-ctl reconfigure