Overview
Sometimes, you may encounter a situation when the Kerio Connect Chat feature is not working properly in Webmail or Kerio Connect Client and the following error is displayed in the logs:
[21/Jan/2020 05:54:38] StdErrChannel.cpp: XMPP Server [external]: [40] IM Bridge: Error while processing xmpp packet, service will be restarted. (IMBridge.processPacketForIM): org.jabsorb.client.ErrorResponse: JSONRPC error code 0: Caused by Cannot create PoolableConnectionFactory (Failed to start database 'M:\MailServer\store\im\databases\im-all' with class loader sun.misc.Launcher$AppClassLoader@33909752, see the next exception for details.) at com.kerio.im.im.ImJsonRpcClient.processException(ImJsonRpcClient.java:220) at com.kerio.im.im.ImJsonRpcClient.processJsonRequest(ImJsonRpcClient.java:176) at com.kerio.im.im.ImJsonRpcClient.invokeImpl(ImJsonRpcClient.java:145) at com.kerio.im.im.ImJsonRpcClient.invoke(ImJsonRpcClient.java:102) at com.sun.proxy.$Proxy22.setPresence(Unknown Source) at com.kerio.im.im.ImApi.setPresence(ImApi.java:157) at com.kerio.im.im.UserImClientImpl.setPresence(UserImClientImpl.java:29) at com.kerio.im.tigase.bridge.IM.IMConnection.connect(IMConnection.java:231) at com.kerio.im.tig
This article describes the process of resolving this issue.
Prerequisites
Admin (root) access to the Kerio Connect server
Root Cause
The Instant Messaging (IM) folder cannot be created because of incorrect permissions and a broken configuration file (mailserver.cfg).
Process
-
Stop Kerio Connect on your Windows, macOS, or Linux Server.
-
Navigate to the Kerio Connect installation folder. The default folders are:
- Windows:
C:\Program Files\Kerio\MailServer
- macOS:
/usr/local/kerio/mailserver
- Linux:
/opt/kerio/mailserver
- Windows:
-
Open mailserver.cfg and locate the
StorePath
variable in theInstantMessaging
andWebIM
tables as shown in the following example:<table name="InstantMessaging">
<variable name="Port">4042</variable>
<variable name="MaxMemorySize">128</variable>
<variable name="Enabled">1</variable>
<variable name="Federation">0</variable>
<variable name="RosterMaximum">300</variable>
<variable name="RosterRefreshPeriod">900</variable>
<variable name="StartServiceTimeout">180</variable>
<variable name="MessageSentTimeout">120</variable>
<variable name="ResponseReceiveTimeout">180</variable>
<variable name="InitialConnectionTimeout">180</variable>
<variable name="ArchiveFileSize">50</variable>
<variable name="StorePath">C:\Program Files (x86)\Kerio\MailServer\store/xmpp</variable>
<variable name="JvmOptions"></variable>
</table>
<table name="WebIM">
<variable name="Port">4043</variable>
<variable name="MaxMemorySize">256</variable>
<variable name="Enabled">1</variable>
<variable name="StartServiceTimeout">180</variable>
<variable name="ShutdownServiceTimeout">300</variable>
<variable name="StorePath">M:\MailServer\store/im</variable>
<variable name="ServiceIpAddress"></variable>
</table> -
Modify the
StorePath
variable to reflect the correct disk folder. For the example mentioned above, the correct folder isC:\Program Files (x86)\Kerio\MailServer\store/im
.Note: It is recommended to store XMPP and IM folders in the same parent folder, for example
C:\Program Files (x86)\Kerio\MailServer\store
, so that permissions for all folders remain the same. -
Start Kerio Connect on your Windows, macOS, or Linux Server.
Verification
Log in to Webmail or Kerio Connect Client and ensure that the chat feature is working correctly.