High CPU usage by whois | CentOs 6

Umesh Awasthi asked:

I am not a server guy and currently maintaining a small server for my own needs (Development and testing).

I got a notification that my Server CPU usuage is around 99% from last 3+ hours.I know that this is quite personal site to me and I have never shared URL with anyone so just to check I installed htop and tried to find out root cause of this usuage and this is what I got from htop

enter image description here

I understand whois is for DNS lookup ,but I have not done any changes to server from last few days so how come this service just started eating up so much CPU.

Can any one help me to understand this issue?

My answer:

This is caused by a bug in jwhois, the whois client used in RHEL/CentOS.

It has been fixed in Fedora and RHEL 7, but apparently not in RHEL 6. I occasionally see it happen on my own systems where fail2ban is repeatedly calling whois. (I turned this off because I really don’t care about the whois for banned IPs.)

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.