The error error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error
typically occurs during the SSL/TLS handshake process when the server encounters an unexpected condition and terminates the connection. Based on your curl and openssl outputs, we can see the handshake fails immediately after the ClientHello message.
The -msg
flag in your openssl command reveals crucial details:
openssl s_client -connect my-tcp-vip.example.com:443 -msg
Key observations from your output:
- The server responds with a fatal alert (internal_error) immediately after ClientHello
- No certificate exchange occurs
- The session parameters remain empty (Protocol: TLSv1.2, Cipher: 0000)
Based on similar cases I've encountered, these are the most likely culprits:
1. Certificate Configuration Issues
Try verifying your certificate chain:
openssl s_client -showcerts -connect my-tcp-vip.example.com:443
Common certificate problems include:
- Expired certificates
- Mismatched domain names
- Improper chain configuration
- Incorrect private key pairing
2. Protocol or Cipher Mismatch
Test with specific protocol versions:
openssl s_client -tls1_2 -connect my-tcp-vip.example.com:443
openssl s_client -tls1_1 -connect my-tcp-vip.example.com:443
3. VIP Configuration Problems
Since you mentioned this is behind a TCP VIP, verify:
- TLS termination is properly configured
- The VIP is correctly forwarding traffic
- No ACLs are blocking the connection
Packet Capture Analysis
Use tcpdump to capture the handshake:
tcpdump -i any -s 0 -w ssl_debug.pcap port 443
# Then analyze with Wireshark or:
tcpdump -nn -r ssl_debug.pcap -X
Server-Side Logs
Check your web server's error logs. For example:
- Apache:
/var/log/apache2/error.log
- Nginx:
/var/log/nginx/error.log
Try different clients to isolate the issue:
# Using newer curl (if available)
/usr/local/bin/curl -v https://my-tcp-vip.example.com
# Using wget
wget --debug https://my-tcp-vip.example.com
If you're using Nginx, here's a basic TLS configuration that works:
server {
listen 443 ssl;
server_name my-tcp-vip.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers on;
# ... rest of your configuration
}
Once you've made changes, verify with:
openssl s_client -connect my-tcp-vip.example.com:443 -servername my-tcp-vip.example.com -status
This should now show a complete handshake and certificate details if everything is configured correctly.
The error error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error
typically occurs during the initial SSL/TLS handshake phase when the server encounters an unrecoverable internal problem. The hexadecimal alert code 0x50
(80 in decimal) indicates this is a generic internal error with no specific details exposed for security reasons.
The openssl s_client
output reveals several critical points:
- Handshake fails immediately after ClientHello
- No server certificate presented
- No cipher suite negotiation occurs
- Session parameters remain unestablished
Certificate Configuration Issues
# Verify certificate chain integrity
openssl verify -CAfile /path/to/ca_bundle.crt /path/to/server.crt
Protocol Version Mismatch
Test with explicit protocol specification:
curl --tlsv1.2 https://example.com
curl --tlsv1.3 https://example.com
Cipher Suite Compatibility
Check supported ciphers:
nmap --script ssl-enum-ciphers -p 443 example.com
Packet Capture Analysis
tcpdump -i any -s 0 -w tls_debug.pcap port 443
# Analyze with Wireshark or:
tshark -r tls_debug.pcap -Y "ssl.handshake" -V
Server-Side Configuration Check
For Nginx:
nginx -T 2>&1 | grep ssl_
# Sample output should show:
# ssl_certificate: /path/to/cert.pem
# ssl_certificate_key: /path/to/key.pem
- Verify port accessibility:
telnet example.com 443 nc -zv example.com 443
- Test with different SSL implementations:
openssl s_client -connect example.com:443 -servername example.com -showcerts
- Check for SNI requirements:
curl -v --resolve example.com:443:1.2.3.4 https://example.com
Nginx Correct Configuration
server {
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/ssl/certs/server.crt;
ssl_certificate_key /etc/ssl/private/server.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers on;
}
Apache Correct Configuration
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite HIGH:!aNULL:!MD5
</VirtualHost>
Use comprehensive SSL test tools:
testssl.sh example.com:443
sslyze --regular example.com
Remember to check server error logs for specific failure messages that might not be exposed to clients:
tail -f /var/log/nginx/error.log
journalctl -u apache2 -f