Page MenuHomePhabricator

Citoid only logs a debug message saying "No Zotero response available." if Zotero is refusing connections
Closed, DuplicatePublic


Observed while looking into problems in T220235: Migrate Beta cluster services to use Kubernetes .

{"name":"citoid","hostname":"ab475f0b8c60","pid":1,"level":20,"levelPath":"debug/zotero","msg":"Zotero request made for:","time":"2019-05-15T01:21:42.095Z","v":0}
{"name":"citoid","hostname":"ab475f0b8c60","pid":1,"level":20,"levelPath":"debug/zotero","msg":"No Zotero response available.","time":"2019-05-15T01:21:42.096Z","v":0}

Turns out the real problem is pretty bad and being suppressed by this error handling:

runuser@ab475f0b8c60:/srv/service$ nodejs                   
> require('preq')({
...     uri: 'http://localhost:1969/web',
...     method: 'post',
...     headers: {
.....         'content-type': 'text/plain',
.....         'accept-language': 'en'
.....     },
...     body: ''
... });
Promise {
  _bitField: 0,
  _fulfillmentHandler0: undefined,
  _rejectionHandler0: undefined,
  _promise0: undefined,
  _receiver0: undefined }
> Unhandled rejection Error: connect ECONNREFUSED
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)

(the fact it runs into this econnrefused is T223344)