Articles and guides

Kernel EDAC errrors

Below are some errrors that are appearing in the /var/log/messages of a server:

kernel: EDAC MC0: CE page 0x4eea2, offset 0xe80, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xc80, grain 128, syndrome 0x23, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xf00, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xc80, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xd80, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xc00, grain 128, syndrome 0x23, row 0, channel 0, label "": i3000 CE

kernel: EDAC MC0: CE page 0x4eea2, offset 0xe80, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE
kernel: EDAC MC0: CE page 0x4eea2, offset 0xf00, grain 128, syndrome 0x8f, row 0, channel 0, label "": i3000 CE

Lighttpd max FDS

If you run a very busy lighttpd you may get the following:

(network_linux_sendfile.c.143) open failed: Too many open files
(connections.c.606) connection closed: write failed on fd 588
(network_linux_sendfile.c.143) open failed: Too many open files
(connections.c.606) connection closed: write failed on fd 782
(network_linux_sendfile.c.143) open failed: Too many open files
(connections.c.606) connection closed: write failed on fd 782
(network_linux_sendfile.c.143) open failed: Too many open files
(connections.c.606) connection closed: write failed on fd 782

You should increase the file descriptors that lighttpd can used (put into the lighttpd.conf):

server.max-fds = 8192

You may also want to increase the max-workers (also goes into the lighttpd.conf):
http://redmine.lighttpd.net/wiki/lighttpd/Docs%3AMultiProcessor

server.max-worker = 8

This is going to make 8 threads, so depending on your exact setup you may wish to increase or decrease the value.

Centos 5.3 yum iniparse breaking

Following upgrading to CentOS 5.3 the following error was encountered with yum:

# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named iniparse

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Jan 21 2009, 01:11:33)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

It turns out the python-iniparse rmp was for some reason not installed correctly. I ended up having to --force it but that fixed it.

Mytop error in option spec long|! with RHEL or CentOS 5.3

Mytop has started to break recently when upgrading from RHEL or CentOS 5.x to 5.3. It appears that some of the perl modules have change.d

There error is:
#mytop
Error in option spec: "long|!"

The fix for this is to edit the mytop script and comment out the line containing long|!

pico /usr/bin/mytop

Run a search for long|! and comment out the following line:

"long|!" => \$config{long_nums},

Start mytop and you should be fine!

rtorrent compile errors

While compiling libtorrent-0.12.2 and rtorrent-0.8.2 on CentOS 5 32 i386 the following error was obtained while compiling rtorrent.

checking for STUFF... configure: error: Package requirements (sigc++-2.0 libcurl >= 7.12.0 libtorrent >= 0.12.2) were not met:

No package 'libtorrent' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables STUFF_CFLAGS
and STUFF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

The fix was just sym-linking the libtorrent.pc file into the correct pkgconfig directory. Afterwards it compiled fine.

ln -s /usr/local/lib/pkgconfig/libtorrent.pc /usr/lib/pkgconfig/

Upgrade to OpenSSL 0.9.8j

DO THE BELOW AT YOUR OWN RISK. It worked fine for me on a CentOS 5 server and should be fine on any RH type system but if you mess up you may break ssh. Note that RH does keep up with security patches so this is not necessary but sometimes it is required.

cd /usr/local/src
wget http://www.openssl.org/source/openssl-0.9.8j.tar.gz
tar -zxf openssl-0.9.8j.tar.gz
cd openssl-0.9.8j
./config
make

cd /usr/local/src/
wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz

tar -zxf openssh-5.2p1.tar.gz
cd openssh-5.2p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/src/openssl-0.9.8j --with-pam --with-libs=-ldl --without-zlib-version-check
make

make install

Configserver mailscanner constant reload

After a MailScanner updates the following error was present:

Feb 25 14:50:14 server MailScanner: Process did not exit cleanly, returned 1 with signal 0

Previous to the update was a fresh install of MS in which it would start then immediately try to start again.

# /usr/mailscanner/bin/MailScanner --debug
In Debugging mode, not forking...
Trying to setlogsock(unix)
rules: failed to run CG_FUJI_JPG test, skipping:
(Can't locate object method "image_name_regex" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1607) line 1169.
)
rules: failed to run CG_DOUBLEDOT_GIF test, skipping:
(Can't locate object method "image_name_regex" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1607) line 1394.
)
rules: failed to run CG_SONY_JPG test, skipping:
(Can't locate object method "image_name_regex" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1607) line 2309.
)
rules: failed to run CG_CANON_JPG test, skipping:

Awstats geoip error

While running /scripts/runweblogs USERNAME the following error was generated:

About to fork for USERNAME [ALL DOMAINS: DOMAIN.com]
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Geo/IPfree.pm line 81.
Create/Update database for config "/home/USERNAME/tmp/awstats/awstats.DOMAIN.com.conf" by AWStats version 6.9 (build 1.925)

A downgrade of GeoIP to 0.2 solved this error:

cd /home/.cpan/sources
wget http://search.cpan.org/CPAN/authors/id/G/GM/GMPASSOS/Geo-IPfree-0.2.tar.... (external link)
tar -zxvf Geo-IPfree-0.2.tar.gz
perl Makefile.PL
make
make install

Bandwidthdb modules error

While running /scripts/runweblogs USERNAME the following was given:

(internal warning while parsing ) Wed Feb 25 09:42:57 2009 [5035] warn: Use of uninitialized value in modulus (%) at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 185.
at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 185
Cpanel::BandwidthDB::update('Cpanel::BandwidthDB=HASH(0x86be22c)', 'smtp', 'undef', 698) called at /usr/local/cpanel/Cpanel/Logd.pm line 1746
Cpanel::Logd::parseeximlog('USERNAME', 1073741824, 'HASH(0x86be0ac)', 'Cpanel::BandwidthDB=HASH(0x86be22c)') called at /usr/local/cpanel/Cpanel/Logd.pm line 645
Cpanel::Logd::updatebw('USERNAME', '/home/USERNAME', 32005, 'domain.com', 'unlimited', 'ARRAY(0x86b751c)') called at /usr/local/cpanel/libexec/cpanellogd line 179

/scripts/checkperlmodules

was able to correct the perl module error and let it run fine next time.

CSF install and perl errors

While installing csf sometimes it cannot find the UserAgent.pm

# ./install.generic.sh

Kernel binrpm-pkg error on compiling

While source compiling a kernel with make binrpm-pkg to generate an RPM the following error was encountered.

rpm --define "_builddir /usr/local/src/linux-2.6.27.10" --target x86_64 -bb /usr/local/src/linux-2.6.27.10/binkernel.spec
--target: unknown option

make[1]: *** [binrpm-pkg] Error 1
make: *** [binrpm-pkg] Error 2

The solution is simply install the rpm-build package within CentOS 5.x 64bit and most other linux OS.

Sphinx install problems

While doing a make on sphinx we got:

sphinx.cpp:16792: error: ‘m_pMysqlFields’ was not declared in this scope
sphinx.cpp:16793: error: ‘m_pMysqlResult’ was not declared in this scope
sphinx.cpp:16793: error: ‘mysql_fetch_fields’ was not declared in this scope
sphinx.cpp:16795: error: ‘m_pMysqlFields’ was not declared in this scope
make[2]: *** [sphinx.o] Error 1
make[2]: Leaving directory `/usr/local/src/sphinx-0.9.8.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/sphinx-0.9.8.1/src'
make: *** [all-recursive] Error 1

simply install mysql-devel rpm and should compile fine.

Welcome to the new page!

It has taken me awhile to get it up and running but I finally have released the new site! I went back and updated quiet a few of the older guides as well as the drupal back end that the site runs. It now runs the latest 5.x version which has all sorts of new features. The old site had a few problems on the back end but those should all be cleared up at this point and everything running smooth. I will also be trying to keep up with the posting on here to always have new and updated information.

Enjoy your stay!

John

Ensim X python upgrade problems

Ensim python upgrade problems:

If you end upgrading python when doing an overall system update you may start to obtain internal server errors on every page within the ensim control panel. To fix this you need to recompile the templates and restart ensim:

cd /usr/lib/ensim/frontend/kidpages/
/usr/bin/kidc -f *
service epld restart

That should fix it!

Here is the full error you may be receiving:

2007/08/29 06:33:49 HTTP INFO 127.0.0.1 - GET /isp/services/proftpd/index HTTP/1.1
2007/08/29 06:33:49 INFO Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 271, in run
main()
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File "/home/build/qa/saber/10.0.0/fc.4/13.fc.4/epl/pudasin13/build/build-root/epl/frontend/rootapp/isp/services/proftpd/__init__.py", line 20, in index

Redhat Enterprise / CentOS 3 compile mod_auth_mysql-3.0.0.

RHEL3 only provides a 2.x version of mod_auth_mysql which is not sufficient for all. If you try to compile it on a stock server it will fail. I have gone ahead and pasted the fix that we had to do in order to get it to compile. I also posted the entire error at the bottom for search engines.

Edit mod_auth_mysql.c, simply change to your correct path. The below is for a stock mysql3

#include /usr/include/mysql/mysql.h

You need to change the mysql include to the correct mysql.h, the default is what it causing the problems. After that it should compile with:

apxs -L/usr/lib/mysql -c -lmysqlclient -lm -lz mod_auth_mysql.c
apxs -i mod_auth_mysql.la
chmod 755 /usr/lib/httpd/modules/mod_auth_mysql.so

That should be it! Below is the full error:

mod_auth_mysql-3.0.0]# apxs -c mod_auth_mysql.c

Powered by Drupal - Theme created by Danger4k