Community
Participate
Working Groups
There is a property to use HTTP proxy for SSH2 connection and it does work on some servers. However I am gerring the following error on cvs.asm.forge.objectweb.org server with extssh protocol. java.lang.ArrayIndexOutOfBoundsException at java.net.SocketInputStream.read(SocketInputStream.java:121) at com.jcraft.jsch.IO.getByte(Unknown Source) at com.jcraft.jsch.Session.read(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.createSession(JSchSession.java:488) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.getSession(JSchSession.java:437) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.internalOpen(CVSSSH2ServerConnection.java:122) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.open(CVSSSH2ServerConnection.java:107) at org.eclipse.team.internal.ccvs.core.connection.Connection.open(Connection.java:128) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.createConnection(CVSRepositoryLocation.java:494) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.openConnection(CVSRepositoryLocation.java:735) at org.eclipse.team.internal.ccvs.core.client.Session.open(Session.java:149) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.performUpdate(RemoteFolderMemberFetcher.java:95) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation$InternalRemoteFolderMemberFetcher.performUpdate(FetchMembersOperation.java:69) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:62) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:53) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation.execute(FetchMembersOperation.java:107) at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.run(CVSOperation.java:79) at org.eclipse.team.internal.ccvs.ui.model.CVSTagElement.fetchDeferredChildren(CVSTagElement.java:134) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) Also, it seems that neither HTTP or SOCKS proxy does work at all if pserver protocol is being used, which I believe quite huge limitation for those who have to work from behind corporate firewalls. Using HTTP proxy for this could be tricky, but SOCKS should not be an issue. Note that Subversion/Subclipse work fine trough http proxy.
It appears that the exception is comming from Java (SokcetInputStream#read) although it is possible that the exception s due to the parameters being passed to the method. The method is being called by the Jsch client. Coping Yamanak in case he can comment on this. As for the issue of pserver proxy supprt, see bug 102654.
Hi, (In reply to comment #0) > There is a property to use HTTP proxy for SSH2 connection and it does work on > some servers. However I am gerring the following error on > cvs.asm.forge.objectweb.org server with extssh protocol. ... That HTTP proxy functionality expects that your proxy-sever accepts CONNECT your_sshd:22 HTTP/1.0 , but usual http proxies only allow connecting to TCP port 443 by the default. > Also, it seems that neither HTTP or SOCKS proxy does work at all if pserver > protocol is being used, That functionality is only for extssh, but you can try pserver-over-ssh2 included in EclipseSDK. If you are interested in it, please refer to https://bugs.eclipse.org/bugs/show_bug.cgi?id=60552
(In reply to comment #2) > That HTTP proxy functionality expects that your proxy-sever accepts > CONNECT your_sshd:22 HTTP/1.0 > , but usual http proxies only allow connecting to TCP port 443 by the default. Is it possible to implement something to check if proxy support this feature or not? It is quite confusing to the end user to get ArrayOutOfBounds or ConnectionTimeout errors when proxy does not work. > > Also, it seems that neither HTTP or SOCKS proxy does work at all if pserver > > protocol is being used, > > That functionality is only for extssh, but you can try pserver-over-ssh2 > included in EclipseSDK. If you are interested in it, please refer to > https://bugs.eclipse.org/bugs/show_bug.cgi?id=60552 Right. I just wondered, that if proxy actually support pass-trough mode, then it should be possible to use it even for plain pserver protocol. I recall there was some http-proxy based tunnel implementations (even in Java)
(In reply to comment #0) > There is a property to use HTTP proxy for SSH2 connection and it does work on > some servers. However I am gerring the following error on > cvs.asm.forge.objectweb.org server with extssh protocol. > java.lang.ArrayIndexOutOfBoundsException > at java.net.SocketInputStream.read(SocketInputStream.java:121) > at com.jcraft.jsch.IO.getByte(Unknown Source) Are those messages really related to connetions via HTTP proxy? It seems you can get cvs accesses to other cvs host via HTTP proxy. Can you try direct access to cvs.asm.forge.objectweb.org by Eclipse 3.2 M6? >Also, it seems that neither HTTP or SOCKS proxy does work at all if pserver >protocol is being used, which I believe quite huge limitation for those who >have to work from behind corporate firewalls. Since Eclipse 3.2M6, you can get pserver accesses via HTTP and SOCKS5 proxy.
(In reply to comment #4) > (In reply to comment #0) > > There is a property to use HTTP proxy for SSH2 connection and it does work on > > some servers. However I am gerring the following error on > > cvs.asm.forge.objectweb.org server with extssh protocol. > > java.lang.ArrayIndexOutOfBoundsException > > at java.net.SocketInputStream.read(SocketInputStream.java:121) > > at com.jcraft.jsch.IO.getByte(Unknown Source) > > Are those messages really related to connetions via HTTP proxy? > It seems you can get cvs accesses to other cvs host via HTTP proxy. > Can you try direct access to cvs.asm.forge.objectweb.org by Eclipse 3.2 M6? Note it is extssh. Direct access is working just fine, as well as access trough SOCKS proxy. But I am getting AIOOB exception when going trough HTTP proxy. Same proxy server (Squid) is working ok for other servers, e.g. eclipse.org > >Also, it seems that neither HTTP or SOCKS proxy does work at all if pserver > >protocol is being used, which I believe quite huge limitation for those who >have to work from behind corporate firewalls. > > Since Eclipse 3.2M6, you can get pserver accesses via HTTP and SOCKS5 proxy. Surely I can. I implemented it. :-) Here is the error when running on Eclipse 3.2M6 java.lang.ArrayIndexOutOfBoundsException at java.net.SocketInputStream.read(SocketInputStream.java:121) at com.jcraft.jsch.IO.getByte(Unknown Source) at com.jcraft.jsch.Session.read(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.createSession(JSchSession.java:459) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.getSession(JSchSession.java:424) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.internalOpen(CVSSSH2ServerConnection.java:122) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.open(CVSSSH2ServerConnection.java:107) at org.eclipse.team.internal.ccvs.core.connection.Connection.open(Connection.java:128) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.createConnection(CVSRepositoryLocation.java:532) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.openConnection(CVSRepositoryLocation.java:773) at org.eclipse.team.internal.ccvs.core.client.Session.open(Session.java:152) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.performUpdate(RemoteFolderMemberFetcher.java:95) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation$InternalRemoteFolderMemberFetcher.performUpdate(FetchMembersOperation.java:69) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:62) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:53) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation.execute(FetchMembersOperation.java:107) at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.run(CVSOperation.java:79) at org.eclipse.team.internal.ccvs.ui.model.CVSTagElement.fetchDeferredChildren(CVSTagElement.java:134) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
(In reply to comment #5) > Note it is extssh. Direct access is working just fine, as well as access trough > SOCKS proxy. But I am getting AIOOB exception when going trough HTTP proxy. > Same proxy server (Squid) is working ok for other servers, e.g. eclipse.org I can not find the reason why there exists only problem for cvs.asm.forge.object.org. I have tried to get a access to that host via Squid with Eclipse 3.2 M6 and I have gotten a dialog for host-key notices and a prompt for password. How about using 194.199.16.18 instead of that FQDN name? > Surely I can. I implemented it. :-) Oops, I had not checked the name of the reporter ;-), but it must be useful info for others.
(In reply to comment #6) > (In reply to comment #5) > > Note it is extssh. Direct access is working just fine, as well as access trough > > SOCKS proxy. But I am getting AIOOB exception when going trough HTTP proxy. > > Same proxy server (Squid) is working ok for other servers, e.g. eclipse.org > > I can not find the reason why there exists only problem for > cvs.asm.forge.object.org. I have tried to get a access to that host via Squid > with Eclipse 3.2 M6 and I have gotten a dialog for host-key notices and a > prompt for password. I don't have many accounts around for extssh CVS servers, but those I have all failing with the same error once I enable http proxy. Even for repository sitting on the same host as Squid http proxy, so it should defintely be able to resolve name. > How about using 194.199.16.18 instead of that FQDN name? Strange, but that works.
Created attachment 38124 [details] modified jsch to fixe AIOOB exception >> How about using 194.199.16.18 instead of that FQDN name? >Strange, but that works. I had guessed that there must be a DNS name resolving problem on that proxy. Anyway, such an AIOOB exception should not be thrown. May I ask you to try attached jsch jar? In that case, it will throw an IOException. PS. May I ask somebody to change the status of this issue to be FIXED?
(In reply to comment #8) > >> How about using 194.199.16.18 instead of that FQDN name? > >Strange, but that works. > I had guessed that there must be a DNS name resolving problem on that proxy. That would be really strange. As I said, one of CVS servers I tried is sitting right on the same host as proxy. Also, I can open ASM web site trough that proxy, so DNS resolution should be working.
Eugene, does the provided Jsch version fix the problem? Ymnk, should I put the attached version in the SSH2 plugin (or would you prefer to upload the latest to the SSH2 plugin yourself)? I need to tell the PMC what version of Jsch we are shipping on. Currently, 0.1.26 is the version that is in 3.2 but this issue seems serious enough to move to the next version. Please let me know as soon as you can since it is late in the cycle and we want to jhave as much shake-out time as we can.
(In reply to comment #10) > Eugene, does the provided Jsch version fix the problem? Ymnk, should I put the > attached version in the SSH2 plugin (or would you prefer to upload the latest > to the SSH2 plugin yourself)? I need to tell the PMC what version of Jsch we > are shipping on. Currently, 0.1.26 is the version that is in 3.2 but this issue > seems serious enough to move to the next version. Please let me know as soon as > you can since it is late in the cycle and we want to jhave as much shake-out > time as we can. I could not say it does, because name resolution is not working for selected hosts. E.g. it does work for CVS on eclipse.org, but does NOT work for CVS host that reside on the same server as proxy itself, neither work for CVS server at objectweb.org Strange thing is that it does work if I use IP address instead of host name in connection url, but I've checked and all those names and they are resolvable trough that proxy, and I can connect to those hosts trough this http proxy. Though I am getting different exception now and it is not AIOOB. So, you should probably pickup new jar. org.eclipse.team.internal.ccvs.core.connection.CVSCommunicationException: Could not connect to :extssh:eu@god.md.pp.ru:443/usr/local/cvs: CVS communication error: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: invalid data at org.eclipse.team.internal.ccvs.core.connection.Connection.open(Connection.java:130) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.createConnection(CVSRepositoryLocation.java:532) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.openConnection(CVSRepositoryLocation.java:773) at org.eclipse.team.internal.ccvs.core.client.Session.open(Session.java:152) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.performUpdate(RemoteFolderMemberFetcher.java:95) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation$InternalRemoteFolderMemberFetcher.performUpdate(FetchMembersOperation.java:69) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:62) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:53) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation.execute(FetchMembersOperation.java:107) at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.run(CVSOperation.java:79) at org.eclipse.team.internal.ccvs.ui.model.CVSTagElement.fetchDeferredChildren(CVSTagElement.java:134) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) org.eclipse.team.internal.ccvs.core.connection.CVSCommunicationException[-6]: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: invalid data at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.internalOpen(CVSSSH2ServerConnection.java:193) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.open(CVSSSH2ServerConnection.java:107) at org.eclipse.team.internal.ccvs.core.connection.Connection.open(Connection.java:128) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.createConnection(CVSRepositoryLocation.java:532) at org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.openConnection(CVSRepositoryLocation.java:773) at org.eclipse.team.internal.ccvs.core.client.Session.open(Session.java:152) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.performUpdate(RemoteFolderMemberFetcher.java:95) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation$InternalRemoteFolderMemberFetcher.performUpdate(FetchMembersOperation.java:69) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:62) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher.fetchMembers(RemoteFolderMemberFetcher.java:53) at org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation.execute(FetchMembersOperation.java:107) at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.run(CVSOperation.java:79) at org.eclipse.team.internal.ccvs.ui.model.CVSTagElement.fetchDeferredChildren(CVSTagElement.java:134) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by: com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: invalid data at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.createSession(JSchSession.java:459) at org.eclipse.team.internal.ccvs.ssh2.JSchSession.getSession(JSchSession.java:424) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection.internalOpen(CVSSSH2ServerConnection.java:122) ... 14 more
(In reply to comment #11) > Strange thing is that it does work if I use IP address instead of host name in > connection url, but I've checked and all those names and they are resolvable > trough that proxy, and I can connect to those hosts trough this http proxy. I guess that the host, which runs http proxy, has resolved cvs.asm.forge.objectweb.org to yet another ip-address(say, X). For example, its '/etc/hosts' may have an entry for cvs.asm.forge.objectweb.org. It seems some program is wating for a ssh2 connection at X port 22, but its responses have been broken in ssh2 protocol pont of view, IMHO. So, fixed jar will throw 'new IOExecption("invalid data")' instead of AIOOB. I'll not be able to continue further pursing this issue without getting direct accesses to that address X, but this issue is only from that host and not general issue, so it may not be worth doing, frankly to say.
Created attachment 38766 [details] com.jcraft.jsch_0.1.27.jar (In reply to comment #10) > Ymnk, should I put the > attached version in the SSH2 plugin (or would you prefer to upload the latest > to the SSH2 plugin yourself)? I need to tell the PMC what version of Jsch we > are shipping on. Currently, 0.1.26 is the version that is in 3.2 but this issue > seems serious enough to move to the next version. A few days ago, I found a bug, which may relate to Bug 106076. I'll propose to use attached com.jcraft.jsch_0.1.27.jar, which has fixed it. # I'll formally release it as version 0.1.27 this night. Please try it for a while and if you dont't have problems, integrate it into 3.2RC2(or 3?).
(In reply to comment #12) > I guess that the host, which runs http proxy, has resolved > cvs.asm.forge.objectweb.org to yet another ip-address(say, X). > For example, its '/etc/hosts' may have an entry for > cvs.asm.forge.objectweb.org. I checked that. Host is resolved just fine in both places. > It seems some program is wating for a ssh2 connection at X port 22, but its > responses have been broken in ssh2 protocol pont of view, IMHO. > So, fixed jar will throw 'new IOExecption("invalid data")' instead of AIOOB. Interesting you mentioned port. My other CVS server is using ssh on port 443 and I just found another issue there, that localhost connection to that port is prohibited. That explains error with this host, but not with objectweb.org Note that if I change extssh to pserver, I can connect to objectweb.org CVS using named address. > I'll not be able to continue further pursing this issue without getting > direct accesses to that address X, but this issue is only from that host and > not general issue, so it may not be worth doing, frankly to say. I can't provide you direct access to that host, but I can run any tests out there for you.
(In reply to comment #14) > Interesting you mentioned port. My other CVS server is using ssh on port 443 > and I just found another issue there, that localhost connection to that port is > prohibited. That explains error with this host, but not with objectweb.org May I ask you to try attached new jar? I hope it will pop-up a message window like 'access prohibited' instead of 'invalid data'.
(In reply to comment #15) > (In reply to comment #14) > > Interesting you mentioned port. My other CVS server is using ssh on port 443 > > and I just found another issue there, that localhost connection to that port is > > prohibited. That explains error with this host, but not with objectweb.org > > May I ask you to try attached new jar? I hope it will pop-up a message window > like 'access prohibited' instead of 'invalid data'. With new jar error with my private host is: Could not connect to :extssh:eu@xxxxx:443/usr/local/cvs: CVS communication error: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: ProxyHTTP: java.io.IOException: proxy error: Service Unavailable That makes total sense because of some port forwarding configuration. For objectweb.org error is: Could not connect to :extssh:ekuleshov@cvs.asm.forge.objectweb.org:/cvsroot/asm: CVS communication error: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: ProxyHTTP: java.io.IOException: proxy error: Forbidden which is also makes sense now. I've checked and connection to port 22 has been prohibited on HTTP proxy. So, we can close issue now, but I suggest someone else test it because I've experienced some connection issues and not sure if they are related to new jar or not.
(In reply to comment #16) > but I suggest someone else test it because I've > experienced some connection issues and not sure if they are related to new > jar or not. What kind of connection issues? Is it reproducible? How about on the previous jar?
Created attachment 38937 [details] This jar file is generated from formal jsch 0.1.27 release.
Created attachment 38940 [details] This jar file is generated from formal jsch 0.1.27 release. The last one does not include 'plugin.properties' file.
I have modified the required RelEng map file to point to the file that Ymnk uploaded to the SSH2 plugin. I have been running on the JAR for a day and haven't noticed any problems aso I'm marking the bug as fixed.
(In reply to comment #20) > I have modified the required RelEng map file to point to the file that Ymnk > uploaded to the SSH2 plugin. I have been running on the JAR for a day and > haven't noticed any problems aso I'm marking the bug as fixed. Michael, the troubles I've experience were related to connection trough http proxy. Direct connection is working ok. Haven't had chance to try again or with the old jars.