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

sshkit error while deploying with jruby-9.1.5.0 #4191

Closed
zoras opened this issue Sep 29, 2016 · 8 comments
Closed

sshkit error while deploying with jruby-9.1.5.0 #4191

zoras opened this issue Sep 29, 2016 · 8 comments

Comments

@zoras
Copy link

zoras commented Sep 29, 2016

Capistrano deployment works on jruby-9.1.2.0 but fails with jruby-9.1.5.0

Environment

  • JRuby version (jruby -v)
    jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 [darwin-x86_64]
  • Operating system
    Mac OSX Seirra
  • Installed or activated gems
    Capistrano, sshkit
  • Application/framework version
    Rails

Expected Behavior

  • Capistrano deployment works on jruby-9.1.2.0 but fails with jruby-9.1.5.0

Actual Behavior

  • This is the error log while doing the deployment
❯ cap staging deploy
Exception in thread "Ruby-0-Thread-2: /Users/zoras/.rvm/gems/jruby-9.1.5.0/gems/sshkit-1.11.2/lib/sshkit/runners/parallel.rb:10" java.lang.NullPointerException
    at org.jruby.ext.openssl.PKeyEC$Point.initialize(PKeyEC.java:836)
    at org.jruby.ext.openssl.PKeyEC$Point$INVOKER$i$0$0$initialize_DBG.call(PKeyEC$Point$INVOKER$i$0$0$initialize_DBG.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:724)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:368)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:205)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:209)
    at org.jruby.RubyClass.newInstance(RubyClass.java:1008)
    at org.jruby.RubyClass$INVOKER$i$newInstance_DBG.call(RubyClass$INVOKER$i$newInstance_DBG.gen)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:358)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:195)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:324)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:90)
    at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:189)
...
00:02 git:check
      01 git ls-remote --heads git@bitbucket.org:projectrepo/project.git
(Backtrace restricted to imported tasks)
cap aborted!
Net::SSH::Disconnect: connection closed by remote host

EOFError: End of file reached

Tasks: TOP => git:check
(See full trace by running task with --trace)
The deploy has failed with an error: connection closed by remote host
@headius
Copy link
Member

headius commented Sep 30, 2016

I trimmed down your exception...please use a paste service like https://gist.github.com for long output.

It would be helpful if you could provide a way for us to reproduce this problem. You can also help us by running JRuby with -Xjit.threshold=0 and providing the new backtrace using https://gist.github.com.

@headius
Copy link
Member

headius commented Sep 30, 2016

Note also this is a jruby-openssl issue and probably should be re-opened at https://github.com/jruby/jruby-openssl/issues.

@zoras
Copy link
Author

zoras commented Oct 3, 2016

Thanks for the heads up @headius
However, it throws the same exception with -Xjit.threshold=0 JRuby option.

I can't get the demo app running in order to reproduce this problem for you
jruby/jruby-rails-templates#2

@anteyk
Copy link

anteyk commented Dec 4, 2016

Hi @zoras did you found solution for this issue or workaround? I just faced with exactly same issue:(

@vorberohus
Copy link

Hello, having the same problem with sshkit and jruby-9.1.6.0

@anteyk
Copy link

anteyk commented Dec 4, 2016

Just found the solution, that works for me jruby/jruby-openssl#105 (inserted that lines in start method)

@zoras
Copy link
Author

zoras commented Dec 5, 2016

@anteyk I had been holding on to jruby-9.1.2.0 and I can confirm that works for me as well. Thanks, closing this issue.

@zoras zoras closed this as completed Dec 5, 2016
@kares kares added this to the Invalid or Duplicate milestone Dec 5, 2016
@cmthakur
Copy link

cmthakur commented Mar 1, 2017

@zoras you can try appending this lines to deploy.rb file. It works for me with jruby 9.1.7.0 (2.3.1). I think its a net-ssh error.

Net::SSH::Transport::Algorithms::ALGORITHMS.values.each { |algs| algs.reject! { |a| a =~ /^ecd(sa|h)-sha2/ } }
Net::SSH::KnownHosts::SUPPORTED_TYPE.reject! { |t| t =~ /^ecd(sa|h)-sha2/ }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants