An 'internal error' occurs during a Windows Remote Desktop connection

更新时间:
复制 MD 格式

Symptoms

When you use Remote Desktop Connection (MSTSC) to connect to a Windows instance, the connection fails. The error message "An internal error has occurred." is displayed.

Causes

This issue can be caused by the following:

  • Abnormal network connectivity: An unstable network connection, high latency, or packet loss prevents the server from responding to the Remote Desktop Protocol (RDP) handshake request in a timely manner.

  • Encryption negotiation failure: The encryption level or security layer protocol configurations of the client and server do not match, which interrupts the handshake.

  • Abnormal Remote Desktop certificate: The self-signed certificate that the RDP service uses has expired or is corrupted. Additionally, services that generate certificates, such as Cryptographic Services (CryptSvc), are not running correctly.

  • Incorrect permission configuration: The access permissions for the system key folder (MachineKeys) or RDP key files have been modified, which prevents the service from reading the key.

  • Incorrect security protocol configuration: The SSL/TLS protocol version, cipher suite order, or SCHANNEL configuration in the registry is abnormal.

Solutions

Troubleshoot the issue in the following order: Network Layer > Basic Configuration > Certificates and Services > Advanced Protocols. Follow these steps until the issue is resolved.

Step 1: Check network connectivity

First, rule out network connectivity issues. Ensure that the network is stable and not blocked by a firewall. For more information, see Troubleshoot remote connection failures to a Windows instance - Step 7: Check the network.

Step 2: Check the encryption negotiation configuration

Check the registry configuration for the RDP security layer and encryption level. Correct any mismatched settings. For more information, see the following documents:

Step 3: Check the Remote Desktop certificate and dependent services

Verify the status of the RDP self-signed certificate. Check the system services and file permissions that are responsible for certificate generation.

  1. Check and rebuild the RDP self-signed certificate

    For more information, see Troubleshoot remote connection failures to a Windows instance - Step 12: The Windows RDP self-signed certificate expired.

  2. Check the registry certificate configuration

    For more information, see Incorrect registry configuration for the RDP certificate causes an "internal error" during remote connection.

  3. Check the status of dependent services

    Ensure that the following services are in the Running state:

    • Certificate Propagation (CertPropSvc)

    • CNG Key Isolation (KeyIso)

    • Cryptographic Services (CryptSvc)

    • Remote Desktop Configuration (SessionEnv)

  4. Check key folder permissions

    For more information, see:

Step 4: Check security protocol negotiation

If the previous steps do not resolve the issue, perform an in-depth check of the underlying configurations for the SSL/TLS protocol and SCHANNEL.

  1. Check the protocol registry configuration

    For more information, see Abnormal registry configuration for RDP security protocol negotiation causes an "internal error" during remote connection.

  2. Check the SSL cipher suite order

    For more information, see Abnormal policy for the SSL cipher suite order in RDP security protocol negotiation causes an "internal error" during remote connection.

  3. Repair the SCHANNEL and SSL subkeys

    For more information, see Abnormal SCHANNEL or SSL subkey under the RDP security protocol causes an "internal error" during remote connection.