Resolving CLP and Shell script error
This topic provides instructions for resolving CLP and Shell script error.
Symptoms
The CLP and shell script reports the error Failed to connect to SSH server and the reason
is: fromBase64: invalid base64 data
and runsql.0
displays the following
stack:
runsql (705389) Aug 19, 2022, 5:15:09 AM [no X-Request-ID found] INFO Failed to connect to SSH server and the reason is: fromBase64: invalid base64 data
runsql (705389) Aug 19, 2022, 5:15:09 AM [no X-Request-ID found] ERROR CLPRunner::connectToDifferentHost: JSchException in run() of DB2CLPRunner. -- Exception is: fromBase64: invalid base64 data
com.jcraft.jsch.JSchException: fromBase64: invalid base64 data
at com.jcraft.jsch.Util.fromBase64(Util.java:63)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:219)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:55)
at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317)
at com.ibm.aps.tools.ssh.utils.ssh.SSHUtility.connectSSHSession(SSHUtility.java:317)
at com.ibm.aps.tools.ssh.utils.ssh.SSHUtility.connectToHost(SSHUtility.java:402)
at com.ibm.aps.tools.expertassistant.runner.CLPRunnerHelper$InternalSSHUtility.connectToHost(CLPRunnerHelper.java:155)
at com.ibm.aps.tools.expertassistant.runner.CLPRunner.connectAndExecuteCommands(CLPRunner.java:182)
at com.ibm.aps.tools.expertassistant.runner.CLPRunner.executeCommands(CLPRunner.java:146)
at com.ibm.aps.tools.expertassistant.runner.CLPRunnerHelper$InternalRunner.runCommands(CLPRunnerHelper.java:209)
at com.ibm.aps.tools.expertassistant.runner.CLPRunnerHelper.startSession(CLPRunnerHelper.java:70)
at com.ibm.aps.tools.runsql.engine.clp.CLPEngine.execute(CLPEngine.java:123)
at com.ibm.aps.tools.runsql.execution.ExecutionManager$ExecutionThread.run(ExecutionManager.java:69)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 89
at com.jcraft.jsch.Util.fromBase64(Util.java:51)
... 12 more
Causes
Few entries in the known_host
file are corrupted.
Resolving the problem
- Go to the Db2 Data Management Console server.
- Remove and save a copy of the
known_host
file. Run the following commands to clean and rebuild theknown_host
file.cd ~/.ssh mv known_host known_host.save