Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"failed to get urandom" on Synology DSM #2623

Closed
slifty opened this issue Sep 25, 2023 · 0 comments
Closed

"failed to get urandom" on Synology DSM #2623

slifty opened this issue Sep 25, 2023 · 0 comments

Comments

@slifty
Copy link

slifty commented Sep 25, 2023

Describe the bug

I've been following the installation guide on my Synology DSM (this is an important detail, because Synology hardware runs on specific and old kernels which can cause trouble for certain docker images).

When I run postal initialize I get the following error:

$ sudo postal initialize
Pulling web      ... done
Pulling smtp     ... done
Pulling worker   ... done
Pulling cron     ... done
Pulling requeuer ... done
Creating postal_runner_run ... done
Initializing database
rake aborted!
failed to get urandom
/usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/config.rb:89:in `initialize'
/usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader.rb:99:in `initialize'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/autoloaders.rb:12:in `new'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/autoloaders.rb:12:in `main'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies/zeitwerk_integration.rb:85:in `block in setup_autoloaders'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies/zeitwerk_integration.rb:79:in `each'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies/zeitwerk_integration.rb:79:in `setup_autoloaders'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies/zeitwerk_integration.rb:72:in `take_over'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/application/finisher.rb:81:in `block in <module:Finisher>'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/initializable.rb:32:in `run'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/initializable.rb:60:in `run_initializers'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/application.rb:391:in `initialize!'
/opt/postal/app/config/environment.rb:5:in `<top (required)>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
version: "3.9"
services:
  web:
    image: ghcr.io/postalserver/postal:2.1.4
    command: postal web-server
    network_mode: host
    volumes:
      - /volume1/docker/postal/config:/config

  smtp:
    image: ghcr.io/postalserver/postal:2.1.4
    command: postal smtp-server
    network_mode: host
    cap_add:
      - NET_BIND_SERVICE
    volumes:
      - /volume1/docker/postal/config:/config

  worker:
    image: ghcr.io/postalserver/postal:2.1.4
    command: postal worker
    network_mode: host
    volumes:
      - /volume1/docker/postal/config:/config

  cron:
    image: ghcr.io/postalserver/postal:2.1.4
"/opt/postal/install/docker-compose.yml" 47L, 1074B                                                     1,1           Top
/usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/kernel.rb:38:in `require'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in `require'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/application.rb:367:in `require_environment!'
/usr/local/bundle/gems/railties-6.1.7.3/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/usr/local/bundle/gems/sentry-ruby-5.8.0/lib/sentry/rake.rb:24:in `execute'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:492:in `exec'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:28:in `start'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:45:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.4.9/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.4.9/exe/bundle:33:in `<top (required)>'
/opt/postal/app/bin/bundle:3:in `load'
/opt/postal/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:create => db:load_config => environment
(See full trace by running task with --trace)
ERROR: 1

To Reproduce

  1. Follow the installation instructions on a Synology DSM until the point you run...
  2. Run postal initialize
  3. See error

Expected behaviour

I would expect the initialization command to not result in a failed requirement (or, if there are expectations around the OS I would expect those expectations to be documented)

Screenshots

N/A

Environment details

  • OS: Linux 3.10.108
  • Browser N/A
  • Version N/A
  • Type N/A

Additional information/context

Synology is locked into old linux kernels (here is some context).

It looks like in other projects with this problem the solution was to have the base image be -buster instead of -bullseye

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants