VNA Meraki Plugin Not Using Configured Proxy

book

Article ID: 221626

calendar_today

Updated On:

Products

CA Virtual Network Assurance

Issue/Introduction


I have an instance of VNA where we are testing to connect to the Meraki Dashboard through a proxy. The VNA server cannot directly reach the
  meraki api server and needs to connect through a proxy. The plugin does not appear to honor the configured proxy.

{

  "PLUGIN_CONFIG": {
    "MERAKI_DASHBOARD_HOST": "api.meraki.com",
    "MERAKI_API_KEY": "MY_API_KEY",
    "PROTOCOL": "https",
    "DELAY_BETWEEN_REST_CALLS_IN_MS": 400,
    "MAX_RETRIES": 3,
    "RETRY_DELAY_IN_MS": 500,
    "SYSLOG_PORT": 1542,
    "USE_PROXY": true,
    "PROXY_IP": "10.10.29.221",
    "PROXY_PORT": 80,
    "PROXY_PROTOCOL": "http",
    "PROXY_USERNAME": "",
    "PROXY_PASSWORD": "",
    "INVENTORY_POLL_RATE": "0 */720 *",
    "INVENTORY_DELTA_TIME": 43200,
    "PERFORMANCE_POLL_RATE": "0 */720 *",
    "PERFORMANCE_DELTA_TIME": 43200,
    "NOTIFICATION_POLL_RATE": "0 */5 *",
    "NOTIFICATION_DELTA_TIME": 300,
    "ENABLE_REST_API_EVENTS": "true",
    "ENABLE_SYSLOG_EVENTS": "false",
    "BLACKLISTED_EVENT_TYPES": "[]",
    "POLL_SSIDS": "true",
    "POLL_POLICIES": "true",
    "POLL_CLIENTS": "true",
    "NETWORK_ID_LIST": "[]",
    "DOMAIN_ID": 1
  }
}

Cause


The plugin validates the configuration settings and was not honoring the proxy settings during the validation


2021-06-04 16:23:34,333 DEBUG (default task-18)  [MERAKI_PLUGIN] MerakiPluginConfigHandler 81  Exception occurred connecting to https://api.meraki.com/api/v0/organizations. Likely an invalid IP or host: java.net.UnknownHostException: api.meraki.com: Name or service not known
 at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) [rt.jar:1.8.0_275]
 at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) [rt.jar:1.8.0_275]
 at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) [rt.jar:1.8.0_275]
 at java.net.InetAddress.getAllByName0(InetAddress.java:1277) [rt.jar:1.8.0_275]
 at java.net.InetAddress.getAllByName(InetAddress.java:1193) [rt.jar:1.8.0_275]
 at java.net.InetAddress.getAllByName(InetAddress.java:1127) [rt.jar:1.8.0_275]
 at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) [httpclient-4.5.11.jar:4.5.11]


In this case the VNA server could not even resolve the meraki api servers name. The plugin should have used the proxy settings in the config.

Environment

Release : 20.2.x

Component : Virtual Network Assurance For CA Spectrum

Resolution


This is resolved in the VNA 21.2.1 with an updated meraki plugin