Did you ever get this resolved, and if so, remember how?
Got the exact same issue.
Both Aruba and Juniper controllers with Clearpass portals.
Aruba works fine (offcourse).
When connecting via the juniper however I always get that same error (error 504 - the requested server was not found due to DNS timeout).
The thing is.. the client pc can resolve the clearpass hostname wihout problem! ACL allows dns and http(s) to clearpass.
When I replace the hostname with the ip address all works fine.
I'm realy curious as to what is exactly spewing this error. Not the client since it can resolve just fine. I'm guessing the Juniper WLC itself which would be weird aswell as it is configured with correct dns info.
More weird stuff.. even when I configure the juniper web portal login page to use an ip address it spews this error?!
EDIT (sollution): within the wireless serice the web-portal ACL is configured. Make sure to allow DNS and Clearpass here. Customer had replaced this ACL :(