“My something DOESN’T WORK”

Or. Miserable failures in debugging.

Created by Laurence J MacGuire a.k.a Liu Jian Ming

ThoughtWorks Xi’An, 2015/06/02

Creative Commons License

These are all real-world examples.

They should both make you laugh. And make you cry.

Case-study #1

var nr = require('newrelic')
var redis = require('redis').createClient()

setInterval(nr.createBackgroundTransaction('update:cache', function () {
  var newValue = someDataGenerator()

  redis.set('some:cache:key', newValue, function () {
    nr.endTransaction() // End the transaction once redis is done
  })
}), 30000) // Every 30s

Error Message:

test.js:line 2 redis: can't connect to localhost

Conclusion?

“NewRelic doesn’t work for NodeJS”

Avenues of investigation

Do you have Redis installed? And running? No.

Did we even run the NewRelic code? No.

Why would NewRelic even require Redis?

Case-study #2

ssh user@host

Error Message:

zsh: permission denied: ssh

Conclusion?

“I don’t have SSH access”

Avenues of investigation

What is ZSH?

Did it fail faster than a network would?

Have you tried ssh -v ?

Why is it zsh complaining?