The Message Store has reached EOF

  • Adam Balgach

    Adam Balgach - 2012-07-17

    Hello all - i have been using j2ssh (0.2.9) for a while with no problems downloading some files via SFTP from a host.  I'm trying to use it in a different application to download a single file from another host, and am getting the following errors:

    <17 Jul 2012 13:40:35> [  Thread-4] DEBUG - Increasing window space by 131070
    <17 Jul 2012 13:40:35> [  Thread-4] INFO  - Sending SSH_MSG_CHANNEL_OPEN
    <17 Jul 2012 13:40:35> [port protocol 1] ERROR - The Transport Protocol thread failed
    java.lang.OutOfMemoryError: Java heap space
        at Source)
        at com.sshtools.j2ssh.connection.SshMsgChannelOpenFailure.constructMessage(Unknown Source)
        at com.sshtools.j2ssh.transport.SshMessage.fromByteArray(Unknown Source)
        at com.sshtools.j2ssh.transport.SshMessageStore.createMessage(Unknown Source)
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
        at Source)
    <17 Jul 2012 13:40:35> [port protocol 1] DEBUG - The Transport Protocol has been stopped
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - The message store has reached EOF
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.connection.ConnectionProtocol.openChannel(Unknown Source)
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.SshClient.openChannel(Unknown Source)
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.SshClient.openSftpChannel(Unknown Source)
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.SftpClient.<init>(Unknown Source)
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.SshClient.openSftpClient(Unknown Source)
    <17 Jul 2012 13:40:35> [  Thread-4] ERROR - com.sshtools.j2ssh.SshClient.openSftpClient(Unknown Source)

    and I have no idea why.  This exact code works on other hosts….  essentially here is what i am doing:

    public void connect() throws IOException, Exception {
            ssh = new SshClient();
            ssh.connect(host, new ConsoleKnownHostsKeyVerification());
             PasswordAuthenticationClient pwd = new PasswordAuthenticationClient();
             int result = ssh.authenticate(pwd);
                 throw new Exception("The authentication failed");
                 throw new Exception("The authentication succeeded but another"
                                   + "authentication is required");
              if(result==AuthenticationProtocolState.COMPLETE) {
                  connected= true;
                  sftp = ssh.openSftpClient();

    Does anyone have any idea why this might be throwing this weird error?  Thanks -

  • Sascha Hunold

    Sascha Hunold - 2012-07-18

    You could first try to set the -Xmx option when starting java.

  • Adam Balgach

    Adam Balgach - 2012-07-20

    i am using the following 2 jvm arguments and still getting the same error:

    -Xms512M -Xmx1536M

    So that does not appear to help.  Thanks.

  • Sascha Hunold

    Sascha Hunold - 2012-07-20

    It might be possible that there is a memory leak in the j2ssh code.
    But first, it would be interesting to know which JVM version you are using and which OS you are running.
    Thank you

  • Adam Balgach

    Adam Balgach - 2012-07-23

    I am using java version 1.6.0_26-b03  and am getting the error in  windows XP.   Thanks - have been using j2ssh for a while and this is a  weird error I've never seen (with a totally new host)

  • Erin Oxborrow

    Erin Oxborrow - 2012-11-17

    Hi, did you ever solve this issue?  I am facing a similar issue.  Thank you.

  • Sascha Hunold

    Sascha Hunold - 2012-11-18

    nope, but we'd appreciate if you could help resolving it.

  • Erin Oxborrow

    Erin Oxborrow - 2012-11-27

    Do you know the software that the host you are trying to connect to is using?  The host we are having this error with is using Robo-FTP software.  Perhaps there is an incompatibility with this software. 

  • Erin Oxborrow

    Erin Oxborrow - 2012-12-06

    Hi hunoldinho,
    We are working around this issue by switching to JSch for SFTP instead.  The same host and connection works in JSch and not in j2ssh.


Log in to post a comment.