Open ISibboI opened 8 months ago
Couldn't reproduce with release-23.11
:
# sudo -u gitlab gitlab-rails console
[... unrelated warnings omitted ...]
--------------------------------------------------------------------------------
Ruby: ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
GitLab: 16.5.3-ee (Unknown) EE
GitLab Shell: 14.29.0
PostgreSQL: 15.5
------------------------------------------------------------[ booted in 98.84s ]
Loading production environment (Rails 7.0.8)
irb(main):001:0>
Have you started gitlab-rails
as the gitlab
user?
Describe the bug
Running
gitlab-rails console
gives the following error:log
``` $ gitlab-rails console WARNING: The Rust extension for prometheus-client-mmap is unavailable, falling back to the legacy C extension. The Rust extension will be required in the next version. If you are compiling this gem from source, ensure your build system has a Rust compiler and clang: https://gitlab.com/gitlab-org/ruby/gems/prometheus-client-mmap /nix/store/an58h65fd4x2isgfw9b8cxkvgh3kgrch-gitlab-env-16.5.3/lib/ruby/gems/3.0.0/gems/unleash-3.2.2/lib/unleash/strategy/util.rb:8: warning: already initialized constant Unleash::Strategy::Util::NORMALIZER /nix/store/z76gl443z2p3y2snknz0qik2yprbd4rn-ruby3.0.6-unleash-3.2.2/lib/ruby/gems/3.0.0/gems/unleash-3.2.2/lib/unleash/strategy/util.rb:8: warning: previous definition of NORMALIZER was here ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ****************************************************************************** Your database has a single connection, and single connections were deprecated in GitLab 15.9 https://docs.gitlab.com/ee/update/deprecations.html#single-database-connection-is-deprecated. Please add a :ci section to your database, following these instructions: https://docs.gitlab.com/ee/install/installation.html#configure-gitlab-db-settings. ****************************************************************************** /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client': We could not find your database: gitlab. Which can be found in the database configuration file located at config/database.yml. (ActiveRecord::NoDatabaseError) To resolve this issue: - Did you create the database for this app, or delete it? You may need to create your database. - Has the database name changed? Check your database.yml config has the correct database name. To create your database, run: bin/rails db:create from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:313:in `retrieve_connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:280:in `connection' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/model_schema.rb:407:in `table_exists?' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/attribute_methods/primary_key.rb:95:in `get_primary_key' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/attribute_methods/primary_key.rb:83:in `reset_primary_key' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/attribute_methods/primary_key.rb:71:in `primary_key' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/relation/delegation.rb:93:in `primary_key' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/relation/finder_methods.rb:575:in `ordered_relation' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/relation/finder_methods.rb:174:in `last' from /nix/store/bdfk653lhxq8c429civ7zkdgzwc34hc2-ruby3.0.6-activerecord-7.0.8/lib/ruby/gems/3.0.0/gems/activerecord-7.0.8/lib/active_record/querying.rb:22:in `last' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/app/models/concerns/cacheable_attributes.rb:19:in `current_without_cache' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/app/models/concerns/cacheable_attributes.rb:63:in `rescue in current' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/app/models/concerns/cacheable_attributes.rb:51:in `current' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/lib/gitlab/current_settings.rb:60:in `uncached_application_settings' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/lib/gitlab/current_settings.rb:42:in `ensure_application_settings!' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/lib/gitlab/current_settings.rb:15:in `block in current_application_settings' from /nix/store/kq54awrdfvvvj9ligmhc918zkl5faipy-gemfile-and-lockfile/gems/gitlab-safe_request_store/lib/gitlab/safe_request_store/null_store.rb:37:in `fetch' from /nix/store/cjd5qzvddf8yi8r6d5scp1pny43ii7zk-ruby-3.0.6/lib/ruby/3.0.0/forwardable.rb:238:in `fetch' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/lib/gitlab/current_settings.rb:15:in `current_application_settings' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/lib/gitlab/current_settings.rb:32:in `method_missing' from /nix/store/1pzddwhbwk4kk0l02ygd3kfa35j3rksf-gitlab-16.5.3/share/gitlab/config/initializers/8_devise.rb:165:in `block inSteps To Reproduce
Add this to your
configuration.nix
:Expected behavior
The console works.
Additional context
Gitlab works fine on the web.
Notify maintainers
@globin @krav @talyz @yayayayaka @yuka
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.