Technology Errors

Cacti Graphs Not Displaying, [STDERR] sh: /usr/bin/rrdtool: No such file or directory

I was contacted by a client last week regarding a monitoring server they have deployed. One of the applications they have gathering data from this server is Cacti. Anyhow they were able to login to Cacti but the graphs were not displaying. After logging into the server, which is running CentOS Linux, I saw the error clearly in the Litespeed logs. Below I describe the error in more detail as well as how to resolve this problem if you run into it.

Technology Errors

LiteSpeed: [STDERR] /usr/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — lsapi (MissingSourceFile)

After restarting LiteSpeed on a server used to develop various Ruby applications there was an error in the LSWS logs. It should be pointed out that the below error was received after straightening out a Ruby installation problem that the server had. The issue was two versions of Ruby were installed with one being installed via source and the other being installed via the Yum Package Manager on this CentOS server. Once the Ruby installation issue was resolved I thought that Rubygems and all of the proper gems had been installed though that was not the case as explained in the below resolution.

Technology Insights

Configure LiteSpeed Web Server Logging Options

Most of the logging options for LiteSpeed web server are very basic and general however I wanted to detail them to help others make educated decisions when it comes to the logging configuration. There is one option I use outside of the normal log configurations which is configured in a tab other than the log tab under server configuration. Below I will explain all of the configuration options and provide examples of what I recommend for LiteSpeed.

The very first thing I do when configuring a new server is to modify the “Disable Initial Log Rotation” option from “Not Set” to Yes. The purpose of this option is to make the lsws log file directory a bit more manageable. The Disable Initial Log Rotation option will stop the error.log file from being rotated every time the server is restarted. If you are on a development server this might happen numerous times a day thus creating a mess in your log directory. Instead I only rotate the error.log file based on size as described in detail below.