Bug#894272: Gitlab: Bug#894272: Some problems fixed.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, After latest updates (Including gitlab-workhorse), login page are working now. I've recovered the old database and repositories now. Gitlab detected it and it's working. I have two problems now. First: Gitlab API is not working. Error 401: Running /usr/share/gitlab-shell/bin/check Check GitLab API access: FAILED. code: 401 gitlab-shell self-check failed Try fixing it: Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u gitlab -H editor /usr/share/gitlab-shell/config.yml Please fix the error above and rerun the checks. gitlab-shell error log: I, [2018-04-01T01:42:02.543546 #30418] INFO -- : GET http://localhost:8080/api/v4/internal/check 0.06425 E, [2018-04-01T01:42:02.573128 #30418] ERROR -- : API call http://localhost:8080/api/v4/internal/check> failed: 401 => <{"message":"401 Unauthorized"}>. gitlab production.log: Started GET "/api/v4/internal/check" for 127.0.0.1 at 2018-04-01 01:42:02 +0200 Second: Gitlab interfaces got an error viewing repository: On Overview -> Details page: message: "Error loading viewer". production.log: Started GET "/repository" for x.x.x.x at 2018-04-01 01:31:03 +0200 Completed 200 OK in 225ms (Views: 184.2ms | ActiveRecord: 17.2ms) Started GET "/repository/blob/master/README.md?format=json&viewer=rich" for x.x.x.x at 2018-04-01 01:31:05 +0200 Started GET "/repository/refs/master/logs_tree/?format=js" for x.x.x.x at 2018-04-01 01:31:05 +0200 Processing by Projects::BlobController#show as JSON Processing by Projects::RefsController#logs_tree as JS Completed 500 Internal Server Error in 69ms (ActiveRecord: 2.0ms) ActionView::Template::Error (undefined method `html_escape' for # Did you mean? html_safe?): 1: - blob = viewer.blob 2: - rendered_markup = blob.rendered_markup if blob.respond_to?(:rendered_markup) 3: .file-content.wiki 4: = markup(blob.name, blob.data, rendered: rendered_markup) lib/banzai/renderer/redcarpet/html.rb:9:in `block_code' lib/banzai/filter/markdown_engines/redcarpet.rb:27:in `render' lib/banzai/filter/markdown_engines/redcarpet.rb:27:in `render' lib/banzai/filter/markdown_filter.rb:12:in `call' lib/banzai/pipeline/base_pipeline.rb:21:in `block (2 levels) in singleton class' lib/banzai/renderer.rb:108:in `render_result' lib/banzai/renderer.rb:139:in `block in cacheless_render' lib/gitlab/metrics/influx_db.rb:98:in `measure' lib/banzai/renderer.rb:138:in `cacheless_render' lib/banzai/renderer.rb:28:in `render' lib/banzai.rb:3:in `render' app/helpers/markup_helper.rb:244:in `markdown_unsafe' app/helpers/markup_helper.rb:143:in `markup_unsafe' app/helpers/markup_helper.rb:110:in `markup' app/views/projects/blob/viewers/_markup.html.haml:4:in `_app_views_projects_blob_viewers__markup_html_haml__60150874817435_3348073215480' app/views/projects/blob/_viewer.html.haml:20:in `_app_views_projects_blob__viewer_html_haml__3018189872610422686_3348073432260' app/controllers/application_controller.rb:252:in `view_to_html_string' app/controllers/concerns/renders_blob.rb:18:in `blob_json' app/controllers/projects/blob_controller.rb:200:in `show_json' app/controllers/projects/blob_controller.rb:47:in `block (2 levels) in show' app/controllers/projects/blob_controller.rb:39:in `show' lib/gitlab/i18n.rb:50:in `with_locale' lib/gitlab/i18n.rb:56:in `with_user_locale' app/controllers/application_controller.rb:330:in `set_locale' lib/gitlab/middleware/multipart.rb:95:in `call' lib/gitlab/request_profiler/middleware.rb:14:in `call' lib/gitlab/middleware/go.rb:17:in `call' lib/gitlab/etag_caching/middleware.rb:11:in `call' lib/gitlab/middleware/read_only/controller.rb:28:in `call' lib/gitlab/middleware/read_only.rb:16:in `call' lib/gitlab/request_context.rb:18:in `call' lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call' lib/gitlab/middleware/release_env.rb:10:in `call' On gitlab interface, I cannot view readme.md file. Also, on commits list, I see this error: message: An error ocurred while loading commits. Production.log: Completed 500 Internal Server Error in 760ms (ActiveRecord: 45.2ms) ActiveRecord::StatementInvalid (PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xf3 0x70 0x65 0x7a : INSERT INTO "gpg_signatures" ("gpg_key_primary_keyid", "commit_sha", "project_id", "gpg_key_id", "gpg_key_user_name", "gpg_key_user_email", "verification_status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"): config/initializers/active_record_locking.rb:12:in `_create_record' lib/gitlab/gpg/commit.rb:78:in `block in create_cached_signature!' lib/gitlab/gpg/commit.rb:65:in `block in using_keychain' lib/gitlab/gpg.rb:89:in `optimistic_using_tmp_keychain' lib/gitlab/gpg.rb:71:in `block in using_tmp_keychain' lib/gitlab/gpg.rb:70:in `synchronize' lib/gitlab/gpg.rb:70:in `using_tmp_keychain' lib/gitlab/gpg/com
Bug#894272: Gitlab: Bug#894272: Some problems fixed.
On April 1, 2018 5:24:05 AM GMT+05:30, "David López Zajara" wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA256 > > >Hi, > >After latest updates (Including gitlab-workhorse), login page are >working >now. > >I've recovered the old database and repositories now. Gitlab detected >it >and it's working. > >I have two problems now. > >First: >Gitlab API is not working. Error 401: > >Running /usr/share/gitlab-shell/bin/check >Check GitLab API access: FAILED. code: 401 >gitlab-shell self-check failed > Try fixing it: > Make sure GitLab is running; > Check the gitlab-shell configuration file: > sudo -u gitlab -H editor /usr/share/gitlab-shell/config.yml > Please fix the error above and rerun the checks. You will need to start gitaly manually. We are trying to do that automatically, but facing some issues currently. >gitlab-shell error log: >I, [2018-04-01T01:42:02.543546 #30418] INFO -- : GET >http://localhost:8080/api/v4/internal/check 0.06425 >E, [2018-04-01T01:42:02.573128 #30418] ERROR -- : API call http://localhost:8080/api/v4/internal/check> failed: 401 => ><{"message":"401 Unauthorized"}>. > >gitlab production.log: >Started GET "/api/v4/internal/check" for 127.0.0.1 at 2018-04-01 >01:42:02 >+0200 > > >Second: >Gitlab interfaces got an error viewing repository: On Overview -> >Details >page: >message: "Error loading viewer". > >production.log: > >Started GET "/repository" for x.x.x.x at 2018-04-01 01:31:03 +0200 >Completed 200 OK in 225ms (Views: 184.2ms | ActiveRecord: 17.2ms) >Started GET "/repository/blob/master/README.md?format=json&viewer=rich" >for >x.x.x.x at 2018-04-01 01:31:05 +0200 >Started GET "/repository/refs/master/logs_tree/?format=js" for x.x.x.x >at >2018-04-01 01:31:05 +0200 >Processing by Projects::BlobController#show as JSON >Processing by Projects::RefsController#logs_tree as JS >Completed 500 Internal Server Error in 69ms (ActiveRecord: 2.0ms) > >ActionView::Template::Error (undefined method `html_escape' for ># We dropped one patch in this version, I think we need to adapt that patch. >Did you mean? html_safe?): >1: - blob = viewer.blob >2: - rendered_markup = blob.rendered_markup if >blob.respond_to?(:rendered_markup) >3: .file-content.wiki >4: = markup(blob.name, blob.data, rendered: rendered_markup) > lib/banzai/renderer/redcarpet/html.rb:9:in `block_code' > lib/banzai/filter/markdown_engines/redcarpet.rb:27:in `render' > lib/banzai/filter/markdown_engines/redcarpet.rb:27:in `render' > lib/banzai/filter/markdown_filter.rb:12:in `call' >lib/banzai/pipeline/base_pipeline.rb:21:in `block (2 levels) in >singleton >class' > lib/banzai/renderer.rb:108:in `render_result' > lib/banzai/renderer.rb:139:in `block in cacheless_render' > lib/gitlab/metrics/influx_db.rb:98:in `measure' > lib/banzai/renderer.rb:138:in `cacheless_render' > lib/banzai/renderer.rb:28:in `render' > lib/banzai.rb:3:in `render' > app/helpers/markup_helper.rb:244:in `markdown_unsafe' > app/helpers/markup_helper.rb:143:in `markup_unsafe' > app/helpers/markup_helper.rb:110:in `markup' > app/views/projects/blob/viewers/_markup.html.haml:4:in >`_app_views_projects_blob_viewers__markup_html_haml__60150874817435_3348073215480' > app/views/projects/blob/_viewer.html.haml:20:in >`_app_views_projects_blob__viewer_html_haml__3018189872610422686_3348073432260' > app/controllers/application_controller.rb:252:in `view_to_html_string' > app/controllers/concerns/renders_blob.rb:18:in `blob_json' > app/controllers/projects/blob_controller.rb:200:in `show_json' > app/controllers/projects/blob_controller.rb:47:in `block (2 levels) in >show' > app/controllers/projects/blob_controller.rb:39:in `show' > lib/gitlab/i18n.rb:50:in `with_locale' > lib/gitlab/i18n.rb:56:in `with_user_locale' > app/controllers/application_controller.rb:330:in `set_locale' > lib/gitlab/middleware/multipart.rb:95:in `call' > lib/gitlab/request_profiler/middleware.rb:14:in `call' > lib/gitlab/middleware/go.rb:17:in `call' > lib/gitlab/etag_caching/middleware.rb:11:in `call' > lib/gitlab/middleware/read_only/controller.rb:28:in `call' > lib/gitlab/middleware/read_only.rb:16:in `call' > lib/gitlab/request_context.rb:18:in `call' > lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call' > lib/gitlab/middleware/release_env.rb:10:in `call' > > >On gitlab interface, I cannot view readme.md file. >Also, on commits list, I see this error: >message: An error ocurred while loading commits. > >Production.log: >Completed 500 Internal Server Error in 760ms (ActiveRecord: 45.2ms) > >ActiveRecord::StatementInvalid (PG::CharacterNotInRepertoire: ERROR: >invalid byte sequence for encoding "UTF8": 0xf3 0x70 0x65 0x7a >: INSERT INTO "gpg_signatures" ("gpg_key_primary_keyid", "commit_sha", >"project_id", "gpg_key_id", "gpg_key_user_name", "gpg_key_user_email", >"verification_status", "created_at", "updated_at") VALUES ($1, $2, $3, >$4, >$5, $6, $7, $8, $9) RETURNING "id"): > config/initializers/active_record_l