zone-eu / zone-mta-template

Template application for ZoneMTA
39 stars 25 forks source link

TypeError when updated to new image #14

Closed SpoortiPalakshaiah closed 3 years ago

SpoortiPalakshaiah commented 3 years ago

Hello, We are using commit IDs to update zone-mta-template; Previously we were using this commit ID 339f8406bee64b7c67581e51e119d605ecc97700 and it worked fine;

But when we updated using the latest commit of zone-mta-template 4c621341f900bf7a8e75afa7191d3b91b9d062a5 we are getting type error as following in zone-mta container

ERR! Process Uncaught exception ERR! Process TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise ERR! Process at Gzip.Writable.write (internal/streams/writable.js:285:13) ERR! Process at Gzip.Writable.end (internal/streams/writable.js:567:10) ERR! Process at /opt/zone-mta/node_modules/zone-mta/lib/api-server.js:688:17 ERR! Process at nextTick (/opt/zone-mta/node_modules/restify/lib/chain.js:167:13) ERR! Process at processTicksAndRejections (internal/process/task_queues.js:75:11) ERR! Process TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise ERR! Process at Gzip.Writable.write (internal/streams/writable.js:285:13) ERR! Process at Gzip.Writable.end (internal/streams/writable.js:567:10) ERR! Process at /opt/zone-mta/node_modules/zone-mta/lib/api-server.js:688:17 ERR! Process at nextTick (/opt/zone-mta/node_modules/restify/lib/chain.js:167:13) ERR! Process at processTicksAndRejections (internal/process/task_queues.js:75:11) { ERR! Process code: 'ERR_INVALID_ARG_TYPE' ERR! Process } info Process Server closing down... info Service closed ERR! SMTP/feeder/18776 Connection to Queue server closed unexpectedly ERR!ERR! SMTP/feeder/18777ERR! Connection to Queue server closed unexpectedly SMTP/feeder/18783 Connection to Queue server closed unexpectedly ERR!SMTP/feeder/18790ERR! Connection to Queue server closed unexpectedly Sender/default/18835 Connection to Queue server closed unexpectedly Sender/default/18797 Connection to Queue server closed unexpectedly info Initiating Domain Restriction Plugin info QS Service closed ERR! Queue Error fetching counters: Topology is closed, please connect info API Service closed

andris9 commented 3 years ago

Is this something that happens automatically after start or something that happens once you do something, eg. make a HTTP API request or something?

SpoortiPalakshaiah commented 3 years ago

@andris9 It's logging automatically;

andris9 commented 3 years ago

This error was caused by the prom-client library as it started returning Promises in newer releases instead of actual values. If you made a HTTP requests for Prometheus metrics, then there was a conflict. Fixed in latest version.