Docker container with gitlab version >=16.7.0 can not be started due ruby error with urandom on Synology

When I want to run any gitlab-ce docker image with versions > 16.7.0 I get an error that container could not be started. Ruby can not use securerandom due file access problems of dev/urandom. similar to

/opt/gitlab/embedded/lib/ruby/3.1.0/securerandom.rb:75:in `urandom': failed to get urandom (RuntimeError)
	from /opt/gitlab/embedded/lib/ruby/3.1.0/securerandom.rb:75:in `singleton class'
	from /opt/gitlab/embedded/lib/ruby/3.1.0/securerandom.rb:42:in `<module:SecureRandom>'
	from /opt/gitlab/embedded/lib/ruby/3.1.0/securerandom.rb:41:in `<top (required)>'
	from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
	from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
	from /opt/gitlab/embedded/cookbooks/package/libraries/settings_dsl.rb:21:in `<top (required)>'
	from /opt/gitlab/embedded/cookbooks/package/libraries/deprecations.rb:3:in `require_relative'
	from /opt/gitlab/embedded/cookbooks/package/libraries/deprecations.rb:3:in `<top (required)>'
	from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /opt/gitlab/embedded/service/omnibus-ctl/check_config.rb:18:in `load_file'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:192:in `eval'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:192:in `load_file'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:187:in `block in load_files'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:186:in `each'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:186:in `load_files'
	from /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:29:in `<top (required)>'
	from /opt/gitlab/embedded/bin/omnibus-ctl:25:in `load'
	from /opt/gitlab/embedded/bin/omnibus-ctl:25:in `<main>'

With 16.6.4 and 16.6.5 the container starts up.
Docker version: (due preinstalled on synology NAS)
System: 3.10.108 #42962 SMP Mon May 29 14:35:41 CST 2023 x86_64 GNU/Linux synology_braswell_916+
container imager: gitlab/gitlab-ce:16.7.0-ce.0 and gitlab/gitlab-ce:16.8.0-ce.0

1 Like

I have the same issue on my Synology NAS (DS916+) all patches/updates installed:
Docker version 20.10.3, build 55f0773
Linux version 3.10.108 #42962 SMP Mon May 29 14:35:41 CST 2023

With [16.6.5-ee.0] I was able to start GitLab without this issue.

Same here and still using DSM 7.1s docker. I guess the world is really pushing into that 7.2 update because with 7.2s container everything runs smoothly

1 Like

Unfortunately an update to 7.2 did not resolved the issue. The kernel remains on 3.10.*
So we must hope, that synology updates the kernel version soon

1 Like

Same issue here.
One 2021 Synology model updated to DSM DSM 7.2.1-69057 Update 4 ( did the update fine
but two older 2016 models that had to be manually updatded to DSM 7.2.1-69057 Update 4 show the same error as above with 16.7.0 and “latest” gitlab-ce Docker images.
16.6.6 is the newest that works.