极狐GitLab 正式推出面向 GitLab 老旧版本(12.x、13.x、14.x、15.x 等)免费用户的专业升级服务,点击查看详情

返回列表 发布新帖

新安装GITLAB, 执行缓慢, 如何排查

1128 1
发表于 2024-4-9 16:14:02 | 显示全部楼层 阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
根据日志 puma
3:53执行Preloading application
6:47才开始Listening on unix

使用root和initial_root_password的密码提示Invalid login or password.
怀疑是超时导致


是不是中间哪个环节出问题, 导致这种状况, 该如何排查

root@gitlab:~# sudo gitlab-ctl tail puma
==> /var/log/gitlab/puma/puma_stdout.log <==
{"timestamp":"2024-04-09T06:47:03.295Z","pid":2034,"message":"- Worker 28 (PID: 6005) booted in 0.78s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.297Z","pid":2034,"message":"- Worker 32 (PID: 6110) booted in 0.6s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.312Z","pid":2034,"message":"- Worker 29 (PID: 6028) booted in 0.76s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.323Z","pid":2034,"message":"- Worker 33 (PID: 6174) booted in 0.59s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.351Z","pid":2034,"message":"- Worker 34 (PID: 6199) booted in 0.58s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.394Z","pid":2034,"message":"- Worker 35 (PID: 6208) booted in 0.59s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.416Z","pid":2034,"message":"- Worker 36 (PID: 6245) booted in 0.58s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.435Z","pid":2034,"message":"- Worker 37 (PID: 6252) booted in 0.56s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.447Z","pid":2034,"message":"- Worker 38 (PID: 6263) booted in 0.55s, phase: 0"}
{"timestamp":"2024-04-09T06:47:03.514Z","pid":2034,"message":"- Worker 39 (PID: 6265) booted in 0.59s, phase: 0"}

==> /var/log/gitlab/puma/puma_stderr.log <==
=== puma startup: 2024-04-09 14:47:01 +0800 ===

==> /var/log/gitlab/puma/current <==
2024-04-09_03:53:06.83167 {"timestamp":"2024-04-09T03:53:06.831Z","pid":2034,"message":"*      Workers: 40"}
2024-04-09_03:53:06.83167 {"timestamp":"2024-04-09T03:53:06.831Z","pid":2034,"message":"*     Restarts: (✔) hot (✖) phased"}
2024-04-09_03:53:06.83168 {"timestamp":"2024-04-09T03:53:06.831Z","pid":2034,"message":"* Preloading application"}
2024-04-09_06:47:01.80236 {"timestamp":"2024-04-09T06:47:01.802Z","pid":2034,"message":"* Listening on unix:///var/opt/gitlab/gitlab-rails/sockets/gitlab.socket"}
2024-04-09_06:47:01.80283 {"timestamp":"2024-04-09T06:47:01.802Z","pid":2034,"message":"* Listening on http://127.0.0.1:8080"}
2024-04-09_06:47:01.80304 {"timestamp":"2024-04-09T06:47:01.802Z","pid":2034,"message":"! WARNING: Detected 3 Thread(s) started in app boot:"}
2024-04-09_06:47:01.80319 {"timestamp":"2024-04-09T06:47:01.803Z","pid":2034,"message":"! #\u003cThread:0x00007f25a2cfcc30@Timeout stdlib thread /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/timeout-0.3.2/lib/timeout.rb:101 sleep_forever\u003e - /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/timeout-0.3.2/lib/timeout.rb:105:in `pop'"}
2024-04-09_06:47:01.80332 {"timestamp":"2024-04-09T06:47:01.803Z","pid":2034,"message":"! #\u003cThread:0x00007f25694f0e08 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/support/scheduler.rb:73 sleep\u003e - /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/rack-timeout-0.6.3/lib/rack/timeout/support/scheduler.rb:91:in `sleep'"}
2024-04-09_06:47:01.80341 {"timestamp":"2024-04-09T06:47:01.803Z","pid":2034,"message":"! #\u003cThread:0x00007f2569201cd8 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/sentry-ruby-5.10.0/lib/sentry/session_flusher.rb:81 sleep\u003e - /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/sentry-ruby-5.10.0/lib/sentry/session_flusher.rb:83:in `sleep'"}
2024-04-09_06:47:01.80359 {"timestamp":"2024-04-09T06:47:01.803Z","pid":2034,"message":"Use Ctrl-C to stop"}


回复

使用道具 举报

评论1

elvischenml楼主Lv.1 发表于 2024-4-10 11:59:30 | 显示全部楼层
主要原因是安装时过程报错, 导致安装不成功, 重新执行 sudo gitlab-ctl reconfigure, 虽然不报错, 但依旧不完整

过程中报错如下, 报错后退出
--> Help page documentation base url is blocked: execution expired
--> Diagramsnet url is blocked: execution expired
--> Public runner releases url is blocked: execution expired

sysctl: cannot open "/etc/sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf": No such file or directory


执行完整删除流程, 并在解决上述问题后, 成功安装, 无异常, 记录过程供遇到相同问题的人参考。
jh版需将ee改成jh。


  1. # 完整删除流程
  2. ## To remove all users and groups created by the Linux package before removing the package
  3. ## If you have problems removing accounts or groups, run userdel or groupdel manually to delete them. You might also want to manually remove the leftover user home directories from /home/.
  4. sudo gitlab-ctl stop && sudo gitlab-ctl remove-accounts
  5. ## remove all data
  6. sudo gitlab-ctl cleanse && sudo rm -r /opt/gitlab
  7. ## purge选项会尝试删除软件包及其配置文件 gitlab-ee
  8. sudo apt purge gitlab-ee
  9. ## 手动删除残留目录
  10. sudo rm -rf /opt/gitlab
  11. sudo rm -rf /var/opt/gitlab
  12. sudo rm -rf /etc/gitlab
  13. sudo rm -rf /var/log/gitlab
  14. ## 清除未再使用的依赖和残留的包文件
  15. sudo apt-get autoremove
  16. sudo apt-get autoclean
复制代码


重新安装
  1. # Install and configure the necessary dependencies
  2. sudo apt-get update
  3. sudo apt-get install -y curl openssh-server ca-certificates tzdata perl
  4. # Install Postfix (or Sendmail) to send notification emails
  5. sudo apt-get install -y postfix
  6. # Add the GitLab package repository
  7. curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
  8. # install the package
  9. # a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password
  10. sudo apt install gitlab-ee
  11. ## added these in /etc/hosts, since no internet dns resolving is possible inside the company network:
  12. 172.65.251.78 gitlab.com
  13. 35.185.44.232 docs.gitlab.com
  14. 104.18.4.247 embed.diagrams.net
  15. # 修改配置文件
  16. sudo nano /etc/gitlab/gitlab.rb
  17. # 修改gitlab地址
  18. external_url 'http://gitlab.xxxx.com'
  19. ## 重新配置
  20. sudo gitlab-ctl reconfigure
  21. ## reconfigure开始运行后创建缺失的conf文件:避免安装过程报错退出
  22. touch /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.sem.conf
  23. touch /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmall.conf
  24. touch /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf
  25. # 查看密码
  26. nano /etc/gitlab/initial_root_password
  27. # 登入
  28. # Byebye
复制代码


回复

使用道具 举报

意见建议

Email:forum@gitlab.cn
  • 关注公众号
  • 添加专业顾问
Copyright © 2001-2024 极狐GitLab论坛 版权所有 All Rights Reserved. 鄂ICP备2021008419号-1|鄂公网安备42018502006137号
关灯 快速发帖
扫一扫添加专业顾问
返回顶部
快速回复 返回顶部 返回列表