raintank / raintank-collector

Raintank Remote Collector Agent
26 stars 4 forks source link

TypeError: Cannot call method 'forEach' of undefined #12

Closed Dieterbe closed 9 years ago

Dieterbe commented 9 years ago

seeing this in devstack:

TypeError: Cannot call method 'forEach' of undefined
    at Socket.<anonymous> (/opt/raintank/raintank-collector/serviceManager.js:31:28)
    at Socket.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Socket.onevent (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:254:10)
    at Socket.onpacket (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:212:12)
    at Manager.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Manager.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Manager.ondecoded (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/manager.js:301:8)
    at Decoder.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Decoder.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/socket.io-parser/index.js:247:12)
[2015-05-19 22:55:54.779] [ERROR] PID:42 - worker 13755 died, restarting.
[2015-05-19 22:55:54.897] [INFO] PID:13765 - connected to socket.io server
[2015-05-19 22:55:54.909] [INFO] PID:13767 - connected to socket.io server

/opt/raintank/raintank-collector/serviceManager.js:31
        resp.monitor_types.forEach(function(type) {
                           ^
TypeError: Cannot call method 'forEach' of undefined
    at Socket.<anonymous> (/opt/raintank/raintank-collector/serviceManager.js:31:28)
    at Socket.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Socket.onevent (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:254:10)
    at Socket.onpacket (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:212:12)
    at Manager.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Manager.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Manager.ondecoded (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/manager.js:301:8)
    at Decoder.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Decoder.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/socket.io-parser/index.js:247:12)
[2015-05-19 22:55:54.935] [ERROR] PID:42 - worker 13765 died, restarting.

/opt/raintank/raintank-collector/serviceManager.js:31
        resp.monitor_types.forEach(function(type) {
                           ^
TypeError: Cannot call method 'forEach' of undefined
    at Socket.<anonymous> (/opt/raintank/raintank-collector/serviceManager.js:31:28)
    at Socket.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Socket.onevent (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:254:10)
    at Socket.onpacket (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/socket.js:212:12)
    at Manager.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Manager.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Manager.ondecoded (/opt/raintank/raintank-collector/node_modules/socket.io-client/lib/manager.js:301:8)
    at Decoder.<anonymous> (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
    at Decoder.Emitter.emit (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/opt/raintank/raintank-collector/node_modules/socket.io-client/node_modules/socket.io-parser/index.js:247:12)
[2015-05-19 22:55:54.949] [ERROR] PID:42 - worker 13767 died, restarting.
woodsaj commented 9 years ago

This will mean that u are running and old version of grafana. if u are using a separate branch you will need to merge master again.

Dieterbe commented 9 years ago

you're right, that fixed it.