Running Tigase Error

Submitted by Anonymous on Wed, 2007-05-16 16:10.

New installation with jdk1.6.0_01 on Fedora4 workstation. When running tigase.sh run getting Java exception java.lang.NoClassDefFoundError: tigase/server/XMPPServer. I'm rusty on Java errors.
Thanks in Advance
ESJHJ

Trackback URL for this post:

http://www.tigase.org/en/trackback/1257
kobit's picture
Submitted by kobit on Wed, 2007-05-23 09:04.

Yes, indeed, backslashes are used on Microsoft systems. On Linux and other unixes forward slash is used in file system paths.

That was so obvious to me that I didn't notice you use backslash.

Anyway, I wonder how did it get to your config file? Have you manually edited you XML config file or maybe the config file has been generated in Windows??


Submitted by diamamp (not verified) on Wed, 2007-05-23 08:54.

hello,

3 day ago, I posted message about starting tigase server with my own config file. my problem was :

Can not initialize SSL library: java.io.FileNotFoundException: certs\rsa-keystore (No such file or directory)
2007-05-19 16:38:55 SSLContextContainer.init() SEVERE: Can not initialize SSL libraryjava.io.FileNotFoundException: certs\rsa-keystore (No such file or directory)

the problem caused by "\"=5C (ASCII character) in my config file,then the Linux OS supposed that file certs\rsa-keystore dont exits.

thank you for your help.

kobit's picture
Submitted by kobit on Sun, 2007-05-20 07:59.

In Java usually the first line of the exception gives useful information for non-developer user.

In your case it says:
Can not initialize SSL library: java.io.FileNotFoundException: certs\rsa-keystore (No such file or directory)

You didn't say anything about server version you use or package you installed from. The thing is that this file: certs\rsa-keystore is included in each binary package and it is also available in SVN repository.

So this problem usually happens when you start the server from different them TIGASE_HOMS directory. This is known problem with tigase.sh script and will be fixed in next version.

For now I would recommend to start the script from TIGASE_HOME directory as a workaround. Example command:

cd /opt/tigase-server
./bin/tigase.sh start etc/tigase.conf

Alternatively you could take the last, fixed version of the script and copy it to your installation:
tigase.sh

There are also operating system startup scripts for Gentoo Linux in SVN repository. These scripts properly start the Tigase at machine startup time and shutdown it when needed. They are very simple so it should be quite easy to adjust them for Suse I guess.


Submitted by diamamp (not verified) on Sat, 2007-05-19 17:20.

Hello,
i have some problems to start tigase server on opensuse10.2
here it's the message error:

2007-05-19 16:38:53 MessageRouter.addRegistrator() INFO: Adding registrator: Configurator
2007-05-19 16:38:53 MessageRouter.addComponent() INFO: Adding component: Configurator
2007-05-19 16:38:53 Configurator.setupLogManager() WARNING: DONE
2007-05-19 16:38:54 Configurator.setupLogManager() WARNING: DONE
Can not initialize SSL library: java.io.FileNotFoundException: certs\rsa-keystore (No such file or directory)
2007-05-19 16:38:55 SSLContextContainer.init() SEVERE: Can not initialize SSL libraryjava.io.FileNotFoundException: certs\rsa-keystore (No such file or directory)

at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at tigase.io.SSLContextContainer.init(SSLContextContainer.java:92)
at tigase.io.SSLContextContainer.(SSLContextContainer.java:83)
at tigase.io.TLSUtil.configureSSLContext(TLSUtil.java:49)
at tigase.server.ConnectionManager.setProperties(ConnectionManager.java:230)
at tigase.server.xmppclient.ClientConnectionManager.setProperties(ClientConnectionManager.java:206)
at tigase.conf.Configurator.setup(Configurator.java:179)
at tigase.conf.Configurator.componentAdded(Configurator.java:149)
at tigase.conf.Configurator.componentAdded(Configurator.java:67)
at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:56)
at tigase.server.MessageRouter.addComponent(MessageRouter.java:287)
at tigase.server.MessageRouter.addRouter(MessageRouter.java:277)
at tigase.server.MessageRouter.setProperties(MessageRouter.java:375)
at tigase.conf.Configurator.setup(Configurator.java:179)
at tigase.conf.Configurator.componentAdded(Configurator.java:149)
at tigase.conf.Configurator.componentAdded(Configurator.java:67)
at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:56)
at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:270)
at tigase.server.MessageRouter.setConfig(MessageRouter.java:261)
at tigase.server.XMPPServer.main(XMPPServer.java:153)

I think my problem refer to SSL Library, but I can't resolve it.
I am here in order, to find some help please.

kobit's picture
Submitted by kobit on Fri, 2007-05-18 20:35.

Please remove XML config file and all log files and modify the last line in etc/tigase.conf file to:

TIGASE_OPTIONS="--gen-config-def --debug server "

And then start server again:
bin/tigase.sh start etc/tigase.conf

Try to register account with Jabber client of your choice.

The log file: logs/tigase-console.log may grow quite rapidly so please compress it and send it with your XML config file via email to address:
ajdev AT tigase.org

I will look at it and should be able to tell what is wrong.


Submitted by Anonymous (not verified) on Fri, 2007-05-18 18:19.

I did tell Tigase to create the xml file in the TigaseHome/etc directory.
I have attached the basic tigase.conf file and the contents of the log directory (with filenames created by Tigase). I'm not too worried today about the java errors created by config.sh. I will send them later today if possible or next Monday(I'm testing this at my company).

Have a Great weekend. I remember the pubs in the financial district near Tower Bridge. I can't get pints(on tap) of Kronenbourg (not sure of spelling) here across the pond in Connecticut or NY.

total 20
-rw-r--r-- 1 root root 12050 May 18 13:26 tigase.log.0
-rw-r--r-- 1 root root 0 May 18 09:49 tigase.log.0.lck
Names of log files created
Basic tigase.conf. I did tell Tigase to create the tigase-server.xml
file in the TigaseHome/etc directory.

[root@testlinux etc]# cat tigase.conf
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver"

JAVA_OPTIONS="${ENC} ${DRV} -server -Xms100M -Xmx100M "
TIGASE_CONFIG="/tigase-server-2.8.7-b437/etc/tigase-server.xml"
TIGASE_OPTIONS="--gen-config-def "
[root@testlinux etc]#

2007-05-18 09:49:22 Configurator.setupLogManager() WARNING: DONE
2007-05-18 09:49:22 MessageRouter.addRegistrator() INFO: Adding registrator: Configurator
2007-05-18 09:49:22 MessageRouter.addComponent() INFO: Adding component: Configurator
2007-05-18 09:49:22 Configurator.setupLogManager() WARNING: DONE
2007-05-18 09:49:22 MessageRouter.addRegistrator() INFO: Adding registrator: StatisticsCollector
2007-05-18 09:49:22 MessageRouter.addComponent() INFO: Adding component: StatisticsCollector
2007-05-18 09:49:22 MessageRouter.addRouter() INFO: Adding receiver: ClientConnectionManager
2007-05-18 09:49:22 MessageRouter.addComponent() INFO: Adding component: ClientConnectionManager
2007-05-18 09:49:23 MessageRouter.addRouter() INFO: Adding receiver: ServerConnectionManager
2007-05-18 09:49:23 MessageRouter.addComponent() INFO: Adding component: ServerConnectionManager
2007-05-18 09:49:23 MessageRouter.addRouter() INFO: Adding receiver: SessionManager
2007-05-18 09:49:23 MessageRouter.addComponent() INFO: Adding component: SessionManager
2007-05-18 09:49:24 XMLRepository.initRepository() WARNING: Can not open existing user repository file, creating new one, java.io.FileNotFoundException: user-repository.xml (No such file or directory)
2007-05-18 09:49:24 XMLDB.setupNewDB() INFO: Create empty DB.
2007-05-18 09:51:40 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1590" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:52:55 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1592" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:53:01 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1593" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:53:26 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1594" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:54:23 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1596" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:54:48 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1598" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 09:55:11 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1599" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 10:53:23 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1663" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 10:53:34 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1664" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 10:54:37 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1665" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 11:08:34 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1672" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 11:11:42 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1673" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 11:12:02 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1674" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 11:13:22 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1681" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>
2007-05-18 12:08:35 SessionManager.processCommand() INFO: Can not find resource connection for packet: to=null, from=null, data=<iq id="sess1" to="sess_man@testlinux" from="c2s@testlinux/128.100.4.20_5222_128.100.4.44_1686" type="set"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>

