In the properties of node, which you are trying to poll under Communications there is "Primary host name". This is the address of agent to which netxms server is connecting. Take this address and add it to MasterServer line of agent config after comma.