Maybe you didn't install all the required SGX AESM packages?
Generally, you'll need to install these packages for AESM:
And when you're using Azure-DCAP-Client, you *must uninstall* this package:
libsgx-dcap-default-qpl (because it silently overrides the azure dcap client package)
If the problem persists, try to play with environment variable `SGX_AESM_ADDR=1` (I don't remember what it was for, please google if need some context).
See also some helpers: