Do you pass manually the sonar.branch.name param on the command line ?
Otherwise yes, i recall that some extensions wraps the refs/heads before the real branch name.
Concerning the exception, is it a 503 as well you are talking about ? or another one ?
How do you do the authentication ?
Thanks.