Protocol Error Packet Too Long
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Java SSH Tools: SftpClient error: The remote computer disconnected: Protocol error: packet too long: 65580 up vote 1 down vote favorite I am receiving "INFO: The remote computer disconnected: Protocol error: packet too long: 65580" error, when I trying to execute: sUpload("server.host.com", "username", "/home/localuser/.ssh/id_rsa", "filename", ""); The file does not get transferred to SFTP server (only zero-byte gets created on the other side). When SFTPing manually via Unix shell, everything is working fine. I read online that it may be a problem with BLOCK_SIZE in SftpClient, but first I could not find a setter method to alter the size and second, it appears that default value is 65535 anyway, which totally does not explain the 65580 value from the error message. Any ideas? I have the following utility method that uses Java Ssh Tools (j2ssh-core-0.2.9.jar): private static void sUpload(String ftpServer, String user, String password, String localFile, String remoteFile) throws IOException { String methodName = "sUpload: "; System.out.println(" START ftpServer="+ftpServer+" user="+user+" password="+password); int result = 0; System.out.println("ftpServer " + ftpServer); System.out.println("user " + user); System.out.println("password " + password); System.out.println("localFile " + localFile); System.out.println("remoteFile " + remoteFile); SshClient ssh = new SshClient(); ssh.connect(ftpServer); System.out.println("Server Connected ");
the sftp client is usually something akin to Server responded "Protocol error: packet too long: 39344." though the number at the end of that message will vary. This particular discussion involves the Secure FTP Server at Globalscape, and points to recent versions of the Globalscape server and sftp clients from the TCP/IP Services V5.4 ECO7J and V5.6 ECO2M versions. There can be other triggers and other sftp client and server combinations for the sftp Protocol error: packet too long error. qv: HPSC Error in sftp transfer, formerly ITRC threadId=1339481. To reply to this, are you a returning or new visitor Comments One possible solution Submitted by Neilrieck on August 23, 2015 - 17:27. I can reproduce the http://stackoverflow.com/questions/1627516/java-ssh-tools-sftpclient-error-the-remote-computer-disconnected-protocol-err error message "Disconnected; protocol error (Protocol error: packet too long:" 100% of the time using SFTP on three different TCP/IP stacks. In my case, it was due to SSH not being properly installed on the server side. If you enable SSH and SSH2 protocols on the server but forget to create the config files (SSHD_CONFIG. and SSHD2_CONFIG.) from their templates, then the initial SSH part of the connection will appear to work but SFTP will not be started. In fact, this is http://labs.hoffmanlabs.com/node/1313 were the error is coming from (the packet is too long because it had no where to go once SSH was finished with it :-). As a side note, copying over one of the files but not the other may provide weird conditions like SFTP2 might work but not SFTP (or the other way around, or both) Now here's the big question of the day: is this a bug or a security feature? :-) p.s. on some client machines SFTP is mapped to SFTP2 software where you need to use a command line switch to request an SSH connection. Another added wrinkle. To reply to this, are you a returning or new visitor Bug Submitted by Hoff on August 23, 2015 - 18:16. It's a bug, any way this plays out. Either this is a bug because the daemon shouldn't allow this failed state to arise, or this is a bug because the daemon should handle this case better by providing a cogent error message directly to the client and/or into the daemon log files. The whole daemon configuration process on OpenVMS is a mess, but that's fodder for another discussion — and VSI is reportedly replacing the whole IP stack, too. To reply to this, are you a returning or new visitor Home Hoff's Blog HL Custom Services About HL Contact Menu HoffmanLabs Info Support Portal Staff Portal Legal, Privacy Links Photo Gallery VMS Hobbyist Info Mac OS X Networking
Sign in Pricing Blog Support Search GitHub This repository Watch 37 Star 357 Fork 88 driskell/log-courier Code Issues https://github.com/driskell/log-courier/issues/40 12 Pull requests 0 Projects 0 Pulse Graphs New issue Protocol error - packet too large #40 Closed sysmonk opened this Issue Sep 4, 2014 · 4 http://enterprisedt.com/forums/viewtopic.php?t=3557 comments Projects None yet Labels bug Milestone 0.14 Assignees driskell 2 participants sysmonk commented Sep 4, 2014 Hi, Recently i started seeing protocol error packet too large errors in logstash: {:timestamp=>"2014-09-04T13:57:56.467000+0000", :message=>"[LogCourierServer] Protocol error on connection from 1.2.3.4:17009: Packet too large (1435480)", :level=>:warn} Log-courier side: Sep 4 14:04:45 es13 log-courier[25423]: Connected to 2.3.4.5 Sep 4 14:04:45 es13 log-courier[25423]: Transport error, will try again: write tcp 2.3.4.5:9001: connection reset by peer Sep 4 14:04:55 es13 log-courier[25423]: Attempting to connect protocol error packet to 2.3.4.5:9001 (logstash2.sat.wordpress.com) The client tries to send 'too large' packet, gets a protocol error, tries to reconnect and gets the same error again. Infinite loop. Unfortunately, switching to smaller sizes would let through some smaller packets until it hit the huge log message which is too big. Not sure what's the best solution here. 1) try smaller spools until packet gets through 2) split the message if it's too big? 3) log-courier knows what's the biggest packet it can send - don't send it if it's too big and do 1) and/or 2) when it hits this? Owner driskell commented Sep 4, 2014 It's something I will be working on next. It was originally found in #28 There is a hard-coded limit in the logstash plugin that does this as a sanity check that needs adjusting, and some limits need placing in the courier side too at both multiline collection, line length and spool size. I'm just working ou
1 Forum Menu View active topics View unanswered posts Delete all board cookies User ahortonPosts 9Joined Wed Sep 15, 2010 4:00 am Packet Too Long Error...... by ahorton » Thu Nov 18, 2010 1:53 am Any help here would be appreciated! DEBUG [SSH2Channel] 17 Nov 2010 10:17:26.852 : Transmit 93 bytes DEBUG [ChannelDataWindow] 17 Nov 2010 10:17:26.852 : Remote window size decreased to 33993 DEBUG [PlainSocket] 17 Nov 2010 10:17:26.862 : RepeatCallback received 120 bytes DEBUG [SSH2Connection] 17 Nov 2010 10:17:26.862 : ProcessPacket pt=SSH_MSG_IGNORE DEBUG [SFTPChannelReceiver] 17 Nov 2010 10:17:26.862 : SSH_MSG_IGNORE message received DEBUG [SSH2Connection] 17 Nov 2010 10:17:26.862 : ProcessPacket pt=SSH_MSG_DISCONNECT DEBUG [SFTPChannelReceiver] 17 Nov 2010 10:17:26.862 : Connection closed: Protocol error: packet too long: 65556. (code=2) DEBUG [PlainSocket] 17 Nov 2010 10:17:26.862 : RepeatCallback received 0 bytes DEBUG [SFTPChannelReceiver] 17 Nov 2010 10:17:26.862 : Connection closed: (code=0) ERROR [SFTPMessageStore] 17 Nov 2010 10:17:26.862 : Disconnected unexpectedly ( [errorcode=0]) ERROR [SFTPMessageStore] 17 Nov 2010 10:19:26.866 : GetMessage timed out (request id=9) ERROR [SFTPMessageStore] 17 Nov 2010 10:19:26.866 : EnterpriseDT.Net.Ftp.Ssh.SFTPException: GetMessage timed out (request id=9) ERROR [SFTPMessageStore] 17 Nov 2010 10:19:26.866 : at 8sIUmhpBqNcVwtTw38F.rkc6rKpGdJEt02Zh4qR.eIbqAVPmT(Int32 ) ERROR [SSHFTPClient] 17 Nov 2010 10:19:26.906 : Failed to close output stream in put() ERROR [SSHFTPClient] 17 Nov 2010 10:19:26.906 : System.IO.IOException: GetMessage timed out (request id=9) ERROR [SSHFTPClient] 17 Nov 2010 10:19:26.906 : at BZpriB5x1ETagnfF76y.nfBeYG58XGxo88EWAUG.C7FVGX95i() ERROR [SSHFTPClient] 17 Nov 2010 10:19:26.906 : at BZpriB5x1ETag