I have a dedicated puppetserver certificate here, so when I tried to specify puppetserver host alias as a middleware host, server fails to connect to the broker, because it was trying to connect with the puppetserver alias while broker loaded real hostname certificate (agent's one).. I found no easy way to change that in the config file. So just changed middleware_host to use real node hostname (not puppetserver alias)