แก้ปัญหา เข้า Gitlab runners ไม่ได้เจอ Error 500 lib/gitlab/crypto_helper.rb:28:in aes256_gcm_decrypt'

แชร์ความรู้ Linux Ubuntu Web Server บทความ การ config server Linux FreeBSD Apache
การติดตั้ง XAMPP Mysql PHP ใครต้องการแชร์ความรู้เรื่องต่างๆ เหล่านี้ให้ ท่านหรืออื่น โพสที่หมวดนี้ได้

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 45958
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

แก้ปัญหา เข้า Gitlab runners ไม่ได้เจอ Error 500 lib/gitlab/crypto_helper.rb:28:in aes256_gcm_decrypt'

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

แก้ปัญหา เข้า Gitlab runners ไม่ได้เจอ Error 500
lib/gitlab/crypto_helper.rb:28:in aes256_gcm_decrypt'
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 45958
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: แก้ปัญหา เข้า Gitlab runners ไม่ได้เจอ Error 500

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

เช็ค Error Log จาก คำสั่ง
sudo tail -f /var/log/gitlab/gitlab-rails/production.log
ActionView::Template::Error ():
36:
37: .col-sm-6
38: .bs-callout
39: = render partial: 'ci/runner/how_to_setup_runner',
40: locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
41: type: 'shared',
42: reset_token_url: reset_registration_token_admin_application_settings_path,

lib/gitlab/crypto_helper.rb:28:in aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encryption_helper.rb:22:in decrypt_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:38:in ensure_token!'
app/models/concerns/token_authenticatable.rb:48:in block in add_authentication_token_field'
app/models/application_setting_implementation.rb:363:in runners_registration_token'
lib/gitlab/current_settings.rb:32:in method_missing'
app/views/admin/runners/index.html.haml:39
ปัญหามาจาก
GitLab กำลังพยายามเข้าถึง runners_registration_token ใน ApplicationSetting แต่ถอดรหัสไม่สำเร็จ เนื่องจากกระบวนการ aes256_gcm_decrypt ไม่สำเร็จ
น่าจะเป็นปัญหามาจากการอัพเกรด gitlab server มาหลายๆ ครั้ง

วิธีแก้ปัญาหา

โค้ด: เลือกทั้งหมด

sudo gitlab-rails console
สั่ง reset token

โค้ด: เลือกทั้งหมด

# โหลด ApplicationSetting
settings = ApplicationSetting.current

# รีเซ็ต token
settings.reset_runners_registration_token!
# บันทึก
settings.save!

โค้ด: เลือกทั้งหมด

sudo gitlab-ctl reconfigure

โค้ด: เลือกทั้งหมด

sudo gitlab-ctl restart
ถ้า Server ใหม่รอทำงานซักครู่ ดูจาก top หรือ nmon

ผลกระทบ:
การรีเซ็ต runners_registration_token หมายความว่าหากคุณมีเอกสารเก่า หรือ Runner ที่จะสมัครเข้ามาใหม่ด้วย Token เดิม จะใช้ไม่ได้อีกต่อไป ต้องใช้ Token ใหม่แทน
Runner ที่เคยลงทะเบียนเรียบร้อยแล้ว (มี config.toml ของตัวเอง) มักจะยังทำงานได้ปกติ จนกว่าจะลบหรือต้อง re-register ใหม่
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 4