GitLab KAS: RuntimeError: Execution of the command /opt/gitlab/embedded/bin/gitlab-kas –version failed

Saat proses upgrade versi gitlab 16 ke gitlab versi 17, gitlab mengalami error

Error executing action create on resource version_file[Create version file for Gitlab KAS]

Capture seperti terlampir

gitlab error kas
gitlab error kas
Recipe: gitlab-kas::enable
  * directory[/var/opt/gitlab/gitlab-kas] action create (up to date)
  * directory[/opt/gitlab/etc/gitlab-kas] action create (up to date)
  * directory[/var/log/gitlab/gitlab-kas] action create (up to date)
  * version_file[Create version file for Gitlab KAS] action create
    
    ================================================================================
    Error executing action `create` on resource 'version_file[Create version file for Gitlab KAS]'
    ================================================================================
    
    RuntimeError
    ------------
    Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)
    stdout: 
    stderr: panic: failed to parse "2024-05-15T09:24:36+0000" into RFC3339 compliant time object, because: parsing time "2024-05-15T09:24:36+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.
    
    goroutine 1 [running]:
    gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0()
        /var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3
    
    
    Cookbook Trace: (most recent call first)
    ----------------------------------------
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/version_helper.rb:16:in `version'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/version_file.rb:32:in `block (2 levels) in class_from_file'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/version_file.rb:31:in `block in class_from_file'
    
    Resource Declaration:
    ---------------------
    # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-kas/recipes/enable.rb
    
     67: version_file 'Create version file for Gitlab KAS' do
     68:   version_file_path File.join(working_dir, 'VERSION')
     69:   version_check_cmd '/opt/gitlab/embedded/bin/gitlab-kas --version'
     70:   notifies :restart, 'runit_service[gitlab-kas]' if omnibus_helper.should_notify?('gitlab-kas')
     71: end
     72: 
    
    Compiled Resource:
    ------------------
    # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-kas/recipes/enable.rb:67:in `from_file'
    
    version_file("Create version file for Gitlab KAS") do
      action [:create]
      default_guard_interpreter :default
      declared_type :version_file
      cookbook_name "gitlab-kas"
      recipe_name "enable"
      version_file_path "/var/opt/gitlab/gitlab-kas/VERSION"
      version_check_cmd "/opt/gitlab/embedded/bin/gitlab-kas --version"
    end
    
    System Info:
    ------------
    chef_version=18.3.0
    platform=centos
    platform_version=7.9.2009
    ruby=ruby 3.1.5p253 (2024-04-023 revision 1945f8dc0e) [x86_64-linux]
    program_name=/opt/gitlab/embedded/bin/cinc-client
    executable=/opt/gitlab/embedded/bin/cinc-client
    
[2024-05-18T19:59:47+07:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2024-05-18T19:59:47+07:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

version_file[Create version file for Gitlab KAS] (gitlab-kas::enable line 67) had an error: RuntimeError: Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)
stdout: 
stderr: panic: failed to parse "2024-05-15T09:24:36+0000" into RFC3339 compliant time object, because: parsing time "2024-05-15T09:24:36+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.

goroutine 1 [running]:
gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0()
        /var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3



Running handlers complete
[2024-05-18T19:59:47+07:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 45 seconds
[2024-05-18T19:59:47+07:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2024-05-18T19:59:47+07:00] FATAL: ---------------------------------------------------------------------------------------
[2024-05-18T19:59:47+07:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2024-05-18T19:59:47+07:00] FATAL: ---------------------------------------------------------------------------------------
[2024-05-18T19:59:47+07:00] FATAL: RuntimeError: version_file[Create version file for Gitlab KAS] (gitlab-kas::enable line 67) had an error: RuntimeError: Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)
stdout: 
stderr: panic: failed to parse "2024-05-15T09:24:36+0000" into RFC3339 compliant time object, because: parsing time "2024-05-15T09:24:36+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.

goroutine 1 [running]:
gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0()
        /var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3

untuk mengatasinya disabled the gitlab-kas dengan cara :

edit /etc/gitlab/gitlab.rb dengan perintah

vi edit /etc/gitlab/gitlab.rb

kemudian tambahkan perintah berikut di file gitlab.rb

gitlab_kas['enable'] = false

setelah selesai di tambahkan jalankan perintah

gitlab-ctl reconfigure

Jika ingin melakukan restart gitlab bisa gunakan perintah

sudo gitlab-ctl restart

dan melakukan pengecekan status service gitlab menggunakan

sudo gitlab-ctl status

 

Sekian tutorial kali ini, semoga bermanfaat

 

Referensi

https://forum.gitlab.com/

Pos terkait

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Situs ini menggunakan Akismet untuk mengurangi spam. Pelajari bagaimana data komentar Anda diproses.