Resolving SFTP connection failures in AEM as a Cloud Service due to duplicate source ports

This article explains how SFTP connection failures in Adobe Experience Manager as a Cloud Service occur when multiple port forwarding rules use the same source port in Advanced Networking, and how to resolve the issue by assigning unique source ports.

Description description

SFTP integrations in Adobe Experience Manager as a Cloud Service fail to connect when multiple port forwarding rules in Cloud Manager Advanced Networking are configured with the same source port for different SFTP destinations. This results in errors such as java.net.SocketException: Connection reset during SFTP session establishment. The issue occurs because the internal proxy can’t reliably route outbound TCP traffic when source ports are duplicated across different destinations. Assigning a unique source port to each external SFTP destination resolves the routing ambiguity and restores reliable connectivity.

Environments

  • Adobe Experience Manager as a Cloud Service (AEMaaCS) (all versions)
  • Adobe Experience Manager Cloud Manager

Symptoms

  • SFTP connections intermittently or consistently fail when submitting files as part of a workflow.
  • Application logs show errors such as Session.connect() java.net.SocketException: Connection reset.

Cause

Multiple port forwarding rules in Cloud Manager Advanced Networking are configured with the same source port for different SFTP destinations, causing routing conflicts.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Log in to Cloud Manager and navigate to the Advanced Networking configuration for the affected environment.

  2. Review all port forwarding rules for outbound TCP/SFTP traffic.

  3. Check if any rules are using the same source port for different SFTP destinations (For example: two rules with source port 30001, but different destination hostnames).

  4. For each external SFTP destination, assign a unique source port. For example:

    • sftp-destination-1.example.com → Source Port 30001

    • sftp-destination-2.example.com → Source Port 30002

  5. Remove or update any rules that share the same source port, but point to different destinations.

  6. Update your OSGi or application configuration to use the correct internal proxy port (the unique source port assigned in Cloud Manager) for each SFTP destination.

  7. Test the SFTP connection to confirm that the issue is resolved and that file transfers complete successfully.

recommendation-more-help
experience-cloud-kcs-help-kbarticles