Remote-syslog Service Fails to Start After Upgrading to GitLab 17.5.5
Description
After upgrading GitLab to version 17.5.5, the remote-syslog service fails to start or immediately crashes after starting. The service shows as "down" when running gitlab-ctl status
or briefly shows as "running" before going down again. This issue affects GitLab versions between 17.5.5 and 17.11.x.
Environment
- GitLab versions affected: 17.5.5 through 17.11.x
- GitLab edition: Self-Managed (Premium/Enterprise)
- Service affected: remote-syslog
- Ruby version: 3.2.x
Solution
Apply Manual Workaround (Temporary Fix):
Apply this manual patch:
sed -i -e s/File.exists/File.exist/g /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/remote_syslog-1.6.15/lib/remote_syslog/cli.rb sed -i -e s/File.exists/File.exist/g /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/eventmachine-tail-0.6.5/lib/em/filetail.rb
After applying the patch, restart the service:
gitlab-ctl restart remote-syslog
Verification Steps:
1. Check the remote-syslog service status:
gitlab-ctl status
2. Review the service logs for errors:
cat /var/log/gitlab/remote-syslog/current
Cause
This issue is caused by a deprecated Ruby method File.exists?
in the remote_syslog ruby gem (version 1.6.15). The method was removed in Ruby 3.2+, causing the service to fail with a NoMethodError. The specific error occurs when the gem tries to check file writability using the deprecated method.
The error manifests as:remote-syslog: /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/remote_syslog-1.6.15/lib/remote_syslog/cli.rb:54:in `is_file_writable?': undefined method `exists?' for File:Class (NoMethodError) remote-syslog: (File.directory?(directory) && File.writable?(directory) && !File.exists?(file)) || File.writable?(file) remote-syslog: Did you mean? exist?
Additional Information
The remote-syslog service is used to transmit syslog messages to external log aggregators
If you're not shipping logs externally, this service failure may not impact core GitLab functionality
The workaround may need to be reapplied after any package updates until you upgrade to 17.11+