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

update sshd #545

Merged
merged 1 commit into from
Apr 23, 2017
Merged

update sshd #545

merged 1 commit into from
Apr 23, 2017

Conversation

emanresusername
Copy link
Contributor

@emanresusername emanresusername commented Jan 8, 2017

I was having issues trying to connect to the ssh server and i came across issue #508
My error was different but the experience from the client of having the connection immediately closed was the same, and I've had this experience before in a different context (that I don't currently have all the details of)

I'm not sure what the root cause is, but i figured updating the dependencies and getting on a major version of sshd-core at least wouldn't hurt (and was hoping, with some luck, it might just fix the issues i was having)

The stack trace from the initial error that started all this for me was:

[sshd-SshServer[763300f]-nio2-thread-3] WARN org.apache.sshd.server.channel.ChannelSession - Error processing channel request auth-agent-req@openssh.com
org.apache.sshd.common.SshException
	at org.apache.sshd.agent.common.AgentForwardSupport.initialize(AgentForwardSupport.java:51)
	at org.apache.sshd.server.session.ServerConnectionService.initAgentForward(ServerConnectionService.java:60)
	at org.apache.sshd.server.channel.ChannelSession.handleAgentForwarding(ChannelSession.java:559)
	at org.apache.sshd.server.channel.ChannelSession.handleRequest(ChannelSession.java:327)
	at org.apache.sshd.server.channel.ChannelSession$ChannelSessionRequestHandler.process(ChannelSession.java:602)
	at org.apache.sshd.server.channel.ChannelSession$ChannelSessionRequestHandler.process(ChannelSession.java:600)
	at org.apache.sshd.common.channel.AbstractChannel.handleRequest(AbstractChannel.java:100)
	at org.apache.sshd.common.session.AbstractConnectionService.channelRequest(AbstractConnectionService.java:274)
	at org.apache.sshd.common.session.AbstractConnectionService.process(AbstractConnectionService.java:153)
	at org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:431)
	at org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)
	at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)
	at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)
	at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)
	at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
	at sun.nio.ch.Invoker$2.run(Invoker.java:218)
	at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at org.apache.sshd.agent.common.AgentForwardSupport.initialize(AgentForwardSupport.java:45)
	... 24 more

@emanresusername emanresusername changed the title WIP: update sshd update sshd Jan 9, 2017
@emanresusername
Copy link
Contributor Author

getting java.lang.UnsupportedClassVersionError: org/apache/sshd/server/CommandFactory : Unsupported major.minor version 52.0 wouldn't think anything in the code changes here would cause that?

@lihaoyi
Copy link
Member

lihaoyi commented Jan 9, 2017

No idea about this particular case but that normally means you're using some class or library that's only compiled for a later version of Java; maybe you have something compiled for Java 8 that you're trying to run on Java 7?

@emanresusername
Copy link
Contributor Author

I'd guess it has to be one of these updates

        "org.apache.sshd" % "sshd-core" % "1.3.0",
        "org.bouncycastle" % "bcprov-jdk15on" % "1.56",
        //-- test --//
        "com.jcraft" % "jsch" % "0.1.54" % "test",

compilation versions are out of my area of expertise, is there quick check like a www.jvm-version.com/org/apache/sshd/sshd-core/1.3.0 or something ?
i tried on my machine setting my java -version to 1.7 but then i got a different failure

[info] 'compiler-interface' not yet compiled for Scala 2.12.1. Compiling...
[info] 'compiler-interface' not yet compiled for Scala 2.12.1. Compiling...
java.lang.UnsupportedClassVersionError: scala/tools/nsc/Main : Unsupported major.minor version 52.0

@lihaoyi
Copy link
Member

lihaoyi commented Jan 9, 2017

Scala 2.12.x does not work with Java 1.7.x; perhaps try running the build with Scala 2.11.x if you want to test java 1.7 behavior?

You probably inspect the bytecode and determine the JVM version for every class file, and if the class files are in jars you can unzip them then check http://stackoverflow.com/questions/1096148/how-to-check-the-jdk-version-used-to-compile-a-class-file

@emanresusername
Copy link
Contributor Author

ok, looks like sshd-core v1.3.0 required java8, v1.2.0 seems fine
i think this one is a transient failure

[info]         		ammonite.ops.ShelloutException: CommandResult 1

[info]         		Exception in thread "main" upickle.Invalid$Data: Expected Js.Arr (data: {

[info]         		    "message": "API rate limit exceeded for 52.45.185.117. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",

[info]         		    "documentation_url": "https://developer.github.com/v3/#rate-limiting"

[info]         		})

@emanresusername
Copy link
Contributor Author

@lihaoyi is there any way around the rate limit failing the test?

@jhnsmth
Copy link
Contributor

jhnsmth commented Jan 20, 2017

@emanresusername I've been thinking about it. My idea is to replace git.io api with something like this. gonna send a PR later today.

@lihaoyi
Copy link
Member

lihaoyi commented Apr 23, 2017

Looks good

@lihaoyi lihaoyi merged commit d6fdf82 into com-lihaoyi:master Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants