Elasticsearch already return Elasticsearch::Transport::Transport::Errors::NotFound
Summary
我为极狐 GitLab 配置了高级搜索,功能使用看起来是正常的,但是后台日志一直提示报错,在客户14.6.1的环境中发现了相同的问题。
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .geoip_databases 6swq6LNKSq-eP6-cpcbVxQ 1 0 40 0 37.9mb 37.9mb
green open .security-7 d7BbivNgT4mG5vmeSsbO5A 1 0 7 0 25.8kb 25.8kb
yellow open gitlab-production-merge_requests-20220810-1051 6XTLlow8T_C4IDUyhpjNjA 1 1 185 42 97.5kb 97.5kb
yellow open gitlab-production-notes-20220810-1051 9rwxpBSSR8-wGmZppZ1KNg 1 1 47 0 30.5kb 30.5kb
yellow open gitlab-production-issues-20220810-1051 RxZ98BJHSqm-gK5UCaYc_g 1 1 14 0 13kb 13kb
yellow open gitlab-production-20220810-1851 hMwGJVVjRzKetXL1-bOERw 1 1 43837 33 277mb 277mb
yellow open gitlab-production-migrations S48xH0VLS2W6v-yRq8fZDA 1 1 22 1 22.8kb 22.8kb
yellow open gitlab-production-commits-20220810-1051 1FTCMSGfS3eQF5495sme8w 1 1 138977 0 46.5mb 46.5mb
Steps to reproduce
正常配置 elasticsearch 应该就能看到此条错误输出
Example Project
What is the current bug behavior?
Error show index gitlab-production-migrationsnot found。
What is the expected correct behavior?
No errors output.
Relevant logs and/or screenshots
{"severity":"ERROR","time":"2022-08-12T01:30:12.185Z","correlation_id":"0b45f551b9c13aed027d970aa43174d4","message":"[Elastic::MigrationRecord]: Elasticsearch::Transport::Transport::Errors::NotFound: [404] {\"_index\":\"gitlab-production-migrations\",\"_type\":\"_doc\",\"_id\":\"20201105181100\",\"found\":false}"}
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
System information
System: CentOS 7.9.2009
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.7.5p203
Gem Version: 3.1.4
Bundler Version:2.3.15
Rake Version: 13.0.6
Redis Version: 6.2.7
Sidekiq Version:6.4.0
Go Version: go1.15.14 linux/amd64
GitLab information
Version: 15.2.0-jh
Revision: c9d0dbf4fc8
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 12.10
URL: https://gitlab.msens.cn
HTTP Clone URL: https://gitlab.msens.cn/some-group/some-project.git
SSH Clone URL: git@gitlab.msens.cn:some-group/some-project.git
Elasticsearch: yes
Geo: no
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 14.9.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... ...... Redis version >= 6.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1660268784 sudo mv /var/opt/gitlab/.ssh/authorized_keys.bak ~/gitlab-check-backup-1660268784 For more information see: doc/user/ssh.md#overriding-ssh-settings-on-the-gitlab-server Please fix the error above and rerun the checks. Active users: ... 32 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... yes (elasticsearch 7.17.5)
Checking GitLab App ... Finished
### Possible fixes
<!-- If you can, link to the line of code that might be responsible for the problem. -->