Hello list;
I have a problem with jabberd-2.1.22 and mysql.
I do installatiaon and configure sm.xml and c2s.xml files. When i execute
"./jabberd -D" with jabber user.
i get below error.
-------------------------------------------
ROUT: Tue Feb 5 19:03:25 2008 filter.c:51 loading filter
SM : Tue Feb 5 19:03:25 2008 [info] loading 'mysql' storage module
RSLV: sx (client.c:122) doing client init for sx 5
SM : Character set 'utf8' is not a compiled character set and is not
specified in the '/usr/share/mysql/charsets/Index' file
C2S : Tue Feb 5 19:03:25 2008 [notice] modules search path:
/usr/local/mailserver/jabberd/lib/jabberd
S2S : Tue Feb 5 19:03:25 2008 db.c:56 initialising dialback sx plugin
C2S : Tue Feb 5 19:03:25 2008 authreg_mysql.c:380 SQL to create account:
INSERT INTO `authreg` ( `username`, `realm` ) VALUES ( '%s', '%s' )
RSLV: Tue Feb 5 19:03:25 2008 [notice] connection to router established
ROUT: Tue Feb 5 19:03:25 2008 filter.c:96 building filter list
SM : Tue Feb 5 19:03:25 2008 [error] mysql: connection to database failed:
Can't initialize character set utf8 (path: /usr/share/mysql/charsets)
RSLV: sx (client.c:138) stream request: ns (null) to (null) from (null)
version 1.0
ERROR: sm died. Shutting down server.
JBRD: Got a signal... pass it on.
JBRD: It was a TERM. Shut it all down!
------------------------------------------
it seems that there is a problem with mysql connection, i know that jabber
work with utf8. there mysql must be configured so that it can allow utf8
connection.
i looked mysql configurations with
SHOW VARIABLES LIKE 'character_set%';
SHOW VARIABLES LIKE 'collation%';
commands and they gives below responses respectivgely
--------------------------------------------
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
-------------------------------------------
it seems that mysql accepts utf8 connections.
Then i do some changes in db-setup.mysql file.
i changed "CREATE DATABASE jabberd2"
to "CREATE DATABASE jabberd2 DEFAULT CHARSET=UTF8;"
but i see the same error message in the console.
I do google search nearly 5-6 hours. i see a lot of situation like i have
encountered, but there was no real solution. (Most of the items i found in
google were not related with jabberd but mysql itself)
I think that there is a mysql misconfiguration. However, i have nearly 10K
line perl code which communicates with the same mysql server with utf8 based
connection, and i did not see such an error message.
But when ai install jabberd and configure to work the same mysql server, i
encountered the aboce problem...
here are my mysql and jabberd configuration information
os platform : fedora core 4
jabberd version : 2.1.22
jabber confıgure options
-------------------
./configure --prefix=$rootdir/jabberd --enable-mysql=$rootdir/mysql
--enable-idn --enable-debug
--with-extra-include-path=$rootdir/mysql/include:$rootdir/openssl/include:$rootdir/libidn/include:$rootdir/gsasl/include
--with-extra-library-path=$rootdir/mysql/lib:$rootdir/openssl/lib:$rootdir/libidn/lib:$rootdir/gsasl/lib
------------------
jabberd sm.xml file content
--------------------------------
<sm>
<id>localhost</id>
<pidfile>/usr/local/mailserver/jabberd/var/jabberd/pid/sm.pid</pidfile>
<router>
<ip>10.0.0.119</ip> <!-- default: 127.0.0.1 -->
<port>5347</port> <!-- default: 5347 -->
<user>jabberd</user> <!-- default: jabberd -->
<pass>secret</pass> <!-- default: secret -->
<retry>
<init>3</init>
<lost>3</lost>
<sleep>2</sleep>
</retry>
</router>
<log type='syslog'>
<ident>jabberd/sm</ident>
<facility>local3</facility>
</log>
<storage>
<path>/usr/local/mailserver/jabberd/lib/jabberd</path>
<driver>mysql</driver>
<mysql>
<host>localhost</host>
<port>3306</port>
<dbname>jabberd2</dbname>
<user>jabberd2</user>
<pass>secret</pass>
<transactions/>
</mysql>
</storage>
<aci>
<acl type='all'>
<jid>[EMAIL PROTECTED]</jid>
</acl>
</aci>
.
.
.
</sm>
------------------
jabberd c2s.xml file content
------------------------
<c2s>
<id>c2s</id>
<pidfile>/usr/local/mailserver/jabberd/var/jabberd/pid/c2s.pid</pidfile>
<router>
<ip>10.0.0.119</ip> <!-- default: 127.0.0.1 -->
<port>5347</port> <!-- default: 5347 -->
<user>jabberd</user> <!-- default: jabberd -->
<pass>secret</pass> <!-- default: secret -->
<retry>
<init>3</init>
<lost>3</lost>
<sleep>2</sleep>
</retry>
</router>
<log type='syslog'>
<ident>jabberd/c2s</ident>
<facility>local3</facility>
</log>
<local>
<id register-enable='true'>localhost</id>
<ip>0.0.0.0</ip>
<port>5222</port>
</local>
<io>
<max_fds>1024</max_fds>
<limits>
<bytes>0</bytes>
<connects>0</connects>
<stanzasize>65535</stanzasize>
</limits>
<access>
<order>allow,deny</order>
</access>
<check>
<interval>0</interval>
<idle>0</idle>
<keepalive>0</keepalive>
</check>
</io>
<stats>
</stats>
<authreg>
<path>/usr/local/mailserver/jabberd/lib/jabberd</path>
<module>mysql</module>
<mechanisms>
<traditional>
<plain/>
<digest/>
</traditional>
<sasl>
<plain/>
<digest-md5/>
</sasl>
</mechanisms>
<ssl-mechanisms>
<traditional>
<plain/>
</traditional>
<sasl>
<plain/>
</sasl>
</ssl-mechanisms>
<mysql>
<host>localhost</host>
<port>3306</port>
<dbname>jabberd2</dbname>
<user>jabberd2</user>
<pass>secret</pass>
</mysql>
<pipe>
<exec>/usr/local/mailserver/jabberd/bin/pipe-auth.pl</exec>
</pipe>
</authreg>
</c2s>
-----------------------
mysql build type : it is a binary release
mysql version : 5.0.22-linux-i686
mysql my.cnf file content
-------------------------------------
[mysqld]
datadir=/usr/local/mailserver/mysql/data
socket=/usr/local/mailserver/mysql/var/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
character-sets-dir=/usr/share/mysql/charsets
character_set_server=utf8
default-character-set=utf8
[client]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysql.server]
user=mysql
basedir=/usr/local/mailserver/mysql
character-sets-dir=/usr/share/mysql/charsets
collation_server=utf8_unicode_ci
character_set_server=utf8
default-character-set=utf8
[mysqld_safe]
err-log=/usr/local/mailserver/mysql/var/mysqld.log
pid-file=/usr/local/mailserver/mysql/var/run/mysqld.pid
character-sets-dir=/usr/share/mysql/charsets
collation_server=utf8_unicode_ci
character_set_server=utf8
default-character-set=utf8
[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8
[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
[myisamchk]
character-sets-dir=/usr/share/mysql/charsets
[myisampack]
character-sets-dir=/usr/share/mysql/charsets
------------------------------------
there is a link named /var/lib/mysql/mysql.sock to
/usr/local/mailserver/mysql/var/mysql.sock
so that jabber can communicate with mysql.
I try everything but i could not solve the problem, i think that i can find
the answer here,
Best regards,
-halil agin