Cannot connect to Amazon RDS from within Docker container
See original GitHub issueI have been banging my head against this for hours and I just do not understand what is going on here. I’m hoping whomever reads this has some idea I haven’t had yet. Basically, within the attached zip file is a very simple project that attempts a connection to an Amazon RDS instance, issues a select 1 = 1
, and logs the results. If this project is run normally then the desired result is logged (1 = 1
). But if this project is run via a Docker container (as shown in the included run.sh
script) then the following will be logged:
{ Error: EE certificate key too weak
at TLSSocket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:320:48)
at TLSSocket.emit (events.js:198:13)
at TLSSocket._finishInit (_tls_wrap.js:636:8)
--------------------
at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/app/node_modules/mysql/lib/Connection.js:119:18)
at Object.<anonymous> (/app/mysql.js:29:6)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) code: 'HANDSHAKE_SSL_ERROR', fatal: true }
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Accessing RDS from within a Docker container not getting ...
Navigate to the RDS instances page · Select the DB instance and drill in to see details · Click on the security group...
Read more >Resolve problems connecting to an Amazon RDS DB instance
There are a number of root causes for the inability to connect to an Amazon RDS DB instance. Here are a few of...
Read more >How to connect to an Amazon RDS instance from my Docker ...
This should allow your RDS connections with all containers inside the machine. Next, you connect as you would normally do. Say you have...
Read more >Unable to connect to database running on AWS-RDS
When I run it in a docker container it fails to connect to the database with the message “Error opening conn - Communications...
Read more >How to access RDS DB from Docker Container ... - YouTube
This tutorial helps you to connect your RDS DB from docker container.Use these commands to install "MariaDB/MysqlDB" on Container so you can ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI, both:
Yield
Signature Algorithm: sha256WithRSAEncryption
.So I’ll try constructing a new pem set to pass in via the connection options tomorrow and see what that does.
Hmm. The note about 10.x being affected as well lends credence to why I see the same error if I use the
centos:latest
image and Node viayum install nodejs
.Using
rejectUnauthorized: false
isn’t such a great idea because it will open the door for a MITM attack (I am fairly sure).I can investigate some more with this new information tomorrow. But I doubt I’ll get further than you already have (thank you). Let’s tag the only person I know of working on AWS stuff and see what they say. @trivikr can you provide any insight here?