Open kmacpher67 opened 5 years ago
Looks like the server is expecting a client certificate, but you're not supplying one. Which makes sense, because the appender doesn't know anything about SSL at the moment. It doesn't look like much work to add support for it going by the SSL Guide, (just pass a connection options object as the second argument to the connect call) but I don't have the expertise to work on this. Happy to see a PR that implements it though.
If you want to investigate this, then take a look at the integration.sh script in the test directory. It starts up a docker container running rabbitmq, then tries to connect to it using the node code. You could replace the docker image with one configured to run the same as the server you're trying to connect to.
i created a fork for enabling:
const protocol = config.protocol || 'amqp';
https://github.com/kmacpher67/rabbitmq
I added other variables too whilst in there.
I did not add any tests.
https://github.com/log4js-node/rabbitmq/pull/12 did some minor clean up let me know.
ahh, incase anybody was interested. It's pretty simple.
export DEBUG=log4js*
# shows all debug statements for log4js
export DEBUG=log4js:rabbitmq*
# shows only debug for rabbitmq appender
Gareth Jones nomiddlename: So the tap tests are failing, because they are expecting results back from amqp open (parameters). Instead to get SSL working, I had to reconfigure the URL instead:
const socketOptions = con;
amqplib.connect(url, socketOptions).then((c)
IMHO if i'm changing test code then this is non-trivial change. I've never done node tap component tests (The fake mocks are voodoo tome) not that I can't figure it out, but when I do, are we still going to get a MR completed? Let me know before I invest any further time on getting this branch to merge.
Migrating from native "amqplib": "^0.5.2" to log4js. Getting error on the connection socket. We have ssl enabled and process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
the config.rabbit is: