No Data in Analytics Dashboard -- a work around for DNS delay

book

Article ID: 185162

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

It's portal 4.2.9.3 hardened image, installed using offline installer.  Published portal published apis, tested it few times and checked the analytics dashboard.

It shows No data. the jarvis container log shows, 

Failed to send document back to kafka:org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server 'zookeeper1:2181' with timeout of 8000 ms

 

Cause

  • Test the DNS delay by following command,

     docker exec -it -u 0 $(docker ps --filter name=portal_dispatcher -q) /bin/bash -c "time nslookup zookeeper1 127.0.0.11"


    It shows the DNS delay is about 10 seconds

  • The delay is the same by default /etc/resolv.conf settings, or by comment out every line in /etc/resolv.conf
  • As it is longer than 8 seconds, the Jarvis is not working

Environment

Release : 4.2.9.3

Component : API PORTAL

Resolution

Add following line to /etc/resolv.conf will fix the problem,

options timeout:1 attempts:1


(The default value of timeout is 5 seconds, and attempts is 2, that's why it has 10 seconds delay)

Additional Information

https://linux.die.net/man/5/resolv.conf