Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File upload to Akamai NetStorage causes error "SSH_FX_BAD_MESSAGE" #4015

Closed
cyberduck opened this issue Dec 18, 2009 · 16 comments
Closed

File upload to Akamai NetStorage causes error "SSH_FX_BAD_MESSAGE" #4015

cyberduck opened this issue Dec 18, 2009 · 16 comments
Assignees
Labels
bug fixed sftp SFTP Protocol Implementation
Milestone

Comments

@cyberduck
Copy link
Collaborator

b012d94 created the issue

Version: 3.3 (5552)

Connecting to Akamai NetStorage (Akamai Storage in the cloud) via SSH. Can login and browse files successfully. When I drap and drop a file from the Finder in to cyberduck, the upload process connects and then errors out with the following

Bad message (SSH_FX_BAD_MESSAGE: A badly formatted packet or other SFTP protocol incompatibility was detected.).

No information is available in the trace window

Note that I can upload correctly on same machine to same host using Filezilla

@cyberduck
Copy link
Collaborator Author

paul167 commented

Same issue here, can't upload to akamai over sftp

@cyberduck
Copy link
Collaborator Author

@dkocher commented

I would need a test account at Akamai to debug this issue.

@cyberduck
Copy link
Collaborator Author

b012d94 commented

I can take care of this

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:4 graeme@…]:

I can take care of this

I have written an email to [ccare@akamai.com] about this.

@cyberduck
Copy link
Collaborator Author

9a8d2c8 commented

Replying to [comment:5 dkocher]:

Replying to [comment:4 graeme@…]:

I can take care of this

I have written an email to [ccare@akamai.com] about this.
Anyway I can help out ? I dig cyberduck and this is a feature I could really use.
I tried checking out the code but couldn't figure out anyway to debug the Java stuff which seems to be the interesting part.
I did manage to upload a file with a simple project that uses Ganymed, so it doesn't seem to be broken in there.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:6 paul167@…]:

Anyway I can help out ? I dig cyberduck and this is a feature I could really use.
I tried checking out the code but couldn't figure out anyway to debug the Java stuff which seems to be the interesting part.
I did manage to upload a file with a simple project that uses Ganymed, so it doesn't seem to be broken in there.

That is interesting. How does your setup of Ganymed differ from what you can find in [source:trunk/source/ch/cyberduck/core/sftp/SFTPSession.java SFTPSession]?

@cyberduck
Copy link
Collaborator Author

9a8d2c8 commented

Replying to [comment:7 dkocher]:

That is interesting. How does your setup of Ganymed differ from what you can find in [source:trunk/source/ch/cyberduck/core/sftp/SFTPSession.java SFTPSession]?
Hard to say, my code is only about 10 lines long. All it does is create a connection, do public key auth then create a client and call put() on that client. Is there anyway I can debug the Java code / Instantiate SFTP Session without too much hassle ? There seems to be a buch of dependencies on preferences and so on.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Before trying to debug it might also help to look closer at the log. Using defaults in Terminal.app set the logging level of Cyberduck to debug:

defaults write ch.sudo.cyberduck logging debug

@cyberduck
Copy link
Collaborator Author

@dkocher commented

To debug Cyberduck, build it as usual but copy the file Info.plist.debug to build/Release/Cyberduck.app/Contents/Info.plist. You can then attach the Java remote debugger to port 5005`.

@cyberduck
Copy link
Collaborator Author

9a8d2c8 commented

So enabling logging only got me an "Upload failed" trace, but debugging got me a bit further (?).
The problem seems to happen in SFTPv3Client.java here.
The code expects a type of SSH_FXP_HANDLE but is getting a value of 101, so SSH_FXP_STATUS. I don't know about the protocol so this doesn't help me. Maybe you have an idea / tip ?
In the meanwhile I'll try to see how that execution differs from my lightweight test.

@cyberduck
Copy link
Collaborator Author

9a8d2c8 commented

It seems that my test only uses SCPClient and never SFTPv3Client, the latter seems to be a more complex implementation (and experimental according to the javadoc).

@cyberduck
Copy link
Collaborator Author

9a8d2c8 commented

Found the problem! This is it.
The remote file is created with read/write permissions (0x3), and akamai apparently only allows write. So If I replace that with 0x2 for write-only, I can upload fine.

My guess is you don't need read-write anyway, if you're creating/truncating a file, why would you read it ?
Can we incorporate a fix for the next release ? That'd be great.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:13 paul167@…]:

Found the problem! This is it.
The remote file is created with read/write permissions (0x3), and akamai apparently only allows write. So If I replace that with 0x2 for write-only, I can upload fine.

My guess is you don't need read-write anyway, if you're creating/truncating a file, why would you read it ?
Can we incorporate a fix for the next release ? That'd be great.

I am hesitant to change this as it might break compatiblity with other servers.

@cyberduck
Copy link
Collaborator Author

2f05b9c commented

Any chance we could beta test this? Or find a different way to incorporate this like a bookmark option ?

@cyberduck
Copy link
Collaborator Author

@dkocher commented

In 3b0432f. Please test with the snapshot build available later today at (http://update.cyberduck.ch/nightly/).

@cyberduck
Copy link
Collaborator Author

paul167 commented

Replying to [comment:16 dkocher]:

In 3b0432f. Please test with the snapshot build available later today at (http://update.cyberduck.ch/nightly/).

Yep works.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed sftp SFTP Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants