socketry / falcon

A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.
https://socketry.github.io/falcon/
MIT License
2.54k stars 79 forks source link

falcon fails to start with "unsupported signal `SIGHUP'" #196

Closed corserv closed 5 months ago

corserv commented 1 year ago

my gemfile is

source "http://rubygems.org" 

gem 'falcon'  

I run

bundle exec falcon serve

I get

  0.0s     info: Falcon::Command::Serve [oid=0x794] [ec=0x7a8] [pid=14760] [2022-11-14 09:20:30 -0500]
               | Falcon v0.42.3 taking flight! Using Async::Container::Forked {:count=>16}.
               | - Binding to: #<Falcon::Endpoint https://localhost:9292/ {}>
               | - To terminate: Ctrl-C or kill 14760
               | - To reload configuration: kill -HUP 14760
 0.03s    error: Falcon::Command [ec=0x7a8] [pid=14760] [2022-11-14 09:20:30 -0500]
               |   ArgumentError: unsupported signal `SIGUSR1'
               |   → C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-io-1.34.0/lib/async/io/trap.rb 49
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-io-1.34.0/lib/async/io/trap.rb 49
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/controller/serve.rb 120
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-container-0.16.12/lib/async/container/controller.rb 230
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-container-0.16.12/lib/async/container/controller.rb 235
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command/serve.rb 157
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command/top.rb 105
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/samovar-2.1.4/lib/samovar/command.rb 36
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command.rb 30
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/bin/falcon 26
               |     C:/Ruby31-x64/bin/falcon 25
               |     C:/Ruby31-x64/bin/falcon 25
               |   Caused by ArgumentError: unsupported signal `SIGHUP'
               |   → C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-container-0.16.12/lib/async/container/controller.rb 204
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/async-container-0.16.12/lib/async/container/controller.rb 204
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command/serve.rb 157
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command/top.rb 105
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/samovar-2.1.4/lib/samovar/command.rb 36
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/lib/falcon/command.rb 30
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/falcon-0.42.3/bin/falcon 26
               |     C:/Ruby31-x64/bin/falcon 25
               |     C:/Ruby31-x64/bin/falcon 25

my gems are


Resolving dependencies...
Using bundler 2.3.7
Using io-event 1.1.2
Using fiber-local 1.0.0
Using protocol-http 0.23.12
Using timers 4.3.5
Using protocol-hpack 1.4.2
Using build-environment 1.13.0
Using traces 0.8.0
Using localhost 1.1.9
Using openssl 3.0.1
Using mapping 1.1.1
Using rack 3.0.0
Using console 1.16.2
Using protocol-http1 0.14.6
Using protocol-http2 0.14.2
Using protocol-rack 0.2.4
Using async 2.2.1
Using samovar 2.1.4
Using async-io 1.34.0
Using async-pool 0.3.12
Using process-metrics 0.2.1
Using async-container 0.16.12
Using async-http 0.59.3
Using async-http-cache 0.4.3
Using falcon 0.42.3
Bundle complete! 1 Gemfile dependency, 25 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

my ruby version is

ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]

my config.ru (from falcon/examples) is

# frozen_string_literal: true

require 'async'

Console.logger.debug!

class RequestLogger
    def initialize(app)
        @app = app
    end

    def call(env)
        @app.call(env)
    end
end

# use RequestLogger

run lambda {|env| [200, {'cache-control' => 'max-age=10, public'}, ["Hello World"]]}
ioquatix commented 1 year ago

Windows support is missing but it's being worked on. Don't expect anything soon, there is a lot of work required and it's low priority. Prefer to use WSL or WSL2.