Skip to content
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

Error on restart using control server on Windows #166

Closed
emassip opened this issue Nov 21, 2012 · 4 comments
Closed

Error on restart using control server on Windows #166

emassip opened this issue Nov 21, 2012 · 4 comments
Labels

Comments

@emassip
Copy link

emassip commented Nov 21, 2012

Windows 2003 Server, puma 1.6.3, MRI 1.9.3p125.

D:\redmine>puma --control tcp://127.0.0.1:3001 --control-token control
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/depen
dencies.rb:251:in `block in require': iconv will be deprecated in the future, us
e String#encode instead.
Puma 1.6.3 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:9292
* Starting status server on tcp://127.0.0.1:3001
*** Sorry signal SIGUSR2 not implemented, restart feature disabled!
Use Ctrl-C to stop

Getting http://127.0.0.1:3001/restart?token=control returns status = 'OK' but:

* Restarting...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/depen
dencies.rb:251:in `block in require': iconv will be deprecated in the future, us
e String#encode instead.
Puma 1.6.3 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Inherited tcp://0.0.0.0:9292
C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:128:in `for_fd
': not a socket file descriptor (ArgumentError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:1
28:in `inherit_tcp_listener'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/cli.rb:320:
in `block in run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/cli.rb:314:
in `each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/cli.rb:314:
in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/bin/puma:10:in `<top
 (required)>'
        from C:/Ruby193/bin/puma:19:in `load'
        from C:/Ruby193/bin/puma:19:in `<main>'
@emassip
Copy link
Author

emassip commented Nov 21, 2012

The exact same error happens using the -S option so this issue may be some duplicate of #165 (but with 1.6.3).

@evanphx
Copy link
Member

evanphx commented Nov 22, 2012

Hm, perhaps TCPSocket.for_fd doesn't work properly on windows...

@evanphx
Copy link
Member

evanphx commented Nov 22, 2012

So, it appears that to make the socket descriptors inherit properly into the child process by win32 you have to use DuplicateHandle which it appears MRI doesn't do. I have an idea for a fix, but I'll have to setup a win32 VM to test on. Could you tell me about the setup you're using?

@emassip
Copy link
Author

emassip commented Nov 24, 2012

Well, as I said, ESXed Windows 2003 server with MRI 1.9.3p125 installed using RubyInstaller but I think that any win32 setup would lead to the error.

About the software setup I don't think this will change anything either but I was running the Redmine trunk @ http://svn.redmine.org/redmine/trunk with additional Gemfile.local file containing a single 'gem "puma"' line in app root dir.

@evanphx evanphx closed this as completed in ba025fb Jul 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants