Description of problem: It is not possible to clone repositories to a different machine, except some very small ones (like a brand new repository). I have 2 machines, A.B.C.X and A.B.C.Y - the app server with business-central runs on A.B.C.X, I'm trying to clone from A.B.C.Y. App server is bound to A.B.C.X host, git and ssh daemons are set to this host as well (using system properties "org.uberfire.nio.git.daemon.host", "org.uberfire.nio.git.ssh.host" set in standalone.xml), I'm using default ports (9418 for git and 8001 for ssh), connecting to these ports is allowed on the X machine as well. In business-central, I have a repository "myrepo" with quite a few assets and some history. I try to clone "myrepo" using 'git clone ssh://testadmin.C.X:8001/myrepo'. Doing this form the A.B.C.X works. Doing this from the A.B.C.Y machine, the cloning fails due to, probably, some kind of exceeded timeout. Depending on the size of the repository, I get either some 'Packfile truncated' error or 'Corrupted MAC on input. Disconnecting: Packet corrupt .. fatal: early EOF' or some variation on that: """ git clone ssh://testadmin.C.X:8001/myrepo Cloning into 'myrepo'... Authenticated with partial success. Password authentication Password: remote: Counting objects: 2928, done remote: Finding sources: 100% (2928/2928) remote: Getting sizes: 100% (1443/1443) Corrupted MAC on input. Disconnecting: Packet corrupt fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed """ Cloning the same repository via the git protocol works fine so far. Version-Release number of selected component (if applicable): BPMS 6.0.1 CR2 Steps to Reproduce: 1. Set up app server with business-central on machine A.B.C.X, with proper host binding, ssh and git daemons host set, (default) ports allowed. Set up user testadmin (role 'admin'). 2. Clone a decent-size repository to business-central under the name "myrepo". 3. On machine A.B.C.Y, execute command 'git clone ssh://testadmin.C.X:8001/myrepo' Actual results: Cloning fails. Expected results: Repository is cloned successfully.
I coudln't reproduce the issue... I've tried the same config here with different repository sizes (from brigh new empty one to 500mb repo like guvnor from github) using all different connection speedies and no luck. In a rreally slow connection (56K) what I got from client was a clear timout message like: Received disconnect from 10.211.55.2 2: User session has timed out after being idled for 10000ms. fatal: The remote end hung up upon initial contact.
My problem was resolved by bumping up the sshd-core module version to 0.10.0. Product uses 0.9.0. Pertinent information (I think) to be found in issue SSHD-255 (https://issues.apache.org/jira/browse/SSHD-255). I'd also recommend using higher version of jgit (3.2.0) - as I understand it, based on issue JENKINS-19043 (https://issues.jenkins-ci.org/browse/JENKINS-19043), there were some performance improvements. With the product versions of jgit and sshd-core, results were better if GitUploadCommand used compression (requires a small code change and an uberfire module rebuild as well). Just for the record, rebuilding uberfire modules (6.0.2 ER1 sync) with either or both of these changes requires only to update two lines of imports (and only in case of jgit version switch). Product (6.0.2 ER1 BPMS) deployed with these updated jars, nothing seemed broken (that wasn't broken already).
Thanks for your hard work on this Zuzana, without it we couldn't improve on this. Here are the changes that you proposed pushed to master and product branches: (master) https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/b9afd5ceea2 (6.0.x) http://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/6b4b31881 (master) http://github.com/uberfire/uberfire/commit/8f96cb036 (0.3.x) http://github.com/uberfire/uberfire/compare/a67cb2f...055f093
Upgrade please the version jGit version to 3.3 instead of 3.2 to make sure that al problems related to this issue being solved. jGit has an issue also related to clone or any other operation over ssh if the repository is bigger than 5 mb - it reports "Short read of block" - this is only solved by 3.3 release: https://bugs.eclipse.org/bugs/show_bug.cgi?id=426514 We have customers reporting this issue, so please update it to 3.3.1 (latest version) instead of 3.2.
JGit updated to 3.3.1 as requested: (master) http://github.com/uberfire/uberfire/commit/85c721b1d (0.3.x) http://github.com/uberfire/uberfire/commit/81ddecf17 (master) http://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/b57f26827 (6.0.x) http://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/bb86c2b5d