Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunyan dependency change and logging fix #12

Closed
wants to merge 1 commit into from
Closed

Bunyan dependency change and logging fix #12

wants to merge 1 commit into from

Conversation

devoncrouse
Copy link

Getting errors with the serializers and Bunyan 0.18.3 in my environment; fixed the dependency on 0.18.0 which works fine.

Also got "Error: getsockname EINVAL" when trying to access conn.address()... Anyways, figured it's safe to assume it'll be the host/port we were trying for.

@devoncrouse
Copy link
Author

I believe this resolves #11

@ghost
Copy link

ghost commented May 21, 2013

The actual exception from bunyan is:

bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "raw" Logger serializer: TypeError: Cannot read property 'buf' of undefined
    at Object.bunyan_serialize_raw [as raw] (/root/git/node-snmpjs/lib/index.js:27:12)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:644:46)
    at Array.forEach (native)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:640:33)
    at new Logger (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:459:10)
    at Logger.child (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:502:10)
    at defaultLogger (/root/git/node-snmpjs/lib/index.js:65:15)
    at Object.createTrapListener (/root/git/node-snmpjs/lib/index.js:107:17)
    at Object.<anonymous> (/root/git/node-snmpjs/tl.js:25:11)
    at Module._compile (module.js:449:26)
bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "origin" Logger serializer: TypeError: Cannot read property 'family' of undefined
    at Object.bunyan_serialize_endpoint (/root/git/node-snmpjs/lib/index.js:37:19)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:644:46)
    at Array.forEach (native)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:640:33)
    at new Logger (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:459:10)
    at Logger.child (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:502:10)
    at defaultLogger (/root/git/node-snmpjs/lib/index.js:65:15)
    at Object.createTrapListener (/root/git/node-snmpjs/lib/index.js:107:17)
    at Object.<anonymous> (/root/git/node-snmpjs/tl.js:25:11)
    at Module._compile (module.js:449:26)
bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "dst" Logger serializer: TypeError: Cannot read property 'family' of undefined
    at Object.bunyan_serialize_endpoint (/root/git/node-snmpjs/lib/index.js:37:19)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:644:46)
    at Array.forEach (native)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:640:33)
    at new Logger (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:459:10)
    at Logger.child (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:502:10)
    at defaultLogger (/root/git/node-snmpjs/lib/index.js:65:15)
    at Object.createTrapListener (/root/git/node-snmpjs/lib/index.js:107:17)
    at Object.<anonymous> (/root/git/node-snmpjs/tl.js:25:11)
    at Module._compile (module.js:449:26)
bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "snmpmsg" Logger serializer: TypeError: Cannot read property 'version' of undefined
    at Object.bunyan_serialize_snmpmsg [as snmpmsg] (/root/git/node-snmpjs/lib/protocol/message.js:227:30)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:644:46)
    at Array.forEach (native)
    at Logger._applySerializers (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:640:33)
    at new Logger (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:459:10)
    at Logger.child (/root/git/node-snmpjs/node_modules/bunyan/lib/bunyan.js:502:10)
    at defaultLogger (/root/git/node-snmpjs/lib/index.js:65:15)
    at Object.createTrapListener (/root/git/node-snmpjs/lib/index.js:107:17)
    at Object.<anonymous> (/root/git/node-snmpjs/tl.js:25:11)
    at Module._compile (module.js:449:26)

@ghost
Copy link

ghost commented May 21, 2013

The logging bug appears to be caused by TritonDataCenter/smartos-live#184; see trentm/node-bunyan@1a8be0c. The correct fix is to move forward to bunyan 0.21 rather than to fix on 0.18.0.

ghost pushed a commit that referenced this pull request May 21, 2013
#12 Bunyan dependency change and logging fix
@ghost
Copy link

ghost commented May 21, 2013

Thanks for the report. 0.1.4 should work for you now.

@ghost ghost closed this May 21, 2013
@devoncrouse
Copy link
Author

Good call, thanks for the fix.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant