unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Amir Yalon <amiryal@yxejamir.net>
To: unicorn-public@bogomips.org
Subject: Systemd socket inheritance fails with “not a socket file descriptor”
Date: Tue, 08 Mar 2016 01:08:51 +0200	[thread overview]
Message-ID: <1457392131.48974.542407130.6981D79B@webmail.messagingengine.com> (raw)

I have yet to compile a minimal failing configuration, but posting here
in case it’s a common problem.
Starting the systemd service with a configuration based on
(also found under examples/ in the source code), it fails, and the
following is seen in the systemd journal:
> app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:780:in `for_fd': not a socket file descriptor (ArgumentError)
> from app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:780:in `block in inherit_listeners!'
> from app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:779:in `map!'
> from app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:779:in `inherit_listeners!'
> from app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:111:in `start'
> from app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
> from app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
> from app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
The error, in `for_fd': not a socket file descriptor (ArgumentError),
occurs when attempting `io = Socket.for_fd(fd.to_i)`.
Using Ruby version 2.0.0p645.  Should I try using 2.2 or later?

             reply	other threads:[~2016-03-07 23:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 23:08 Amir Yalon [this message]
2016-03-08  3:31 ` Systemd socket inheritance fails with “not a socket file descriptor” Eric Wong
2016-03-08  7:45   ` Amir Yalon
2016-03-08 17:39     ` Eric Wong
2016-03-08 20:32       ` Amir Yalon
2016-03-09  3:51         ` Eric Wong
2016-03-09 13:19           ` Systemd socket inheritance fails with “not a socket file descriptor” [take2] Christos Trochalakis
2016-03-09 14:06           ` Systemd socket inheritance fails with “not a socket file descriptor” Christos Trochalakis
2016-03-10  9:48             ` Amir Yalon
2016-03-12  5:30               ` Eric Wong
2016-03-12 23:19             ` Amir Yalon
2016-03-17  0:27               ` [PATCH] doc: reference --keep-file-descriptors for "bundle exec" Eric Wong
2016-03-17 13:09                 ` Amir Yalon
2016-03-17 16:37                   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457392131.48974.542407130.6981D79B@webmail.messagingengine.com \
    --to=amiryal@yxejamir.net \
    --cc=unicorn-public@bogomips.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).