请选择 进入手机版 | 继续访问电脑版
12下一页
返回列表 发布新帖

gitlab拆分Redis、Nginx、PG后,启动失败

1473 11
发表于 2024-5-16 16:58:09 | 显示全部楼层 阅读模式

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

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

×

本帖最后由 卌巜珡 于 2024-5-16 17:14 编辑

本帖最后由 卌巜珡 于 2024-5-16 17:06 编辑

本帖最后由 卌巜珡 于 2024-5-16 16:58 编辑

安装16.11.1版本的gitlab并且gitlab.rb配置了外部的Redis(集群模式)、Nginx、PG,还使用了对象存储,reconfigure正常通过,但是启动失败。跟踪日志显示gitlab.socket创建失败,但是看了下不存在端口冲突的情况。Redis集群模式的配置应该没错吧?

微信图片_20240516165603.jpg

微信图片_20240516165628.png

==> /var/log/gitlab/gitaly/current <== {"level":"info","msg":"maintenance: daily scheduled","pid":8252,"scheduled":"2024-05-17T12:00:00+08:00","time":"2024-05-16T08:05:50.318Z"} {"duration_ms":2494,"level":"info","msg":"License database preloaded","pid":8252,"time":"2024-05-16T08:05:52.786Z"} {"level":"warning","msg":"forwarding signal","pid":8246,"process":8252,"signal":15,"time":"2024-05-16T08:16:34.526Z","wrapper":8246} {"level":"warning","msg":"forwarding signal","pid":8246,"process":8252,"signal":18,"time":"2024-05-16T08:16:34.526Z","wrapper":8246} {"level":"warning","msg":"starting grace period","pid":8252,"time":"2024-05-16T08:16:34.526Z"} unclean Gitaly shutdown: received signal "terminated": wait: completed {"level":"warning","msg":"forwarding signal","pid":8246,"process":8252,"signal":17,"time":"2024-05-16T08:16:34.539Z","wrapper":8246} {"error":"os: process already finished","level":"error","msg":"can't forward the signal","pid":8246,"process":8252,"signal":17,"time":"2024-05-16T08:16:34.539Z","wrapper":8246} {"error":"exit status 1","level":"error","msg":"waiting for supervised command","pid":8246,"time":"2024-05-16T08:16:34.539Z","wrapper":8246} {"level":"error","msg":"wrapper for process shutting down","pid":8246,"process":8252,"time":"2024-05-16T08:16:35.205Z","wrapper":8246}

