Log stacktrace, too,  if connecting fails
Should fix NPE on connection [JENKINS-22478]