Analytics is usually setup when you onboard an organization or later using the processes described in the version documentation e.g
<inst_root>/apigee/apigee-service/bin/apigee-service apigee-provision/enable-ax -f configFile
Whenever analytics is provisioned an odd case can occur if you have a proxy (e.g Squid) intercepting requests to the management server.
There are a couple of possible solutions.
1. As the provisioning process uses curl you need to ensure the proxy settings are disabled for any request to the management server (MS) IP address. See server documentation for methods to do this.
2. If this is not possible you can try the following.
a. Login to the MS server
b. Set the MS IP address (MSIP) in the config file to the localhost address (127.0.0.1).
MSIP=127.0.0.1
Rerun the setup-org / enable analytics steps using this configuration.
This should force all the API (curl) requests to go to the MS using localhost and the proxy should not be used.