Skip to main content

error: Could not open Tokyo database at path (OpenTokyoDatabase: invalid record header)

I run my server out of space and after that I got these messages when running cf-agent:

error: Could not open Tokyo database at path '/var/cfengine/cf_classes.tcdb'. (OpenTokyoDatabase: invalid record header)
error: Could not write key to Tokyo path '/var/cfengine/state/cf_lock.tcdb'. (tchdbput: invalid record header)

To solve this problem first run these commands:

ls /var/cfengine/*.tcdb |xargs -n1 tchmgr optimize
ls /var/cfengine/**/*.tcdb |xargs -n1 tchmgr optimize

If the problem persists remove the tcdb files and restart cfengine:

# rm /var/cfengine/state/cf_lock.tcdb
rm /var/cfengine/state/cf_observations.tcdb
rm /var/cfengine/cf_classes.tcdb
/etc/init.d/cfengine restart

There is an open issue in Cfengine 3 community

Apache log: (22)Invalid argument: couldn’t grab the accept mutex

Some days ago I saw these messages in the apache error log in a cpanel server, the virtualhost was getting a 500 error:

[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn't grab the accept mutex

To solve this issue, edit /usr/local/apache/conf/includes/pre_virtualhost_global.conf file and add the following line:

AcceptMutex posixsem

Then restart apache

/etc/init.d/httpd graceful

According to Apache documentation, the AcceptMutex directives sets the method that Apache uses to serialize multiple children accepting requests on network sockets.

To read more see AcceptMutex Directive documentation

Installing Intel Raid Web Console 2 on Ubuntu

Intel has a linux compiled version for RedHat based systems in the download center, but it can be installed on Debian based systems too.

First download the linux version for your architecture using the link above and unzip the zip file to a specific folder.

$ mkdir raid_web_console
$ unzip -d ir3_Linux_x86_RWC2_v13.04.03.01_r2.zip -d raid_web_console

Now, we are going to install alien tool to convert rpm packages to deb packages.

$ sudo apt-get install alien

cd into raid_web_console directory and convert rpm files to deb.

$ alien --scripts Lib_Utils2-1.00-02.noarch.rpm
$ alien --scripts RAID_Web_Console_2-13.04.03-01.noarch.rpm
$ alien --scripts sas_ir_snmp-13.04-0301.i386.rpm
$ alien --scripts sas_snmp-13.04-0301.i386.rpm

And finally install new deb files

$ sudo dpkg -i *.deb

And that’s all, now, you can launch the console using this command:

$ /usr/local/RAID\ Web\ Console\ 2/startupui.sh &

slapd[20001]: <= bdb_equality_candidates: (mail) not indexed

This message is showed because the ldap server does not have mail attribute indexed.
To create an index for that attribute create a file with this content:

file mail_add_index.ldif

dn: olcDatabase={1}hdb,cn=config
add: olcDbIndex
olcDbIndex: mail eq,sub

Now, simply add the index with the following command:

# ldapmodify -Y EXTERNAL -H ldapi:/// -f mail_add_index_ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={1}hdb,cn=config"

Notice: Undefined variable: wp_sh_class_name in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1002

Notice: Undefined variable: wp_sh_class_name in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1002

Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048