Closed chavalaloco closed 1 year ago
Interesting, I have never seen this before. It seems to be an issue with the open files limit, I found this:
I would attempt to increase the ulimits
: https://docs.docker.com/compose/compose-file/compose-file-v3/#ulimits
Does this help? Otherwise: What kind of Docker host are you using?
I am using a Synology DS916+ with Docker version 20.10.3, build b455053 and docker-compose version 1.28.5, build 324b023a.
I tried to set the ulitmits flag like this, but without any effect:
ulimits:
nofile: 90000
The error is still the same.
So far as I understand the docs, the nofile
argument requires separate values for soft
and hard
. Example:
ulimits:
nofile:
soft: 20000
hard: 40000
Another hint: I just released v0.5.5
of the Dashboard which includes an updated Ruby. Maybe it's worth to try it out:
https://github.com/solectrus/solectrus/pkgs/container/solectrus
I have tested this on a Synology DS220+ with 10GB RAM, Docker 20.10.3
, Docker-Compose 1.28.5
. It works fine without any changes.
If it still does not work on your machine, I currently have no other idea :-(
i tried it, but it doesn´t work either.. Then the formatting of the yaml structure is not correct anymore.
" ERROR: yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "./docker-compose.yml", line 35, column 1 "
I also tried the updatet version, but it´s the same.
Regarding the YAML error message: "To maintain portability, tab characters must not be used in indentation (https://yaml.org/spec/1.2.2/#61-indentation-spaces)
It seems you have tabs (\t
) in your docker-compose.yml
file, which must be changed to spaces.
there was 1 tabstop inside... now it looks like this:
ulimits:
nofile:
soft: 20000
hard: 40000
but the error is still the same. The application instantly crashes:
app_1 | Database is ready!
app_1 | Puma starting in single mode...
app_1 | * Puma version: 5.6.2 (ruby 3.1.0-p0) ("Birdie's Version")
app_1 | * Min threads: 5
app_1 | * Max threads: 5
app_1 | * Environment: production
app_1 | * PID: 10
app_1 | ! Unable to load application: RuntimeError: failed to get urandom
app_1 | bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
app_1 | /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `urandom': failed to get urandom (RuntimeError)
What Version of DSM are you running on your host?
Regarding your logs: You are still not running the latest release of Solectrus v0.5.5
, which uses Ruby 3.1.1
. You are running Ruby 3.1.0
which comes with v0.5.4
of Solectrus. The Docker tag you should use is ghcr.io/solectrus/solectrus:latest
or ghcr.io/solectrus/solectrus:v0.5.5
. I don't know if this will solve the problem, but it's worth a try.
I've tested Solectrus with the given compose file on a Synology DS220+ running DSM 7.0.1-42218 Update 3
without any issues.
I copied the wrong log, sorry... On the newer version, the error behavior is the same:
app_1 | Puma starting in single mode...
app_1 | * Puma version: 5.6.4 (ruby 3.1.1-p18) ("Birdie's Version")
app_1 | * Min threads: 5
app_1 | * Max threads: 5
app_1 | * Environment: production
app_1 | * PID: 11
app_1 | ! Unable to load application: RuntimeError: failed to get urandom
app_1 | bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
app_1 | /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `urandom': failed to get urandom (RuntimeError)
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `singleton class'
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:42:in `<module:SecureRandom>'
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:41:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/activesupport-7.0.2.3/lib/active_support.rb:26:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/railties-7.0.2.3/lib/rails.rb:7:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /app/config/application.rb:3:in `<top (required)>'
app_1 | from /app/config/environment.rb:2:in `require_relative'
app_1 | from /app/config/environment.rb:2:in `<top (required)>'
app_1 | from config.ru:3:in `require_relative'
app_1 | from config.ru:3:in `block in <main>'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/configuration.rb:348:in `load_rackup'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/configuration.rb:270:in `app'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/runner.rb:150:in `load_and_bind'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/single.rb:44:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/launcher.rb:182:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/cli.rb:81:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/bin/puma:10:in `<top (required)>'
app_1 | from /usr/local/bundle/bin/puma:25:in `load'
app_1 | from /usr/local/bundle/bin/puma:25:in `<top (required)>'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `load'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:23:in `run'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:483:in `exec'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:31:in `dispatch'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:25:in `start'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/exe/bundle:48:in `block in <top (required)>'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/exe/bundle:36:in `<top (required)>'
app_1 | from /usr/local/bundle/bin/bundle:25:in `load'
app_1 | from /usr/local/bundle/bin/bundle:25:in `<main>'
Very strange, as i am running the exact same versions... DSM, docker and docker-compose
Hi Georg! I am getting the same error as @chavalaloco Pulled on a DS216+II (upgraded memory), DSM 7.0.1-42218 Update 3 Ich habe keine Änderungen an der docker-compose.yml oder einer anderen Systemdatei vorgenommen. Warum wird erst ruby 3.1.1 angezeigt und später trotzdem auf den ruby 3.1.0 Pfad zugegriffen. Ist das so korrekt?
app_1 | Puma starting in single mode...
app_1 | * Puma version: 5.6.4 (ruby 3.1.1-p18) ("Birdie's Version")
app_1 | * Min threads: 5
app_1 | * Max threads: 5
app_1 | * Environment: production
app_1 | * PID: 11
app_1 | ! Unable to load application: RuntimeError: failed to get urandom
app_1 | bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
app_1 | /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `urandom': failed to get urandom (RuntimeError)
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `singleton class'
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:42:in `<module:SecureRandom>'
app_1 | from /usr/local/lib/ruby/3.1.0/securerandom.rb:41:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/activesupport-7.0.2.3/lib/active_support.rb:26:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/railties-7.0.2.3/lib/rails.rb:7:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
app_1 | from /app/config/application.rb:3:in `<top (required)>'
app_1 | from /app/config/environment.rb:2:in `require_relative'
app_1 | from /app/config/environment.rb:2:in `<top (required)>'
app_1 | from config.ru:3:in `require_relative'
app_1 | from config.ru:3:in `block in <main>'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
app_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/configuration.rb:348:in `load_rackup'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/configuration.rb:270:in `app'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/runner.rb:150:in `load_and_bind'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/single.rb:44:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/launcher.rb:182:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/lib/puma/cli.rb:81:in `run'
app_1 | from /usr/local/bundle/gems/puma-5.6.4/bin/puma:10:in `<top (required)>'
app_1 | from /usr/local/bundle/bin/puma:25:in `load'
app_1 | from /usr/local/bundle/bin/puma:25:in `<top (required)>'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `load'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:23:in `run'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:483:in `exec'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:31:in `dispatch'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/cli.rb:25:in `start'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/exe/bundle:48:in `block in <top (required)>'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
app_1 | from /usr/local/bundle/gems/bundler-2.3.10/exe/bundle:36:in `<top (required)>'
app_1 | from /usr/local/bundle/bin/bundle:25:in `load'
app_1 | from /usr/local/bundle/bin/bundle:25:in `<main>'
Hm, still can't reproduce this on my machine. And I know from other users without this issue.
After further investigation, the only possible reason I found are missing file descriptors (like mentioned above). Please tell me the output of the ulimit -a
command, from both the host and the docker container. On my DS220+ the output is:
$ ssh [YOUR-SERVER-IP-ADDRESS]
$ ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 38689
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 38689
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
$ docker run -it --rm --entrypoint "sh" ghcr.io/solectrus/solectrus
/app $ ulimit -a
core file size (blocks) (-c) unlimited
data seg size (kb) (-d) unlimited
scheduling priority (-e) 0
file size (blocks) (-f) unlimited
pending signals (-i) 38689
max locked memory (kb) (-l) 64
max memory size (kb) (-m) unlimited
open files (-n) 1048576
POSIX message queues (bytes) (-q) 819200
real-time priority (-r) 0
stack size (kb) (-s) 8192
cpu time (seconds) (-t) unlimited
max user processes (-u) unlimited
virtual memory (kb) (-v) unlimited
file locks (-x) unlimited
BTW: The /usr/local/lib/ruby/3.1.0/
path is fine. Ruby does not change the paths on minor updates. The output of ruby 3.1.1-p18
is relevant.
here are my outputs for ulimit -a : Host:
ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31419
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 31419
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
container:
sudo docker run -it --rm --entrypoint "sh" ghcr.io/solectrus/solectrus
/app $ ulimit -a
core file size (blocks) (-c) unlimited
data seg size (kb) (-d) unlimited
scheduling priority (-e) 0
file size (blocks) (-f) unlimited
pending signals (-i) 31419
max locked memory (kb) (-l) 64
max memory size (kb) (-m) unlimited
open files (-n) 1048576
POSIX message queues (bytes) (-q) 819200
real-time priority (-r) 0
stack size (kb) (-s) 8192
cpu time (seconds) (-t) unlimited
max user processes (-u) unlimited
virtual memory (kb) (-v) unlimited
file locks (-x) unlimited
Host
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31421
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 31421
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Container:
data seg size (kb) (-d) unlimited
scheduling priority (-e) 0
file size (blocks) (-f) unlimited
pending signals (-i) 31421
max locked memory (kb) (-l) 64
max memory size (kb) (-m) unlimited
open files (-n) 1048576
POSIX message queues (bytes) (-q) 819200
real-time priority (-r) 0
stack size (kb) (-s) 8192
cpu time (seconds) (-t) unlimited
max user processes (-u) unlimited
virtual memory (kb) (-v) unlimited
file locks (-x) unlimited
I searched and have found a lot of posts about this error. I have a bad feeling, that my host-kernel is too old?! Host-Kernel-Upgrade i assume is not possible. Maybe you can serve us a workaround?!
Host:
uname -a
Linux pluto 3.10.108 #42661 SMP Mon Apr 25 19:36:56 CST 2022 x86_64 GNU/Linux synology_braswell_216+II
ls -la /dev/urandom
crw-rw-rw- 1 root root 1, 9 Jun 5 03:42 /dev/urandom
Linux pluto 3.10.108 #42661 SMP Mon Apr 25 19:36:56 CST 2022 x86_64 GNU/Linux synology_braswell_216+II
@raulomator This is interesting. The Linux Kernel 3 is quite old and has reached EOL, it could cause the issue, see this comment: https://github.com/docker-library/ruby/issues/383#issuecomment-1134978956 I assume there is nothing I can do :(
@chavalaloco Can you confirm that you tried it on Kernel 3, too?
The UI container always crashing with this error message. It seems like there's something wrong with the ruby version?
has anyone ever get such an error message?