Nov 6, 2019

Kubernetes nslookup on AWS


I had the following cluster of kubernetes 1.16.
3 Nodes, 1 master and 2 other workers.
Tried to do nslookup from the master to the 'kubernetes'

using the following : 

'kubectl exec -it busybox -- nslookup kubernetes'
(ip doesn't matter)

got this
Address 1:

nslookup: can't resolve 'kubernetes'
command terminated with exit code 1

What was it ? 
i was missing UDP rule in the security group of the instances. Allow traffic. Solved it. 


Kubernetes finding the leader


Following is a good way of finding the leader, usually also the master node.

kubectl get endpoints kube-scheduler -n kube-system -o yaml

Here is my example, taken from a k8s cluster i have created on AWS with 3 nodes, 1 master and 2 workers.

apiVersion: v1
kind: Endpoints
  annotations: '{"holderIdentity":"ip-172-31-15-105_805a03a9-0065-11ea-9ec9-060d741267c8","leaseDurationSeconds":15,"acquireTime":"2019-11-06T07:18:04Z","renewTime":"2019-11-06T07:38:49Z","leaderTransitions":2}'
  creationTimestamp: 2019-11-04T14:36:03Z
  name: kube-scheduler
  namespace: kube-system
  resourceVersion: "70343"
  selfLink: /api/v1/namespaces/kube-system/endpoints/kube-scheduler
  uid: 6db973fb-ff10-11e9-ab52-060d741267c8


Nov 3, 2019

Jun 16, 2019

Intellij update branch info

Hi All

I am not sure if it's a bug or this is the way it should work. But, i had an issue while my

git left side tool menu with the list of all my remotes and locals wasn't sync with the actual remote repository (bitbucket in my case).

To solve it, just need to do "git fetch" using the menu.

Solved the problem.

Hoped it helped.


Jun 6, 2019

socket.error: [Errno 110] DNS issue while installing cloudera agent connection timed out; no servers could be reached [AWS]

Recently i was installing cloudera cluster on aws ec2 instances  .

AWS setup which we had was having VPC without IGW R53 and we were  using site to site vpn connection

cloudera agent installation was failing  because cloudera uses "host -t PTR IP" command , while installing cloudera agent  and agent node should be able to reach cloudera manager server host via "host" command on port 7182

"host" command should work in order for cloudera installation to work 

Cloudera requires "host" and "nslookup" to work on all nodes.
cloudera  requires name resolution and a configuring /etc/hosts file.
See the following requirements document:

Procedure to install cloudera agent I see is that " from cloudera agent it should be able to reach scm server at serverIP:7182 " via below commands

Solution :
I had issue with my file /etc/resolv.conf , it dint have proper nameserver entry and this file was getting corrupt on every ec2 restart so i had to fix this file and disable NetworkManager  as below

make sure you are able to run below commands in your cloudera nodes and below command should not get stuck and must return output
"host -t PTR IP"
check  /etc/resolv.conf   should have correct nameserver entries
also try to run below command 
getent hosts 
Port 7182 should be allowed in security group

if you feel your server /etc/resolv.conf is getting corrupt on every restart of ec2 instance then do below

systemctl status  NetworkManager

systemctl stop  NetworkManager

systemctl disable NetworkManager

also your file on ec2 server /etc/sysconfig/network-scripts/ifcfg-eth0 must have  below parameters
DNS1=same nameserver IP as present in /etc/resolv.conf

Error description : 
Detecting Cloudera Manager Server...
BEGIN host -t PTR 1x.xx.xx.xx
;; connection timed out; no servers could be reached
END (1)
BEGIN which python
END (0)
BEGIN python -c 'import socket; import sys; s = socket.socket(socket.AF_INET); s.settimeout(5.0); s.connect((sys.argv[1], int(sys.argv[2]))); s.close();' 1x
.xx.xx.xx 7182
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 110] Connection timed out
END (1)

Jun 5, 2019

I can't see testng logs in my intellij console

Hi All,

Simple problem. Simple fix.
Validate that your project pom/gradle consist of log4j / slf4j and you aren't using the current logger.
If you have a log4j properties, or like i do the log4j2.xml file,

you need to change the root logger from info to debug for example.