Attempting to write a moleculer service template that defines a Winston Graylog logger. However, if the GL server is not available, the winston-gelf-transporter will bail causing the moleculer service to terminate. Instead, it should just warn and move on and allow the rest of the service to come up.
[2020-01-14T00:49:18.257Z] INFO service-undefined/BROKER: Moleculer v0.14.0-beta7 is starting...
[2020-01-14T00:49:18.260Z] INFO service-undefined/BROKER: Namespace: <not defined>
[2020-01-14T00:49:18.260Z] INFO service-undefined/BROKER: Node ID: service-undefined
[2020-01-14T00:49:18.260Z] INFO service-undefined/METRICS: Metrics: Enabled
[2020-01-14T00:49:18.272Z] INFO service-undefined/REGISTRY: Strategy: RoundRobinStrategy
[2020-01-14T00:49:18.274Z] INFO service-undefined/BROKER: Serializer: JSONSerializer
[2020-01-14T00:49:18.276Z] INFO service-undefined/BROKER: Registered 13 internal middleware(s).
[2020-01-14T00:49:18.277Z] INFO service-undefined/BROKER: Transporter: AmqpTransporter
[2020-01-14T00:49:18.277Z] INFO service-undefined/BROKER: The broker built-in balancer is DISABLED.
[2020-01-14T00:49:18.302Z] INFO service-undefined/TRANSIT: Connecting to the transporter...
[2020-01-14T00:49:18.366Z] WARN service-undefined/TRANSPORTER: AMQP failed to connect!
[2020-01-14T00:49:18.367Z] WARN service-undefined/TRANSIT: Connection is failed. getaddrinfo ENOTFOUND rabbitmq
Error: getaddrinfo ENOTFOUND graylog
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! micro-service@0.0.1 dev: `node -r esm -r ts-node/register src/main.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the micro-service@0.0.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ujwal/.npm/_logs/2020-01-14T00_49_18_404Z-debug.log
Attempting to write a moleculer service template that defines a Winston Graylog logger. However, if the GL server is not available, the winston-gelf-transporter will bail causing the moleculer service to terminate. Instead, it should just warn and move on and allow the rest of the service to come up.