Error importing repository into user/one-project - undefined method `local?' for nil:NilClass
Summary
Have error on big project import 723,9 MB. I don't know is it size problem or something else - other projects were imported successfully
Steps to reproduce
Try to import big project, size like my > 700Mb
Example Project
Can't share backup project, sorry :)
Backup was made in Gitlab CE 11.9.6, trying to restore in Gitlab CE 11.11.5
Set memory settings for unicorn in /etc/gitlab/gitlab.rb
unicorn['worker_memory_limit_min'] = "400 * 1 << 20"
unicorn['worker_memory_limit_max'] = "1950 * 1 << 20"
Maybe I need make some other tweaks ? but I didn't saw memory errors in logs.
What is the current bug behavior?
Project not imported, error
What is the expected correct behavior?
Project import done without errors
Relevant logs and/or screenshots
2019-07-10_18:16:55.17813 2019-07-10T18:16:55.178Z 30371 TID-ou4paxgkf WARN: RuntimeError: Error importing repository into user/one-project - undefined method `local?' for nil:NilClass
2019-07-10_18:16:55.17828 2019-07-10T18:16:55.178Z 30371 TID-ou4paxgkf WARN: /opt/gitlab/embedded/service/gitlab-rails/app/workers/repository_import_worker.rb:26:in `perform'
2019-07-10_18:16:55.17829 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:192:in `execute_job'
2019-07-10_18:16:55.17830 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
2019-07-10_18:16:55.17830 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
2019-07-10_18:16:55.17831 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_status/server_middleware.rb:7:in `call'
2019-07-10_18:16:55.17831 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17832 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/correlation_logger.rb:10:in `block in call'
2019-07-10_18:16:55.17832 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/gitlab-labkit-0.2.0/lib/labkit/correlation/correlation_id.rb:18:in `use_id'
2019-07-10_18:16:55.17833 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/correlation_logger.rb:9:in `call'
2019-07-10_18:16:55.17834 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17835 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/batch_loader.rb:7:in `call'
2019-07-10_18:16:55.17835 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17836 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/request_store_middleware.rb:8:in `call'
2019-07-10_18:16:55.17836 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17836 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/memory_killer.rb:18:in `call'
2019-07-10_18:16:55.17837 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17837 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sentry-raven-2.9.0/lib/raven/integrations/sidekiq.rb:9:in `call'
2019-07-10_18:16:55.17838 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
2019-07-10_18:16:55.17839 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
2019-07-10_18:16:55.17840 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:164:in `block in process'
2019-07-10_18:16:55.17840 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
2019-07-10_18:16:55.17841 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:109:in `local'
2019-07-10_18:16:55.17841 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
2019-07-10_18:16:55.17842 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:43:in `block in call'
2019-07-10_18:16:55.17842 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.1.7/lib/active_support/execution_wrapper.rb:85:in `wrap'
2019-07-10_18:16:55.17843 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.1.7/lib/active_support/reloader.rb:68:in `block in wrap'
2019-07-10_18:16:55.17844 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.1.7/lib/active_support/execution_wrapper.rb:85:in `wrap'
2019-07-10_18:16:55.17846 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.1.7/lib/active_support/reloader.rb:67:in `wrap'
2019-07-10_18:16:55.17846 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:42:in `call'
2019-07-10_18:16:55.17847 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
2019-07-10_18:16:55.17847 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:250:in `stats'
2019-07-10_18:16:55.17848 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
2019-07-10_18:16:55.17848 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/job_logger.rb:8:in `call'
2019-07-10_18:16:55.17849 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
2019-07-10_18:16:55.17849 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:74:in `global'
2019-07-10_18:16:55.17850 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:125:in `block in dispatch'
2019-07-10_18:16:55.17850 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:48:in `with_context'
2019-07-10_18:16:55.17852 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
2019-07-10_18:16:55.17852 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:124:in `dispatch'
2019-07-10_18:16:55.17853 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:163:in `process'
2019-07-10_18:16:55.17853 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:83:in `process_one'
2019-07-10_18:16:55.17854 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:71:in `run'
2019-07-10_18:16:55.17854 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:16:in `watchdog'
2019-07-10_18:16:55.17855 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'
2019-07-10_18:17:09.39235 2019-07-10T18:17:09.392Z 30371 TID-ou4paxhd3 Ci::ArchiveTracesCronWorker JID-cf3f475050b16c607fc1fb59 INFO: start
2019-07-10_18:17:09.53606 2019-07-10T18:17:09.535Z 30371 TID-ou4paxhd3 Ci::ArchiveTracesCronWorker JID-cf3f475050b16c607fc1fb59 INFO: done: 0.144 sec
Output of checks
My local instance
Results of GitLab environment info
Expand for output related to GitLab environment info
# sudo gitlab-rake gitlab:env:infoSystem information System: Debian 10 Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 11.11.5 Revision: b85e6215a85 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.11 URL: http://gitlab.local HTTP Clone URL: http://gitlab.local/some-group/some-project.git SSH Clone URL: git@gitlab.local:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 9.1.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
root@debian:/home/andry# sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.1.0 ? ... OK (9.1.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes 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 Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 2/2 ... yes 2/3 ... yes 2/4 ... yes 2/5 ... yes 2/6 ... yes 2/7 ... yes 2/8 ... yes 2/9 ... yes 2/10 ... yes 2/11 ... yes 2/12 ... yes 2/13 ... yes 2/14 ... yes 2/15 ... yes 2/16 ... yes 2/17 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.5.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 2
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
I dont know - help me :)