Skip to content

how-to DEBUG mode investigate connection issues #5

@kmacpher67

Description

@kmacpher67

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";

 ERR { Error: Socket closed abruptly during opening handshake
 ERR     at Socket.endWhileOpening (/app/node_modules/amqplib/lib/connection.js:260:17)
 ERR     at Socket.emit (events.js:203:15)
 ERR     at endReadableNT (_stream_readable.js:1129:12)
 ERR     at process._tickCallback (internal/process/next_tick.js:63:19)

the config.rabbit is:

var rabbit = {
    type: '@log4js-node/rabbitmq',
    host: '127.0.0.1',
    port: 5672,
    username: 'guest',
    password: 'guest',
    routing_key: 's.system.log',
    exchange: 's.exchange.infrastructure.logger',
    mq_type: 'topic',
    con: {heartbeat: 30, protocol: 'amqps'}
  }````


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions