I prefer to use some proper registered hostname ( i.e. test.company.com ) which has signed apache cert as well.
From experience, names like `ec2-52-81-7-177.cn-north-1` without SSL cert created issues in public cloud services like AWS.
Also, `ec2-52-81-7-177.cn-north-1.compute.amazonaws.com.cn` name might create issue while creating SAML cert inside Gluu Server.
Please try with registered hostname and SSL cert, if even that doesn't work... I'll re-test doc with 3.1.6 and will share screencast.