Litespeed Not Resolving

Sometimes on Oracle Jeos Linux(or any Redhat based distro)  with Litespeed you may experience problems when scripts cannot resolve hosts. It seems there is connectivity to the remote destination and just resolving fails for curl or any DNS resolving requiring operation.

The most important log to check is:


There you may find something similar to:

2011-04-19 23:18:46.951 [STDERR] brk(0x2b2ac8720000)                     = 0x2b2ac8720000
2011-04-19 23:18:46.952 [STDERR] time(NULL)                              = 1303269526
2011-04-19 23:18:46.952 [STDERR] open("/etc/resolv.conf", O_RDONLY)      = -1 EACCES (Permission denied)
2011-04-19 23:18:46.952 [STDERR] futex(0x2b2ac86e2c24, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x2b2ac86e2c20, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
2011-04-19 23:18:46.952 [STDERR] rt_sigaction(SIGHUP, {0x2b2ab37a85b0, ~[RTMIN RT_1], SA_RESTORER, 0x2b2ab4377b10}, NULL, 8) = 0

As the bold log shows it seems that the webserver did not have access to the file containing the DNS servers. This is easily fixable with:

chmod 644 /etc/resolv.conf

Of course, your error may be different but troubleshooting it with a PHP shell script and monitoring closely the logs will help always.

blog comments powered by Disqus