kobit's picture
Submitted by kobit on Fri, 2007-05-18 16:46.

Hm, that explain something...

First as you said you had to create logs/ directory was very surprising to me initially as this directory is included in package and should be created automatically.

Apparently you use zip package and as far as I know zip has that feature that it doesn't create empty directories by default.

What errors did you get when tried to use config.sh?
Anyway this is not the most convenient way to change configuration for the server. I would recommend to use config generators instead. Have a look at this article it should make config maintenance much easier.

And the last concern - default configuration allows to register account. I can't tell why it is not working for you. Normally I test the server with many different clients and find no problems.

I could help you more if you could give me your etc/tigase.conf file so I could regenerate your configuration and test it locally. If you could also send me logs/tigase-console.log log file I could tell you more what might be wrong with your configuration.


Submitted by Anonymous (not verified) on Fri, 2007-05-18 16:17.

I was getting discouraged so I created a logs directory, restarted the linux workstation, cleared all iptable rules (tried this a few times before) ran the command again very carefully and then saw the xml and log files. Tried running the config.sh script from the tigase home and was getting Java errors (want to configure with mySQL).

Another question is if I use the current configuration(AS IS) can I register a client using Miranda or pidgin ?

With Miranda if I try to register a new
user I get a connection lost error(at client), and in your log file it shows a can't find resource connection for packet to null from null from c2s host_5222_client_1686.

Sorry about all the basic questions? I did read your online docs first.
Thanks
ESJHJ

kobit's picture
Submitted by kobit on Thu, 2007-05-17 19:27.

You make modifications in file etc/tigase.conf but you don't use it.

Please read the following command carefully:


./bin/tigase.sh start etc/tigase.conf

You have to put the etc/tigase.conf file as a second parameter to tigase.sh script.

But it is strange indeed that the XML file hasn't been created....
It should be created automatically if it is not at server startup time. The only reason why it is not in etc/ directory might be that it is in different directory or the tigase process don't have enough permission to create file there.

You could look in log file: logs/tigase-console.log. There should be some information about attempting to create XML config file.


Submitted by Anonymous (not verified) on Thu, 2007-05-17 16:02.

Thanks it did work(I tried it yesterday but was getting confused because it never seems to create a tigase-server.xml file). I thought that maybe the error messages weren't being output to console.

I attached some output
[root@testlinux tigase-server-2.8.7-b437]# pwd
/tigase-server-2.8.7-b437
[root@testlinux tigase-server-2.8.7-b437]# export TIGASE_CONFIG=/tigase-server-2.8.7-b437/etc/tigase-server.xml
[root@testlinux tigase-server-2.8.7-b437]# ./bin/tigase.sh stop
Shutting down Tigase: 18176
[root@testlinux tigase-server-2.8.7-b437]# ./bin/tigase.sh start
Starting Tigase:
Tigase running pid=18230
[root@testlinux tigase-server-2.8.7-b437]# cd etc
[root@testlinux etc]# ll
total 8
-rw-r--r-- 1 root root 227 May 17 11:15 tigase.conf
[root@testlinux etc]# cat tigase.conf
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver"

JAVA_OPTIONS="${ENC} ${DRV} -server -Xms100M -Xmx100M "
TIGASE_CONFIG="/etc/tigase-server.xml"
TIGASE_OPTIONS="--gen-config-def "
[root@testlinux etc]# cd /etc
[root@testlinux etc]# ls *.xml
ls: *.xml: No such file or directory
[root@testlinux etc]# ll ti*.*
ls: ti*.*: No such file or directory
[root@testlinux etc]# echo $TIGASE_HOME
/tigase-server-2.8.7-b437
[root@testlinux etc]# cd /tigase-server-2.8.7-b437/etc
[root@testlinux etc]# ll
total 8
-rw-r--r-- 1 root root 227 May 17 11:15 tigase.conf
[root@testlinux etc]# vi tigase.conf
Here i added the /tigase-server-2.8.7-b437/etc/tigase-server.xml

[root@testlinux etc]# cd ..
[root@testlinux tigase-server-2.8.7-b437]# ./bin/tigase.sh restart
Shutting down Tigase: 18230
Starting Tigase:
Tigase running pid=18308
[root@testlinux tigase-server-2.8.7-b437]# cd etc
[root@testlinux etc]# ll
total 8
-rw-r--r-- 1 root root 252 May 17 11:33 tigase.conf
[root@testlinux etc]# cat tigase.conf
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver"

