3

I am trying to connect to a git repository on a remote server so I can edit the source code in Netbeans 7.3, but when I try to connect to the repository with my ssh private key to clone a repository, I get this error: java.lang.ArrayIndexOutOfBoundsException: 779

Log:

INFO [org.netbeans.modules.git]: 
(address removed):
java.lang.ArrayIndexOutOfBoundsException: 779
java.lang.ArrayIndexOutOfBoundsException: 779
    at com.jcraft.jsch.Util.fromBase64(Util.java:50)
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:157)
Caused: com.jcraft.jsch.JSchException
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:171)
    at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:184)
    at org.eclipse.jgit.transport.JschConfigSessionFactory.knownHosts(JschConfigSessionFactory.java:261)
    at org.eclipse.jgit.transport.JschConfigSessionFactory.createDefaultJSch(JschConfigSessionFactory.java:248)
    at org.netbeans.libs.git.jgit.JGitSshSessionFactory.getJSch(JGitSshSessionFactory.java:122)
    at org.netbeans.libs.git.jgit.JGitSshSessionFactory.getSession(JGitSshSessionFactory.java:105)
Caused: org.eclipse.jgit.errors.TransportException: (address removed): java.lang.ArrayIndexOutOfBoundsException: 779
    at org.netbeans.libs.git.jgit.JGitSshSessionFactory.getSession(JGitSshSessionFactory.java:111)
    at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
    at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
    at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
    at org.netbeans.libs.git.jgit.commands.ListRemoteObjectsCommand.runTransportCommand(ListRemoteObjectsCommand.java:74)
Caused: org.netbeans.libs.git.GitException$AuthorizationException: (address removed): java.lang.ArrayIndexOutOfBoundsException: 779
    at org.netbeans.libs.git.jgit.commands.TransportCommand.handleException(TransportCommand.java:198)
    at org.netbeans.libs.git.jgit.commands.ListRemoteObjectsCommand.runTransportCommand(ListRemoteObjectsCommand.java:87)
    at org.netbeans.libs.git.jgit.commands.TransportCommand.run(TransportCommand.java:137)
    at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:73)
    at org.netbeans.libs.git.GitClient.listRemoteBranches(GitClient.java:655)
    at org.netbeans.modules.git.client.GitClient$31.call(GitClient.java:533)
    at org.netbeans.modules.git.client.GitClient$31.call(GitClient.java:529)
    at org.openide.util.NetworkSettings.suppressAuthenticationDialog(NetworkSettings.java:140)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:790)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker$1.call(GitClient.java:815)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethodIntern(GitClient.java:823)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:756)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:734)
    at org.netbeans.modules.git.client.GitClient$CommandInvoker.access$400(GitClient.java:728)
    at org.netbeans.modules.git.client.GitClient.listRemoteBranches(GitClient.java:529)
[catch] at org.netbeans.modules.git.ui.clone.RepositoryStep$RepositoryStepProgressSupport.perform(RepositoryStep.java:197)
    at org.netbeans.modules.git.client.GitProgressSupport.performIntern(GitProgressSupport.java:102)
    at org.netbeans.modules.git.client.GitProgressSupport.run(GitProgressSupport.java:95)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

Any ideas how to fix this?

Techman224
  • 45
  • 1
  • 7
  • Could you copy the callstack? (as in https://netbeans.org/bugzilla/show_bug.cgi?id=216024) – VonC Apr 05 '13 at 08:32
  • @VonC I don't know where to get it. I used the built-in wizard, and brought up the call stack window, but nothing appears. I'm also getting a number after the message, 779 – Techman224 Apr 05 '13 at 13:04
  • Any log file you could look up? Search for a file which just has been modified. – VonC Apr 05 '13 at 13:06
  • @VonC Found it, and I added the section where the exception occurred. – Techman224 Apr 05 '13 at 21:32
  • Great job! Would http://stackoverflow.com/a/2003460/6309 ? Basically add the ssh server to the `known_hosts` file yourself and see if the error persists. – VonC Apr 05 '13 at 21:49

1 Answers1

0

All the threads including that kind of error point to the same solution.
See for instance "ArrayIndexOutOfBoundsException error when installing the IBM Intelligent Operations Center Platform Control Tool".

Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 810
at com.jcraft.jsch.Util.fromBase64(Util.java:48)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:157)

Cause

The ssh keystore on the installation server is out-of-sync with the environment.

Resolving the problem

To correct the problem, do the following:

  1. Log on to the installation server as the root user.
  2. Delete the /root/.ssh/known_hosts file.
  3. Using the ssh command, access the four target servers (application, event, data, and management) as the root user using the fully-qualified hostname of each server. Accept the ssh key when prompted.

Same kind of solution than in "com.jcraft.jsch.JSchException: UnknownHostKey".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250