Skip to content

Unable to connect EC2 with ECS windows OS. Windows Fargate → EC2 MSMQ private queue: “The remote computer is not available.” (0xC00E0069)

0

error-image Windows Fargate → EC2 MSMQ private queue: “The remote computer is not available.” (0xC00E0069) Goal: Small PoC: use MSMQ on a Windows EC2 to collect XML; a Windows ECS Fargate task reads from that private queue and uploads to S3. ECS/S3/logging are fine — only ECS → EC2 MSMQ connectivity is failing. Error: MSMQ COM from the container returns: “The remote computer is not available.” (MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE, 0xC00E0069) when opening the remote private queue. Tried: Direct format names: DIRECT=OS:<hostname>\private$\xmlqueue and DIRECT=TCP:<ec2-private-ip>\private$\xmlqueue → same error. Security Groups / NACLs: EC2 SG allows from the task SG on TCP 1801, TCP 135, TCP 49152–65535; task SG egress open; NACLs permissive. Windows Firewall (EC2):same ports allowed. Queue exists and works locally on EC2; permissions relaxed for PoC. ECS task and EC2 are in the same VPC/subnets. My questions:

  1. Any known limitations or extra requirements for MSMQ remote access from Windows Fargate (workgroup/no-AD)?
  2. Is DIRECT=TCP the right approach here, and are additional DCOM/MSMQ auth/permissions typically needed beyond opening the ports above?
  3. Anything Windows-Fargate-specific that commonly triggers 0xC00E0069 when reaching EC2 MSMQ?

Appreciate pointers to unblock the ECS ↔ EC2 MSMQ connection.

1 Answer
0

Based on your description, you're encountering connectivity issues between a Windows Fargate task and an EC2 instance running MSMQ. Here are some insights on your questions:

  1. Regarding limitations for MSMQ remote access from Windows Fargate: MSMQ typically relies on Windows authentication mechanisms that can be challenging in non-domain environments. Since your Fargate tasks are in a workgroup (non-AD) setup, this could be causing authentication issues when trying to access the remote queue.

  2. For the connection approach: While DIRECT=TCP is generally the right approach for non-domain environments, MSMQ also depends on proper RPC/DCOM configuration. The ports you've opened (TCP 1801, 135, and the dynamic range 49152-65535) are correct for MSMQ communication, but MSMQ might still be struggling with authentication or name resolution.

  3. For Windows-Fargate-specific issues causing 0xC00E0069: This error typically indicates the remote machine cannot be reached or authenticated properly. In containerized environments like Fargate, network isolation can sometimes cause additional connectivity challenges.

Troubleshooting suggestions:

  • Try using the EC2 Instance Connect feature to remotely connect to your EC2 instance and verify that the MSMQ service is running properly.

  • Consider using AWS Systems Manager to troubleshoot connectivity between your Fargate task and EC2 instance. You can use ECS Exec to connect to your container and run network diagnostics:

aws ecs execute-command --cluster your-cluster-name --task your-task-id --container your-container-name --interactive --command "/bin/sh"

From there, you can test basic connectivity to the EC2 instance.

  • Check if the MSMQ service on the EC2 instance is configured to accept remote connections and if the necessary MSMQ components are installed.

  • For non-domain environments, you might need to configure MSMQ to use "workgroup mode" explicitly on both sides.

  • Verify that hostname resolution is working correctly from the Fargate task to the EC2 instance.

Since this is a PoC, you might also consider simplifying by temporarily using a public queue instead of a private queue, as they have different authentication requirements.
Sources
Impossible to connect to ec2 windows instance | AWS re:Post
Unable to connect to EC2 using Instance Connect endpoint and RDP | AWS re:Post
Troubleshoot service connect issues in Amazon ECS | AWS re:Post

answered 10 months ago

  • any suggestions?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.