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

返回列表 发布新帖

422: The change you requested was rejected

493 3
发表于 2024-9-18 10:36:49 | 显示全部楼层 阅读模式

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

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

×
安装步骤:
  1、拉取helm 安装需要的value.yaml 等文件


     helm repo add gitlab https://charts.gitlab.io
     helm pull gitlab/gitlab
  2、修改values.yaml 的版本为社区版,同时修改certmanager-issuer字段,修改gitlab-default-webservice的type 为nodeport
  3、安装
helm install gitlab ./ -n gitlab

  4、安装完成,查看
     root@pcl-16:~# kubectl get pods -n gitlab
NAME                                             READY   STATUS      RESTARTS        AGE
gitlab-certmanager-cainjector-6477d7cc76-lszss   1/1     Running     0               3d17h
gitlab-certmanager-df677dddf-dnxq8               1/1     Running     0               3d17h
gitlab-certmanager-webhook-5bc957cfb8-vkvv7      1/1     Running     0               3d17h
gitlab-gitaly-0                                  1/1     Running     0               3d17h
gitlab-gitlab-exporter-89b786864-n8n64           1/1     Running     0               3d17h
gitlab-gitlab-shell-6f84b6f64b-ls7ps             1/1     Running     0               3d17h
gitlab-gitlab-shell-6f84b6f64b-w5rrq             1/1     Running     0               3d17h
gitlab-issuer-4a5442f-45slg                      0/1     Completed   0               3d17h
gitlab-kas-65b4b88f7f-plg8w                      1/1     Running     3 (3d17h ago)   3d17h
gitlab-kas-65b4b88f7f-xlzxd                      1/1     Running     2 (3d17h ago)   3d17h
gitlab-migrations-cd27c8c-bvkjl                  0/1     Completed   2               3d17h
gitlab-minio-767977c54d-z2sjh                    1/1     Running     0               3d17h
gitlab-minio-create-buckets-f104bf1-82xqg        0/1     Completed   0               3d17h
gitlab-postgresql-0                              2/2     Running     0               3d17h
gitlab-prometheus-server-646859bfc9-dntss        2/2     Running     0               3d17h
gitlab-redis-master-0                            2/2     Running     0               3d17h
gitlab-registry-99f677c6d-nq42s                  1/1     Running     0               3d17h
gitlab-registry-99f677c6d-r67r2                  1/1     Running     0               3d17h
gitlab-sidekiq-all-in-1-v2-69d8d79559-kxnxx      1/1     Running     0               3d17h
gitlab-toolbox-cdcb69986-26wp8                   1/1     Running     0               3d17h
gitlab-webservice-default-777f848d94-6nht6       2/2     Running     0               3d16h
gitlab-webservice-default-777f848d94-xcrx2       2/2     Running     0               3d16h
root@pcl-16:~# kubectl get svc -n gitlab
NAME                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                        AGE
gitlab-certmanager           ClusterIP   10.69.141.166   <none>        9402/TCP                                       3d17h
gitlab-certmanager-webhook   ClusterIP   10.69.90.243    <none>        443/TCP                                        3d17h
gitlab-gitaly                ClusterIP   None            <none>        8075/TCP,9236/TCP                              3d17h
gitlab-gitlab-exporter       ClusterIP   10.69.206.120   <none>        9168/TCP                                       3d17h
gitlab-gitlab-shell          ClusterIP   10.69.41.198    <none>        22/TCP                                         3d17h
gitlab-kas                   ClusterIP   10.69.212.239   <none>        8150/TCP,8153/TCP,8154/TCP,8151/TCP            3d17h
gitlab-minio-svc             ClusterIP   10.69.251.126   <none>        9000/TCP                                       3d17h
gitlab-postgresql            ClusterIP   10.69.112.230   <none>        5432/TCP                                       3d17h
gitlab-postgresql-hl         ClusterIP   None            <none>        5432/TCP                                       3d17h
gitlab-postgresql-metrics    ClusterIP   10.69.174.127   <none>        9187/TCP                                       3d17h
gitlab-prometheus-server     ClusterIP   10.69.220.180   <none>        80/TCP                                         3d17h
gitlab-redis-headless        ClusterIP   None            <none>        6379/TCP                                       3d17h
gitlab-redis-master          ClusterIP   10.69.250.207   <none>        6379/TCP                                       3d17h
gitlab-redis-metrics         ClusterIP   10.69.253.207   <none>        9121/TCP                                       3d17h
gitlab-registry              ClusterIP   10.69.89.236    <none>        5000/TCP                                       3d17h
gitlab-webservice-default    NodePort    10.69.248.187   <none>        8080:31388/TCP,8181:30614/TCP,8083:32526/TCP   3d17h

