Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.59k stars 2.62k forks source link

PM2 Cluster Mode does not work with NODE_EXTRA_CA_CERTS certificates #5919

Open sei-jdshimkoski opened 3 days ago

sei-jdshimkoski commented 3 days ago

What's going wrong?

When you start an application in "fork" mode with the "NODE_EXTRA_CA_CERTS" environment variable set, the application is able to communicate with API servers without issue.

When you start the exact same application in "cluster" mode instead, the application cannot communicate with API servers.

How could we reproduce this issue?

  1. Create a simple application that uses the NODE_EXTRA_CA_CERTS environment variable with a path to a certificate to communicate with an API.
  2. Run the application in "fork" mode to see a working application.
  3. Run the application in "cluster" mode to see that it doesn't work.

Supporting information

Nodejs version 20.17.0 Same issue in multiple host environments (Apple Silicon, Linux, etc)

sei-jdshimkoski commented 2 days ago

Linking this as it feels related: #3117

sei-jdshimkoski commented 2 days ago

I tested the same patch found in #3117 and it works.