luc-ass / homebridge-evohome

Homebridge plugin for Honeywell Evohome
29 stars 16 forks source link

Error: getaddrinfo ENOTFOUND tccna.honeywell.com #145

Open PuzzledUser opened 1 year ago

PuzzledUser commented 1 year ago

Probably related to https://github.com/luc-ass/homebridge-evohome/issues/101, I've noticed this today on homebridge-evohome v0.11.0:

[20/03/2023, 09:16:57] [Evohome] Error getting locations:
 Error: getaddrinfo ENOTFOUND tccna.honeywell.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'tccna.honeywell.com'
}

I assume it was a temp network dns resolution glitch, that perhaps could be handled more elegantly.

PuzzledUser commented 1 year ago

I assume related to the Honeywell planned outage this morning, I saw similar errors to https://github.com/luc-ass/homebridge-evohome/issues/101, but thankfully not breaking accessories like it used to (thank you). Hence I'll post here rather than there.

However, maybe the error handling in getting locations could be improved:

[29/03/2023, 07:01:45] [Evohome] Error getting locations:
 SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:358:23)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)
SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:358:23)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)
<html><body><b>Http/1.1 Service Unavailable</b></body> </html>
<ref *2> IncomingMessage {
  _readableState: ReadableState {
    objectMode: false,
    highWaterMark: 16384,
    buffer: BufferList { head: null, tail: null, length: 0 },
...
<<SNIP of long JSON>>
...
  toJSON: [Function: responseToJSON],
  caseless: Caseless {
    dict: {
      'content-length': '62',
      connection: 'close',
      'cache-control': 'no-cache,no-store',
      pragma: 'no-cache'
    }
  },
  body: '<html><body><b>Http/1.1 Service Unavailable</b></body> </html>',
  [Symbol(kCapture)]: false,
  [Symbol(RequestTimeout)]: undefined
}
5xPa commented 1 year ago

The outage was indeed a planned outage. My system had similar alerts as yours. Though the system recovered with no problems

On Wed, 29 Mar 2023 at 08:45, PuzzledUser @.***> wrote:

I assume related to the Honeywell planned outage this morning, I saw similar errors to #101 https://github.com/luc-ass/homebridge-evohome/issues/101, but thankfully not breaking accessories like it used to (thank you). Hence I'll post here rather than there.

However, maybe the error handling in getting locations could be improved:

[29/03/2023, 07:01:45] [Evohome] Error getting locations: SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at Request._callback (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:358:23) at Request.self.callback (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:185:22) at Request.emit (events.js:315:20) at Request. (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1154:10) at Request.emit (events.js:315:20) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:421:28) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1327:12) SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at Request._callback (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:358:23) at Request.self.callback (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:185:22) at Request.emit (events.js:315:20) at Request. (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1154:10) at Request.emit (events.js:315:20) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:421:28) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1327:12)

Http/1.1 Service Unavailable

<ref *2> IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, ... <>

— Reply to this email directly, view it on GitHub https://github.com/luc-ass/homebridge-evohome/issues/145#issuecomment-1488099665, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARF3VCDWJI4JLZ24BJVRRFLW6PSCHANCNFSM6AAAAAAWA7J5CM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

PuzzledUser commented 1 year ago

Just to record, similar issue for yesterday's planned outage.

[05/05/2023, 09:06:35] [Evohome] Error getting locations:
 Error: getaddrinfo ENOTFOUND tccna.honeywell.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'tccna.honeywell.com'
}

but then a new one shortly afterwards:

[05/05/2023, 09:51:30] [Evohome] Error getting locations:
 TypeError: Cannot read property 'locationId' of undefined
    at /usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:173:47
    at arrayMap (/usr/local/lib/node_modules/homebridge-evohome/node_modules/lodash/lodash.js:653:23)
    at Function.map (/usr/local/lib/node_modules/homebridge-evohome/node_modules/lodash/lodash.js:9622:14)
    at /usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:170:14
    at _fulfilled (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:854:54)
    at /usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:816:13)
    at /usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:624:44
    at runSingle (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:137:13)
    at flush (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:125:13)

There was also one the day before too:

[04/05/2023, 13:01:25] [Evohome] Error getting locations:
 SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:358:23)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-evohome/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)

All recovered fine. 👍