Hey guys,
since some days I find every morning many messages like this:
error [pimatic]: { StatusCodeError: 502 - <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
at new StatusCodeError (/home/ortin/pimatic-app/node_modules/request-promise/lib/errors.js:26:15)
at Request.RP$callback [as _callback] (/home/ortin/pimatic-app/node_modules/request-promise/lib/rp.js:68:32)
at Request.self.callback (/home/ortin/pimatic-app/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.<anonymous> (/home/ortin/pimatic-app/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at IncomingMessage.<anonymous> (/home/ortin/pimatic-app/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'StatusCodeError',
statusCode: 502,
message:
'502 - <html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n',
error:
'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n',
options:
{ uri: 'http://api.pimatic.org/plugins?version=0.9.54',
callback: undefined,
transform: undefined,
simple: true,
resolveWithFullResponse: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null },
readable: false,
_events:
[Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
connection:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.10.3 (Ubuntu)',
date: 'Wed, 11 Dec 2019 23:00:06 GMT',
'content-type': 'text/html',
'content-length': '182',
connection: 'close' },
rawHeaders:
[ 'Server',
'nginx/1.10.3 (Ubuntu)',
'Date',
'Wed, 11 Dec 2019 23:00:06 GMT',
'Content-Type',
'text/html',
'Content-Length',
'182',
'Connection',
'close' ],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 502,
statusMessage: 'Bad Gateway',
client:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
_consuming: false,
_dumped: false,
req:
ClientRequest {
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header:
'GET /plugins?version=0.9.54 HTTP/1.1\r\nhost: api.pimatic.org\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/plugins?version=0.9.54',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Url],
readable: true,
writable: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: {},
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
method: 'GET',
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: false,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 80,
host: 'api.pimatic.org',
path: '/plugins?version=0.9.54',
httpModule: [Object],
agentClass: [Function],
agent: [Agent],
_started: true,
href: 'http://api.pimatic.org/plugins?version=0.9.54',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.pimatic.org',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body:
'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n' } }
00:00:12error [pimatic]: { StatusCodeError: 502 - <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
at new StatusCodeError (/home/ortin/pimatic-app/node_modules/request-promise/lib/errors.js:26:15)
at Request.RP$callback [as _callback] (/home/ortin/pimatic-app/node_modules/request-promise/lib/rp.js:68:32)
at Request.self.callback (/home/ortin/pimatic-app/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.<anonymous> (/home/ortin/pimatic-app/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at IncomingMessage.<anonymous> (/home/ortin/pimatic-app/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'StatusCodeError',
statusCode: 502,
message:
'502 - <html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n',
error:
'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n',
options:
{ uri: 'http://api.pimatic.org/plugins?version=0.9.54',
callback: undefined,
transform: undefined,
simple: true,
resolveWithFullResponse: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null },
readable: false,
_events:
[Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
connection:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.10.3 (Ubuntu)',
date: 'Wed, 11 Dec 2019 23:00:06 GMT',
'content-type': 'text/html',
'content-length': '182',
connection: 'close' },
rawHeaders:
[ 'Server',
'nginx/1.10.3 (Ubuntu)',
'Date',
'Wed, 11 Dec 2019 23:00:06 GMT',
'Content-Type',
'text/html',
'Content-Length',
'182',
'Connection',
'close' ],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 502,
statusMessage: 'Bad Gateway',
client:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.pimatic.org',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
__connectStack:
'Error: From connect\n at Socket.connect (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:56:29)\n at Agent.connect [as createConnection] (net.js:156:17)\n at Agent.createSocket (_http_agent.js:227:26)\n at Agent.addRequest (_http_agent.js:185:10)\n at new ClientRequest (_http_client.js:249:16)\n at Object.request (http.js:42:10)\n at Request.start (/home/ortin/pimatic-app/node_modules/request/request.js:751:32)\n at Request.end (/home/ortin/pimatic-app/node_modules/request/request.js:1511:10)\n at end (/home/ortin/pimatic-app/node_modules/request/request.js:564:14)\n at Immediate._onImmediate (/home/ortin/pimatic-app/node_modules/request/request.js:578:7)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)',
emit: [Function],
__emitModified: true,
parser: null,
_httpMessage: [ClientRequest],
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 3191613,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 343,
[Symbol(kBytesWritten)]: 82 },
_consuming: false,
_dumped: false,
req:
ClientRequest {
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header:
'GET /plugins?version=0.9.54 HTTP/1.1\r\nhost: api.pimatic.org\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/plugins?version=0.9.54',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Url],
readable: true,
writable: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: {},
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
method: 'GET',
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: false,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 80,
host: 'api.pimatic.org',
path: '/plugins?version=0.9.54',
httpModule: [Object],
agentClass: [Function],
agent: [Agent],
_started: true,
href: 'http://api.pimatic.org/plugins?version=0.9.54',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.pimatic.org',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body:
'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n' } }
This night there were more than 20 entries within 1 second at 00:00:12.
Any idea?