From: Eric Wong <e@80x24.org> To: Amir Yalon <amiryal@yxejamir.net> Cc: unicorn-public@bogomips.org Subject: Re: Systemd socket inheritance fails with “not a socket file descriptor” Date: Tue, 8 Mar 2016 17:39:13 +0000 [thread overview] Message-ID: <20160308173710.GA534@dcvr.yhbt.net> (raw) In-Reply-To: <1457423146.164433.542706346.5085E10D@webmail.messagingengine.com> Amir Yalon <amiryal@yxejamir.net> wrote: > Interesting. With the testing patch applied, we’re now failing this > test in thread_pthread.c: > http://bogomips.org/mirrors/ruby.git/tree/thread_pthread.c#n1720 > Which then raises the following exception in io.c: > http://bogomips.org/mirrors/ruby.git/tree/io.c#n7621 > > From the journal: > app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:780:in > `for_fd': The given fd is not accessible because RubyVM reserves it > (ArgumentError) That should not happen. So I wonder if LISTEN_FDS is set to the wrong number, somehow. How many sockets are you activating? LISTEN_FDS should match that number. Can you dump out the inherited, and LISTEN_* env variables with the following? --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -776,6 +776,8 @@ def inherit_listeners! end # to ease debugging, we will not unset LISTEN_PID and LISTEN_FDS + $stderr.write("I=#{inherited.inspect} PID=#{sd_pid} FDS=#{sd_fds}\n") + inherited.map! do |fd| io = Socket.for_fd(fd.to_i) io.autoclose = false Thanks. > > Also, can you verify the UNICORN_FD env is NOT set by systemd? > > (It should not be) > Verified, not set. > > > Also, for reference, which version of systemd is this? > Ubuntu Wily 15.10, systemd 225-1ubuntu9 I'll try to test with a newer version this week(*) if the above can't figure it out. * maybe Thursday/Friday, my connectivity is inconsistent
next prev parent reply other threads:[~2016-03-08 17:39 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-03-07 23:08 Amir Yalon 2016-03-08 3:31 ` Eric Wong 2016-03-08 7:45 ` Amir Yalon 2016-03-08 17:39 ` Eric Wong [this message] 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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style 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=20160308173710.GA534@dcvr.yhbt.net \ --to=e@80x24.org \ --cc=amiryal@yxejamir.net \ --cc=unicorn-public@bogomips.org \ --subject='Re: Systemd socket inheritance fails with “not a socket file descriptor”' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: ../../unicorn.git 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).