Open jmargaglione opened 6 years ago
After an unrelated fix to one of the tests I'm able to get the entire suite running on node v10. That includes some basic SSL testing as well.
Based on the error messages this sounds like the SSL handshake is being rejected because the key size is too small (i.e. it thinks it insecure). I'd suggest trying out connecting directly to the underlying DB to see if the issue is on the pgpool-II side. If either the pgpool-II server or the database itself is quite old, it may have been initialized with a smaller key size. The fix would be to generate and install a new larger key.
Alternatively you may be able to override the OpenSSL security level to allow smaller insecure keys. Check out https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_security_level.html. Though you're likely better off upgrading the private keys.
I generated these keys about 3 months ago based on the PostgreSQL docs for 10.0, so I think they are good. Command line psql to the pgpool server works fine with the given keys on the same server/user/env as the Node 10 host.
I just bought a signed key from GoDaddy, lets see what that does.
It might also be SSL renegotiation related. There's an old thread from 2015 of someone getting a similar error from pgpool (same error message): https://www.postgresql.org/message-id/flat/561FD644.6040201%40aklaver.com#561FD644.6040201@aklaver.com
If you're able to isolate the problem would help to know the pgpool and openssl versions too.
It looks like nodejs 10 has moved to openssl-1.1.0, which breaks my code with pg. Running on anything below node-10.0.0 works great.
Here is the error I get from Node when trying to fetch some rows from Postgres 10.1) on Ubuntu 16.04:
Error on pgool2 host: