Troubleshoot: icu4c accidentally upgraded, causes PostgreSQL to fail

charlock_holmes error

gem pristine charlock_holmes

PostgreSQL is not up

  1. rails-web is up but still 502. gdk tail rails-web
2020-07-06_00:27:08.54452 rails-web             : bundler: failed to load command: puma (/Users/tkuah/.rbenv/versions/2.6.6/bin/puma)
2020-07-06_00:27:08.54459 rails-web             : PG::ConnectionBad: could not connect to server: No such file or directory
2020-07-06_00:27:08.54460 rails-web             : 	Is the server running locally and accepting
2020-07-06_00:27:08.54461 rails-web             : 	connections on Unix domain socket "/Users/tkuah/code/ee-gdk/postgresql/.s.PGSQL.5432"?
2020-07-06_00:27:08.54462 rails-web             : 
2020-07-06_00:27:08.54463 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pg-1.2.2/lib/pg.rb:58:in `initialize'
2020-07-06_00:27:08.54463 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pg-1.2.2/lib/pg.rb:58:in `new'
2020-07-06_00:27:08.54464 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pg-1.2.2/lib/pg.rb:58:in `connect'
2020-07-06_00:27:08.54465 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:46:in `postgresql_connection'
2020-07-06_00:27:08.54465 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:887:in `new_connection'
2020-07-06_00:27:08.54466 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `checkout_new_connection'
2020-07-06_00:27:08.54468 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:910:in `try_to_checkout_new_connection'
2020-07-06_00:27:08.54469 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:871:in `acquire_connection'
2020-07-06_00:27:08.54469 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:593:in `checkout'
2020-07-06_00:27:08.54470 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:437:in `connection'
2020-07-06_00:27:08.54471 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1119:in `retrieve_connection'
2020-07-06_00:27:08.54471 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_handling.rb:221:in `retrieve_connection'
2020-07-06_00:27:08.54473 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_handling.rb:189:in `connection'
2020-07-06_00:27:08.54474 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/model_schema.rb:340:in `table_exists?'
2020-07-06_00:27:08.54474 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/attribute_methods/primary_key.rb:91:in `get_primary_key'
2020-07-06_00:27:08.54475 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/attribute_methods/primary_key.rb:79:in `reset_primary_key'
2020-07-06_00:27:08.54476 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/attribute_methods/primary_key.rb:67:in `primary_key'
2020-07-06_00:27:08.54476 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:92:in `primary_key'
2020-07-06_00:27:08.54477 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/finder_methods.rb:553:in `ordered_relation'
2020-07-06_00:27:08.54479 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/finder_methods.rb:148:in `last'
2020-07-06_00:27:08.54480 rails-web             :   /Users/tkuah/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/querying.rb:21:in `last'
2020-07-06_00:27:08.54480 rails-web             :   /Users/tkuah/code/ee-gdk/gitlab/app/models/concerns/cacheable_attributes.rb:19:in `current_without_cache'
2020-07-06_00:27:08.54481 rails-web             :   /Users/tkuah/code/ee-gdk/gitlab/app/models/concerns/cacheable_attributes.rb:55:in `current'
  1. postgresql is down.
$ gdk tail postgresql
(in /Users/tkuah/code/ee-gdk)
2020-07-06_00:26:20.51445 postgresql            :   Reason: image not found
2020-07-06_00:26:20.51557 postgresql            : support/postgresql-signal-wrapper:16:in `<main>': undefined method `exitstatus' for nil:NilClass (NoMethodError)
2020-07-06_00:26:21.62892 postgresql            : dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.66.dylib
2020-07-06_00:26:21.62896 postgresql            :   Referenced from: /usr/local/opt/postgresql@11/bin/postgres
2020-07-06_00:26:21.62897 postgresql            :   Reason: image not found
2020-07-06_00:26:21.63013 postgresql            : support/postgresql-signal-wrapper:16:in `<main>': undefined method `exitstatus' for nil:NilClass (NoMethodError)
2020-07-06_00:26:22.73420 postgresql            : dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.66.dylib
2020-07-06_00:26:22.73424 postgresql            :   Referenced from: /usr/local/opt/postgresql@11/bin/postgres
2020-07-06_00:26:22.73425 postgresql            :   Reason: image not found
2020-07-06_00:26:22.73503 postgresql            : support/postgresql-signal-wrapper:16:in `<main>': undefined method `exitstatus' for nil:NilClass (NoMethodError)
2020-07-06_00:26:23.86829 postgresql            : dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.66.dylib
2020-07-06_00:26:23.86832 postgresql            :   Referenced from: /usr/local/opt/postgresql@11/bin/postgres
2020-07-06_00:26:23.86833 postgresql            :   Reason: image not found
2020-07-06_00:26:23.86953 postgresql            : support/postgresql-signal-wrapper:16:in `<main>': undefined method `exitstatus' for nil:NilClass (NoMethodError)
2020-07-06_00:26:24.97416 postgresql            : dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.66.dylib
2020-07-06_00:26:24.97420 postgresql            :   Referenced from: /usr/local/opt/postgresql@11/bin/postgres
2020-07-06_00:26:24.97422 postgresql            :   Reason: image not found
2020-07-06_00:26:24.97509 postgresql            : support/postgresql-signal-wrapper:16:in `<main>': undefined method `exitstatus' for nil:NilClass (NoMethodError)
2020-07-06_00:26:26.08079 postgresql            : dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.66.dylib
2020-07-06_00:26:26.08083 postgresql            :   Referenced from: /usr/local/opt/postgresql@11/bin/postgres
2020-07-06_00:26:26.08084 postgresql            :   Reason: image not found

Fix: brew reinstall postgresql@11, then gdk restart postgresql

Elastic-indexer

  1. Updating gitlab-elasticsearch-indexer fails on gdk update
------------------------------------------------------------
Updating gitlab-org/gitlab-elasticsearch-indexer to v2.4.0
------------------------------------------------------------
Fetching origin
From https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer
 - [deleted]         (none)     -> origin/60-extract-setup-test-client
   6c46a0d..aef9f7b  master     -> origin/master
Previous HEAD position was a9333a2 Merge branch 'release-2.3.0' into 'master'
HEAD is now at 6c46a0d Merge branch 'release-2-4-0' into 'master'
# gitlab.com/gitlab-org/gitlab-elasticsearch-indexer
/usr/local/Cellar/go/1.14.2_1/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: directory not found for option '-L/usr/local/Cellar/icu4c/64.2/lib'
ld: library not found for -licui18n
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Fix: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/troubleshooting.md#elasticsearch-indexer-looks-for-the-wrong-version-of-icu4c, then gdk update again

Edited Jul 07, 2020 by Thong Kuah
Assignee Loading
Time tracking Loading