5、通过浏览器访问  gitlab-webservice-default,并注册

注册页面

注册页面


点击注册时报422的错

报错

报错


查看log:

log

log


{"component": "gitlab","subcomponent":"production_json","method":"POST","path":"/users","format":"html","controller":"RegistrationsController","action":"create","status":422,"time":"2024-09-18T01:39:54.577Z","params":[{"key":"authenticity_token","value":"[FILTERED]"},{"key":"new_user","value":{"first_name":"test","last_name":"test1","username":"test2","email":"test1@qq.com","password":"[FILTERED]"}}],"correlation_id":"01J81CJDYHWEDK4K2PAYD5BMNG","remote_ip":"172.21.2.101","ua":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.212.400 QQBrowser/12.0.5443.400","queue_duration_s":0.111751,"request_urgency":"default","target_duration_s":1,"db_count":1,"db_write_count":0,"db_cached_count":0,"db_txn_count":0,"db_replica_txn_count":0,"db_primary_txn_count":0,"db_main_txn_count":0,"db_ci_txn_count":0,"db_main_replica_txn_count":0,"db_ci_replica_txn_count":0,"db_replica_count":0,"db_primary_count":1,"db_main_count":1,"db_ci_count":0,"db_main_replica_count":0,"db_ci_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":0,"db_main_cached_count":0,"db_ci_cached_count":0,"db_main_replica_cached_count":0,"db_ci_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_ci_wal_count":0,"db_main_replica_wal_count":0,"db_ci_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_ci_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_ci_replica_wal_cached_count":0,"db_replica_txn_max_duration_s":0.0,"db_primary_txn_max_duration_s":0.0,"db_main_txn_max_duration_s":0.0,"db_ci_txn_max_duration_s":0.0,"db_main_replica_txn_max_duration_s":0.0,"db_ci_replica_txn_max_duration_s":0.0,"db_replica_txn_duration_s":0.0,"db_primary_txn_duration_s":0.0,"db_main_txn_duration_s":0.0,"db_ci_txn_duration_s":0.0,"db_main_replica_txn_duration_s":0.0,"db_ci_replica_txn_duration_s":0.0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.03,"db_main_duration_s":0.03,"db_ci_duration_s":0.0,"db_main_replica_duration_s":0.0,"db_ci_replica_duration_s":0.0,"cpu_s":0.095288,"mem_objects":11372,"mem_bytes":1664895,"mem_mallocs":3388,"mem_total_bytes":2119775,"pid":6963,"worker_id":"puma_1","rate_limiting_gates":[],"exception.class":"ActionController::InvalidAuthenticityToken","exception.message":"Can't verify CSRF token authenticity.","exception.backtrace":["actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:253:in `handle_unverified_request'","actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:286:in `handle_unverified_request'","devise (4.9.3) lib/devise/controllers/helpers.rb:255:in `handle_unverified_request'","actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:275:in `verify_authenticity_token'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:400:in `block in make_lambda'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'","actionpack (7.0.8.4) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:200:in `block in halting'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `block in invoke_before'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `each'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `invoke_before'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:116:in `block in run_callbacks'","sentry-rails (5.18.2) lib/sentry/rails/controller_transaction.rb:30:in `block in sentry_around_action'","sentry-ruby (5.18.2) lib/sentry/hub.rb:102:in `with_child_span'","sentry-ruby (5.18.2) lib/sentry-ruby.rb:491:in `with_child_span'","sentry-rails (5.18.2) lib/sentry/rails/controller_transaction.rb:16:in `sentry_around_action'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:138:in `run_callbacks'",



6、已经尝试过的debug:
将电脑的时区改成和container同步的UTC,重启浏览器,重新访问,仍然报422的错

回复

使用道具 举报

评论3

shangxinjinxing楼主Lv.1 发表于 2024-9-18 10:38:42 | 显示全部楼层
请教各位技术老师,大牛,能不能看出是哪里配置错了?
回复

使用道具 举报

wangkaixuanLv.7 发表于 2024-9-18 11:03:54 | 显示全部楼层
shangxinjinxing 发表于 2024-9-18 10:38
请教各位技术老师,大牛,能不能看出是哪里配置错了?

用root是否可以登录?
另外就是如果你注册的话,需要配置smtp服务哦
回复

使用道具 举报

shangxinjinxing楼主Lv.1 发表于 2024-9-18 14:55:04 | 显示全部楼层
wangkaixuan 发表于 2024-9-18 11:03
用root是否可以登录?
另外就是如果你注册的话,需要配置smtp服务哦

root登录也是报这个错。
kubectl logs -n gitlab gitlab-webservice-default-777f848d94-8s6mw  | grep root
Defaulted container "webservice" out of: webservice, gitlab-workhorse, certificates (init), configure (init), dependencies (init)
{"component": "gitlab","subcomponent":"production_json","method":"POST","path":"/users/sign_in","format":"html","controller":"SessionsController","action":"create","status":422,"time":"2024-09-18T06:45:44.051Z","params":[{"key":"authenticity_token","value":"[FILTERED]"},{"key":"user","value":{"login":"root","password":"[FILTERED]","remember_me":"0"}}],"correlation_id":"01J81Y2DEQ7RXFFN4XN3XF3MZ3","remote_ip":"172.21.2.101","ua":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.212.400 QQBrowser/12.0.5443.400","queue_duration_s":0.020567,"request_urgency":"low","target_duration_s":5,"db_count":0,"db_write_count":0,"db_cached_count":0,"db_txn_count":0,"db_replica_txn_count":0,"db_primary_txn_count":0,"db_main_txn_count":0,"db_ci_txn_count":0,"db_main_replica_txn_count":0,"db_ci_replica_txn_count":0,"db_replica_count":0,"db_primary_count":0,"db_main_count":0,"db_ci_count":0,"db_main_replica_count":0,"db_ci_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":0,"db_main_cached_count":0,"db_ci_cached_count":0,"db_main_replica_cached_count":0,"db_ci_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_ci_wal_count":0,"db_main_replica_wal_count":0,"db_ci_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_ci_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_ci_replica_wal_cached_count":0,"db_replica_txn_max_duration_s":0.0,"db_primary_txn_max_duration_s":0.0,"db_main_txn_max_duration_s":0.0,"db_ci_txn_max_duration_s":0.0,"db_main_replica_txn_max_duration_s":0.0,"db_ci_replica_txn_max_duration_s":0.0,"db_replica_txn_duration_s":0.0,"db_primary_txn_duration_s":0.0,"db_main_txn_duration_s":0.0,"db_ci_txn_duration_s":0.0,"db_main_replica_txn_duration_s":0.0,"db_ci_replica_txn_duration_s":0.0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.0,"db_main_duration_s":0.0,"db_ci_duration_s":0.0,"db_main_replica_duration_s":0.0,"db_ci_replica_duration_s":0.0,"cpu_s":0.02526,"mem_objects":7209,"mem_bytes":550408,"mem_mallocs":1935,"mem_total_bytes":838768,"pid":102,"worker_id":"puma_0","rate_limiting_gates":[],"exception.class":"ActionController::InvalidAuthenticityToken","exception.message":"Can't verify CSRF token authenticity.","exception.backtrace":["actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:253:in `handle_unverified_request'","actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:286:in `handle_unverified_request'","devise (4.9.3) lib/devise/controllers/helpers.rb:255:in `handle_unverified_request'","actionpack (7.0.8.4) lib/action_controller/metal/request_forgery_protection.rb:275:in `verify_authenticity_token'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:400:in `block in make_lambda'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:180:in `block (2 levels) in halting_and_conditional'","actionpack (7.0.8.4) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:181:in `block in halting_and_conditional'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `block in invoke_before'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `each'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:595:in `invoke_before'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:116:in `block in run_callbacks'","sentry-rails (5.18.2) lib/sentry/rails/controller_transaction.rb:30:in `block in sentry_around_action'","sentry-ruby (5.18.2) lib/sentry/hub.rb:102:in `with_child_span'","sentry-ruby (5.18.2) lib/sentry-ruby.rb:491:in `with_child_span'","sentry-rails (5.18.2) lib/sentry/rails/controller_transaction.rb:16:in `sentry_around_action'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'","activesupport (7.0.8.4) lib/active_support/callbacks.rb:138:in `run_callbacks'","actionpack (7.0.8.4) lib/abstract_controller/callbacks.rb:233:in `process_action'","actionpack (7.0.8.4) lib/action_controller/metal/rescue.rb:23:in `process_action'","
回复

使用道具 举报

意见建议

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