#84 open
Steve Purcell

Relative path for --socket option fails

Reported by Steve Purcell | October 2nd, 2008 @ 11:19 AM | in Future

When there's no "/" in the path given to "--socket", the error message is very confusing.

It should be possible (IMO) to pass a relative path to the --socket option without explicitly including a leading "./".

% thin start --socket socket -e production -c ../../app/
>> Using rails adapter
>> Thin web server (v1.0.0 codename That's What She Said)
>> Maximum connections set to 1024
>> Listening on socket:3000, CTRL+C to stop
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/eventmachine.rb:531:in `start_tcp_server': no acceptor (RuntimeError)
    from /opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/eventmachine.rb:531:in `start_server'
    from /opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/backends/tcp_server.rb:16:in `connect'
    from /opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/backends/base.rb:49:in `start'

Comments and changes to this ticket

  • Michael Klishin (antares)

    Michael Klishin (antares) October 2nd, 2008 @ 04:50 PM

    I believe this exception is from EventMachine.

  • macournoyer

    macournoyer October 2nd, 2008 @ 04:56 PM

    • State changed from “new” to “open”
    • Tag set to usability

    It really is a Thin issue cause it tries to open a TCP connection: ...start_tcp_server... That's because Thin seek for a slash in the hostname to determine if it's a socket. --socket is just an alias for --host.

    socket => tcp host ./socket => unix socket

    I know that's not intuitive, that's I want to fix it.

  • macournoyer

    macournoyer November 4th, 2008 @ 08:15 PM

    a simple workaround is to prepend ./ to the socket name you want to use if no slash is in the filename already, eg.:

    thin start --socket ./sockfile

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป