CA Mobile API Gateway:Unable to post to register_device

Document ID : KB000103984
Last Modified Date : 05/07/2018
Show Technical Document Details
Issue:
When attempting to launch your mobile app on Android the below error is observed:

Login failure: com.ca.mas.foundation.MASException: Unable to post to register_device: Unable to resolve host "<MAG_host_name>": No address associated with hostname 
 
Resolution:
Ensure the hostname for the MAG server is accessible.
Typically this caused by a bad hostname/ IP address or a failed network connection.

In the case of emulated devices where name resolution is done from the host systems hosts file it may be necessary to push an updated file directly to the device.

Change to the sdk/tools folder:

1) emulator -avd <avdname> -writable-system
2) ./adb root
3) ./adb remount
4) ./adb push <local>/hosts /etc/hosts