JAVA_OPTIONS="${ENC} ${DRV} -server -Xms100M -Xmx100M "
TIGASE_CONFIG="/tigase-server-2.8.7-b437/etc/tigase-server.xml"
TIGASE_OPTIONS="--gen-config-def "
[root@testlinux etc]#

kobit's picture
Submitted by kobit on Thu, 2007-05-17 14:12.

TIGASE_HOME in your case is:
/tigase-server-2.8.7-b437/

so please try this:

cd /tigase-server-2.8.7-b437
./bin/tigase.sh start

Or even better, there should be a file etc/tigase.conf
Have a look in this file and set basic parameters for your server and then:

cd /tigase-server-2.8.7-b437
rm -f logs/* etc/tigase-server.xml
./bin/tigase.sh start etc/tigase.conf

And then it should be ok.

Hopefully in next version the problem with starting Tigase from different directory will be fixed.


Submitted by Anonymous (not verified) on Thu, 2007-05-17 14:01.

Here is some output when I run tigase.sh Fedora 4 jdk1.6.0_01

[root@testlinux bin]# pwd
/tigase-server-2.8.7-b437/bin
[root@testlinux bin]# ./tigase.sh run
Can't find server configuration file.
Should be set in TIGASE_CONFIG variable
Creating new configuration file in location:
/tigase-server-2.8.7-b437/etc/tigase-server.xml
Running Tigase:
Exception in thread "main" java.lang.NoClassDefFoundError: tigase/server/XMPPServer

[root@testlinux bin]# pwd
/tigase-server-2.8.7-b437/bin
[root@testlinux bin]# cd ..
[root@testlinux tigase-server-2.8.7-b437]# ls
bin ChangeLog docs jars README tigase.sh
certs database etc libs README.html
[root@testlinux tigase-server-2.8.7-b437]# cd libs
[root@testlinux libs]# ll
total 672
-rw-r--r-- 1 root root 414553 May 8 10:21 jdbc-mysql.jar
-rw-r--r-- 1 root root 184176 May 8 10:21 pg73jdbc3.jar
-rw-r--r-- 1 root root 17128 May 8 10:21 tigase-utils.jar
-rw-r--r-- 1 root root 39501 May 8 10:21 tigase-xmltools.jar
[root@testlinux libs]#

Usage: ./tigase.sh {start|stop|run|restart|check} params-file.conf
[root@testlinux bin]# ./tigase.sh check
Checking arguments to Tigase:
TIGASE_HOME = /tigase-server-2.8.7-b437/bin
TIGASE_PARAMS =
TIGASE_CONFIG = /tigase-server-2.8.7-b437/bin/tigase-server.xml
TIGASE_RUN = tigase.server.XMPPServer -c /tigase-server-2.8.7-b437/bin/tigase-server.xml
TIGASE_PID = /var/run/tigase.pid
TIGASE_OPTIONS =
JAVA_OPTIONS =
JAVA = /usr/java/jdk1.6.0_01/bin/java
JAVA_CMD =
CLASSPATH = :/tigase-server-2.8.7-b437/bin/libs/*
TIGASE_CMD = /usr/java/jdk1.6.0_01/bin/java -cp :/tigase-server-2.8.7-b437/bin/libs/* tigase.server.XMPPServer -c /tigase-server-2.8.7-b437/bin/tigase-server.xml
TIGASE_CONSOLE_LOG = /dev/null
**I changed the TIGASE_CONFIG to the tig*/bin

Any help is appreciated.

Thanks in Advance
ESJHJ

kobit's picture
Submitted by kobit on Wed, 2007-05-16 16:24.

By default classpath for java points to libs/ directory (relative location) and if you execute tigase.sh outside tigase server installation directory it just can't find libraries.

I just discovered this a few days ago and new version of tigase.sh script changes current directory to TIGASE_HOME before it executes java. It usually soves the problem.
You can get new script version from svn repository:
tigase.sh

I have also added gentoo startup scripts for tigase server which are also available in SVN:
gentoo

I believe it should be quite easy to adapt them to any other Linux distribution.

All these new stuff will be included in next version.

Let me know if you still have any problems...


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.