Apache HTTPD takes long time to start due to incorrect DNS name setup in /etc/hosts file.
Issue
- Apache HTTPD takes long time to start, it starts writing the logs in error_log approximately after 2 minutes.
- Below is the pstack trace seen following the [steps to identify hanging threads] (https://access.redhat.com/solutions/319673) during the time it was starting :
#0 0x00007fa5af683a20 in __poll_nocancel () from /lib64/libc.so.6
#1 0x00007fa5a35c9d64 in __libc_res_nsend () from /lib64/libresolv.so.2
#2 0x00007fa5a35c7c5e in __libc_res_nquery () from /lib64/libresolv.so.2
#3 0x00007fa5a35c8840 in __libc_res_nsearch () from /lib64/libresolv.so.2
#4 0x00007fa5a0c5dbe3 in _nss_dns_gethostbyname4_r () from /lib64/libnss_dns.so.2
#5 0x00007fa5af673ed8 in gaih_inet () from /lib64/libc.so.6
#6 0x00007fa5af6775cd in getaddrinfo () from /lib64/libc.so.6
#7 0x00007fa5afd9604c in call_resolver.isra.0 () from /lib64/libapr-1.so.0
#8 0x00005559944fd14f in ap_get_local_host ()
#9 0x00005559944f9e83 in ap_fini_vhost_config ()
#10 0x00005559944f7e46 in main ()
Environment
- Red Hat Enterprise Linux
- 6.x, 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.