Page MenuHomePhabricator

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

Description

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: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002947","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: 'https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002947'
... });
Promise {
  _bitField: 0,
  _fulfillmentHandler0: undefined,
  _rejectionHandler0: undefined,
  _promise0: undefined,
  _receiver0: undefined }
> Unhandled rejection Error: connect ECONNREFUSED 127.0.0.1:1969
    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)