==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:15:41+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:15:51+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:16:01+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:16:11+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:16:21+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:16:31+08:00","uri":""}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"","time":"2024-05-16T16:16:41+08:00","uri":""}
{"level":"info","msg":"shutdown initiated","shutdown_timeout_s":0,"signal":"terminated","time":"2024-05-16T16:16:47+08:00"}
{"level":"info","msg":"keywatcher: shutting down","time":"2024-05-16T16:16:47+08:00"}
{"error":null,"level":"fatal","msg":"shutting down","time":"2024-05-16T16:16:47+08:00"}
{"severity":"ERROR","time":"2024-05-16T08:17:05.798Z","exception.class":"RedisClient::CommandError","exception.message":"MOVED 9490 192.168.162.1:6182 (redis://192.168.162.1:6181)","exception.backtrace":["redis-client (0.21.1) lib/redis_client/connection_mixin.rb:36:in `call'","redis-client (0.21.1) lib/redis_client.rb:294:in `block (2 levels) in call_v'","redis-client (0.21.1) lib/redis_client/middlewares.rb:16:in `call'","sentry-ruby (5.10.0) lib/sentry/redis.rb:85:in `block in call'","sentry-ruby (5.10.0) lib/sentry/redis.rb:17:in `block in instrument'","sentry-ruby (5.10.0) lib/sentry/hub.rb:102:in `with_child_span'","sentry-ruby (5.10.0) lib/sentry-ruby.rb:456:in `with_child_span'","sentry-ruby (5.10.0) lib/sentry/redis.rb:16:in `instrument'","sentry-ruby (5.10.0) lib/sentry/redis.rb:85:in `call'","lib/gitlab/instrumentation/redis_client_middleware.rb:14:in `block in call'","lib/gitlab/instrumentation/redis_helper.rb:17:in 
回复

使用道具 举报

评论11

wangkaixuanLv.7 发表于 2024-5-16 17:28:48 | 显示全部楼层
看起来是你的redis 连不上的原因导致的
回复

使用道具 举报

卌巜珡楼主Lv.1 发表于 2024-5-16 17:36:41 | 显示全部楼层
wangkaixuan 发表于 2024-5-16 17:28
看起来是你的redis 连不上的原因导致的

我切换gitlab自带的Redis也是报错
回复

使用道具 举报

wangkaixuanLv.7 发表于 2024-5-17 09:01:48 | 显示全部楼层
egrep -v '^$|^#' /etc/gitlab/gitlab.rb 看下配置文件
回复

使用道具 举报

素亮先生Lv.1 发表于 2024-5-17 10:56:37 | 显示全部楼层
我今天升级也是报错
回复

使用道具 举报

卌巜珡楼主Lv.1 发表于 2024-5-17 12:44:33 | 显示全部楼层
wangkaixuan 发表于 2024-5-17 09:01
egrep -v '^$|^#' /etc/gitlab/gitlab.rb 看下配置文件

看了下,主要是Puma服务起不来,8080端口怎么都无法启动
  1. external_url 'http://gitlab.example.com'
  2. gitlab_rails['object_store']['enabled'] = false
  3. gitlab_rails['object_store']['connection'] = {
  4. 'provider' => 'AWS',
  5. 'region' => 'eu-west-1',
  6. 'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  7. 'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  8. 'path_style' => true,
  9. 'endpoint' => 'http://192.168.60.31:17684'
  10. }
  11. gitlab_rails['object_store']['proxy_download'] = true
  12. gitlab_rails['object_store']['objects']['artifacts']['bucket'] = 'gitlab-artifacts'
  13. gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = 'gitlab-external-diffs'
  14. gitlab_rails['object_store']['objects']['lfs']['bucket'] = 'gitlab-lfs'
  15. gitlab_rails['object_store']['objects']['uploads']['bucket'] = 'gitlab-uploads'
  16. gitlab_rails['object_store']['objects']['packages']['bucket'] = 'gitlab-packages'
  17. gitlab_rails['object_store']['objects']['dependency_proxy']['bucket'] = 'gitlab-dependency-proxy'
  18. gitlab_rails['object_store']['objects']['terraform_state']['bucket'] = 'gitlab-terraform-state'
  19. gitlab_rails['object_store']['objects']['ci_secure_files']['bucket'] = 'gitlab-ci-secure-files'
  20. gitlab_rails['object_store']['objects']['pages']['bucket'] = 'gitlab-pages'
  21. gitlab_rails['artifacts_enabled'] = true
  22. gitlab_rails['artifacts_object_store_enabled'] = true
  23. gitlab_rails['artifacts_object_store_proxy_download'] = true
  24. gitlab_rails['artifacts_object_store_remote_directory'] = "gitlab-artifacts"
  25. gitlab_rails['artifacts_object_store_connection'] = {
  26.   'provider' => 'AWS',
  27.   'region' => 'eu-west-1',
  28.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  29.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  30.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  31.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  32. }
  33. gitlab_rails['external_diffs_enabled'] = true
  34. gitlab_rails['external_diffs_object_store_enabled'] = true
  35. gitlab_rails['external_diffs_object_store_proxy_download'] = true
  36. gitlab_rails['external_diffs_object_store_remote_directory'] = "gitlab-external-diffs"
  37. gitlab_rails['external_diffs_object_store_connection'] = {
  38.   'provider' => 'AWS',
  39.   'region' => 'eu-west-1',
  40.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  41.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  42.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  43.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  44. }
  45. gitlab_rails['lfs_enabled'] = true
  46. gitlab_rails['lfs_object_store_enabled'] = true
  47. gitlab_rails['lfs_object_store_proxy_download'] = true
  48. gitlab_rails['lfs_object_store_remote_directory'] = "gitlab-lfs-objects"
  49. gitlab_rails['lfs_object_store_connection'] = {
  50.   'provider' => 'AWS',
  51.   'region' => 'eu-west-1',
  52.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  53.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  54.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  55.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  56. }
  57. gitlab_rails['uploads_object_store_enabled'] = true
  58. gitlab_rails['uploads_object_store_proxy_download'] = true
  59. gitlab_rails['uploads_object_store_remote_directory'] = "gitlab-uploads"
  60. gitlab_rails['uploads_object_store_connection'] = {
  61.   'provider' => 'AWS',
  62.   'region' => 'eu-west-1',
  63.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  64.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  65.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  66.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  67. }
  68. gitlab_rails['terraform_state_enabled'] = true
  69. gitlab_rails['terraform_state_object_store_enabled'] = true
  70. gitlab_rails['terraform_state_object_store_remote_directory'] = "gitlab-terraform"
  71. gitlab_rails['terraform_state_object_store_connection'] = {
  72.   'provider' => 'AWS',
  73.   'region' => 'eu-west-1',
  74.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  75.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  76.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  77.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  78. }
  79. gitlab_rails['ci_secure_files_enabled'] = true
  80. gitlab_rails['ci_secure_files_object_store_enabled'] = true
  81. gitlab_rails['ci_secure_files_object_store_remote_directory'] = "gitlab-ci-secure-files"
  82. gitlab_rails['ci_secure_files_object_store_connection'] = {
  83.   'provider' => 'AWS',
  84.   'region' => 'eu-west-1',
  85.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  86.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  87.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  88.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  89. }
  90. gitlab_rails['pages_object_store_enabled'] = true
  91. gitlab_rails['pages_object_store_remote_directory'] = "gitlab-pages"
  92. gitlab_rails['pages_object_store_connection'] = {
  93.   'provider' => 'AWS',
  94.   'region' => 'eu-west-1',
  95.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  96.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  97.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  98.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  99. }
  100. gitlab_rails['pages_local_store_enabled'] = false
  101. gitlab_rails['ldap_enabled'] = false
  102. gitlab_rails['prevent_ldap_sign_in'] = false
  103. gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
  104.   main: # 'main' is the GitLab 'provider ID' of this LDAP server
  105.     label: 'AD LDAP'
  106.     host: '192.168.20.6'
  107.     port: 389
  108.     uid: 'sAMAccountName'
  109.     bind_dn: 'CN=Openshift,OU=Service Accounts,OU=Users,OU=NCBank,DC=ncbank,DC=cn'
  110.     password: 'Ncb@401917ddc938'
  111.     encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
  112.     active_directory: true
  113.     allow_username_or_email_login: false
  114.     block_auto_created_users: false
  115.     user_filter: ''
  116. EOS
  117. gitlab_rails['manage_backup_path'] = false
  118. gitlab_rails['backup_path'] = "s3://gitlab-backups/"
  119. gitlab_rails['backup_archive_permissions'] = 0644
  120. gitlab_rails['backup_keep_time'] = 604800
  121. gitlab_rails['backup_upload_connection'] = {
  122.   'provider' => 'AWS',
  123.   'region' => 'eu-west-1',
  124.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  125.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  126.   'endpoint' => 'http://192.168.60.31:17684',
  127.   # # If IAM profile use is enabled, remove aws_access_key_id and aws_secret_access_key
  128.   'use_iam_profile' => false
  129. }
  130. gitlab_rails['backup_upload_remote_directory'] = 'gitlab-backups'
  131. gitlab_rails['db_adapter'] = "postgresql"
  132. gitlab_rails['db_encoding'] = "UTF-8"
  133. gitlab_rails['db_database'] = "gitlab_7"
  134. gitlab_rails['db_username'] = "gitlab"
  135. gitlab_rails['db_password'] = 'gitlabhq_production'
  136. gitlab_rails['db_host'] = "192.168.162.27"
  137. gitlab_rails['db_port'] = 6432
  138. postgresql['enable'] = false
  139. redis['enable'] = true
  140. nginx['enable'] = true
  141. gitlab_rails['packages_enabled'] = true
  142. gitlab_rails['packages_object_store_enabled'] = true
  143. gitlab_rails['packages_object_store_proxy_download'] = true
  144. gitlab_rails['packages_object_store_remote_directory'] = "gitlab-packages"
  145. gitlab_rails['packages_object_store_connection'] = {
  146.   'provider' => 'AWS',
  147.   'region' => 'eu-west-1',
  148.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  149.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  150.   # # The below options configure an S3 compatible host instead of AWS
  151.   # 'host' => 's3.amazonaws.com',
  152.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  153.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  154. }
  155. gitlab_rails['dependency_proxy_enabled'] = true
  156. gitlab_rails['dependency_proxy_object_store_enabled'] = true
  157. gitlab_rails['dependency_proxy_object_store_proxy_download'] = true
  158. gitlab_rails['dependency_proxy_object_store_remote_directory'] = "gitlab-dependency-proxy"
  159. gitlab_rails['dependency_proxy_object_store_connection'] = {
  160.   'provider' => 'AWS',
  161.   'region' => 'eu-west-1',
  162.   'aws_access_key_id' => 'KT6JJYZREE67EKLK4387',
  163.   'aws_secret_access_key' => 'w2h9VYpLwm2/cdYgj0i6UthjFy7CUwxtvR5Hd8gO',
  164.   'endpoint' => 'http://192.168.60.31:17684', # default: nil - Useful for S3 compliant services such as DigitalOcean Spaces
  165.   'path_style' => true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
  166. }
复制代码
回复

使用道具 举报

卌巜珡楼主Lv.1 发表于 2024-5-17 20:19:33 | 显示全部楼层
已解决,是16.11.1首次安装发现没有对数据库的数据进行初始化。
回复

使用道具 举报

wangkaixuanLv.7 发表于 2024-5-20 09:37:18 | 显示全部楼层
卌巜珡 发表于 2024-5-17 20:19
已解决,是16.11.1首次安装发现没有对数据库的数据进行初始化。

好的,如果是这样的话,后面可以通过gitlab-rake db:migrate:status检查下即可
回复

使用道具 举报

卌巜珡楼主Lv.1 发表于 2024-5-20 13:09:07 | 显示全部楼层
wangkaixuan 发表于 2024-5-20 09:37
好的,如果是这样的话,后面可以通过gitlab-rake db:migrate:status检查下即可

谢谢
回复

使用道具 举报

卌巜珡楼主Lv.1 发表于 2024-5-21 11:15:48 | 显示全部楼层

今天研究了下,用这个命令还是不行。users这些表里有数据了,但是application_settings这张表里面数据进不来。
回复

使用道具 举报

意见建议

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