故障现象Gitlab的管理员账户登录到Gitlab页面后,点击Admin的时,见图一图一返回如下500的错误。见图二图二排查过程1-检查Gitlab的运行状态,使用命令Gitlab-ctl status,返回结果如下,见图三,所有运行结果正常。图三2-利用命令gitlab-rake cache:clear 清空缓存,问题还是依旧。3-使用命令gitlab-rake db:migrate:status 检查数据的关系,数据库关系一切正常。4-通过命令gitlab-ctl tail检查日志,发现错误信息如下,Started GET "/admin" for X.X.X.X at 2021-07-08 15:00:03 +0800Processing by Admin::DashboardController#index as HTMLStarted POST "/api/v4/internal/allowed" for 127.0.0.1 at 2021-07-08 15:00:03 +0800Completed 500 Internal Server Error in 241ms (ActiveRecord: 51.5ms | Elasticsearch: 0.0ms)ActionView::Template::Error (undefined method `becomes' for nil:NilClass): 174: %h4 Latest projects 175: – @projects.each do |project| 176: %p 177: = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated-60' 178: %span.light.float-right 179: #{time_ago_with_tooltip(project.created_at)} 180: .col-md-4 app/views/admin/dashboard/index.html.haml:177:in `block in _app_views_admin_dashboard_index_html_haml__4030967075712672773_70279417360200'解决结果目前只能用临时解决办法,通过访问http://gitlab+ip/admin/user的路径去访问管理界面。各位大神,如果知道解决办法请留言。谢谢