An error occurred, but no specific error code exists to describe the failure

Offen
#1,735 12 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
csharp
Bereich
networking

Rechercherichtung

Beginne bei Renci.SshNet.Sftp.SftpSession.RequestClose und verfolge den Upload-Pfad über SftpClient.InternalUploadFile und InternalSynchronizeDirectories. Reproduziere den Fehler gegen den gemeldeten DataPowerSSH-Server mithilfe der bereitgestellten Logs und vergleiche ihn mit einem erfolgreichen lftp-Upload. Erledigt ist die Aufgabe, wenn die Ursache isoliert ist und der Upload entweder funktioniert oder einen spezifischen, umsetzbaren Fehler meldet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi,

I'm getting the below error on various version ( including 2025.1.0 )

Unhandled exception occurred Renci.SshNet.Common.SshException: Failed to upload /2880389.xml to ./2880389.xml
---> Renci.SshNet.Common.SftpException: An error occurred, but no specific error code exists to describe the failure.
at Renci.SshNet.Sftp.SftpSession.RequestClose(Byte[] handle)
at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action`1 uploadCallback, Boolean isAsync, CancellationToken cancellationToken)
at Renci.SshNet.SftpClient.InternalSynchronizeDirectories(String sourcePath, String destinationPath, String searchPattern, SftpSynchronizeDirectoriesAsyncResult asyncResult)
--- End of inner exception stack trace ---

I'm properly connected to the SFTP server:

Files in remote directory ./username: ["processing"]
Current working directory: /

And I'm able to successfully upload a file using lftp:

lftp -u username sftp://some_server.com -e "put /tmp/test.xml -o /test5.xml; bye"

I don't have problems downloading files from this server.

Telnet to the server reoprts:

SSH-2.0-DataPowerSSH_1.1

I've been trying both:

SftpClient.Upload and SftpClient.SynchronizeDirectories(sourcePath, ".", "*.xml")

Any idea what might be causing the problem?
Tried to specify the remote path as / , ./ and ./username

Thanks

edi1
Maybe debug logs will be useful and also the fact, the server only supports: ssh-rsa

info: Renci.SshNet.Connection.DirectConnector[0]
Initiating connection to 'Unspecified/some_server.com:22'.
info: Renci.SshNet.Session[0]
Server version 'SSH-2.0-DataPowerSSH_1.1'.
dbug: Renci.SshNet.Session[0]
[(null)] Performing curve25519-sha256 key exchange.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating aes128-ctr server cipher.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating aes128-ctr client cipher.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating hmac-sha2-256 server hmac algorithm.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating hmac-sha2-256 client hmac algorithm.
dbug: Renci.SshNet.SftpClient[0]
Disposing client.
info: Renci.SshNet.SftpClient[0]
Disconnecting client.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposing session.
info: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disconnecting session.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Shutting down socket.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposing socket.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposed socket.
info: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Raised exception
Renci.SshNet.Common.SshConnectionException: Software caused connection abort
---> System.Net.Sockets.SocketException (53): Software caused connection abort
at Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan readTimeout)
at Renci.SshNet.Session.TrySocketRead(Socket socket, Byte[] buffer, Int32 offset, Int32 length)
at Renci.SshNet.Session.ReceiveMessage(Socket socket)
at Renci.SshNet.Session.MessageListener()
--- End of inner exception stack trace ---

Vorherrschende Sprache
C#
Sterne
4.4k
Forks
993
Ø Merge
9 T. 21 Std.
Gemergte PRs (30 T.)
1

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sshnet/SSH.NET

Alle Issues in sshnet/SSH.NET

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.