Project

General

Profile

Tigase Start Up Time

Behnam Hatami
Added over 3 years ago

When I configure tigase to start jmx monitoring component, tigase start up time increase by 2 minute:

2015-09-22 09:21:15.796 [main]             ConfiguratorAbstract.parseArgs()   CONFIG:   Added default config parameter: (--amp-security-level=PERFORMANCE)
2015-09-22 09:21:15.796 [main]             ConfiguratorAbstract.parseArgs()   CONFIG:   Added default config parameter: (--admins=admin@divarbe.divar.ir)
2015-09-22 09:21:15.796 [main]             ConfiguratorAbstract.parseArgs()   CONFIG:   Added default config parameter: (--debug=server)
2015-09-22 09:21:15.796 [main]             ConfiguratorAbstract.parseArgs()   CONFIG:   Added default config parameter: (--monitoring=jmx:9050)
2015-09-22 09:21:15.906 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Installing monitoring services: jmx:9050
2015-09-22 09:21:15.908 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Loading JMX monitor.
2015-09-22 09:23:23.393 [main]             AbstractMessageReceiver.setMaxQueueSize()  FINEST: message-router maxQueueSize: 152,710, maxInQueueSize: 1,362, maxOutQueueSize: 305,420
2015-09-22 09:23:23.406 [main]             MessageRouter.addRegistrator()     INFO:     Adding registrator: Configurator
2015-09-22 09:23:23.406 [main]             MessageRouter.addComponent()       INFO:     Adding component: 
2015-09-22 09:23:23.407 [main]             ConfiguratorAbstract.componentAdded()  CONFIG:  component: basic-conf

is there any problem here?

I think in previous versions, this was not the case.


Replies (11)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

JMX uses RMI and this mechanism can have problem looking up local hostname hence long delay - you can set the hostname manually: https://projects.tigase.org/projects/tigase-server/wiki/JMX

Added by Behnam Hatami over 3 years ago

Hi, thanks for your reply.

I use

JMX_REMOTE_IP="-Djava.rmi.server.hostname=`ifconfig | grep -v '127.0.0.1' | sed -n 's/.*inet addr:\([0-9.]\+\)\s.*/\1/p' | head -1`"

for my jmx hostname configuration, but I encounter the problem. any idea why this happen?

Added by Behnam Hatami over 3 years ago

Hi,

Is there any one that help me with this problem?

2 minute down time in every restart is a large problem for us.

Added by Daniel Wisnewski IoT 1 Cloud over 3 years ago

Open up jConsole and see how much memory is being used by JVM, it is possible you are using up your global heap availability and Java needs to run garbage collection before it can continue loading.

Added by Behnam Hatami over 3 years ago

Well as I examined,

// start the connector server
connector.start();

block server for two minutes, and I insert log before this command and I get:

##### Heap utilization statistics [MB] #####
Used Memory:1310
Free Memory:30092
Total Memory:31403
Max Memory:58254

It's not even near garbage collection.

Added by Wojciech Kapcia TigaseTeam about 3 years ago

This is one of the quirks of JMX. You could try limiting the timeout with following property:

-Dsun.rmi.transport.tcp.localHostnameTimeOut=2000

(v. http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/faq.html)

Added by Behnam Hatami about 3 years ago

This configuration does not change any thing!

Added by Wojciech Kapcia TigaseTeam about 3 years ago

Can you try without explicit host configuration?

Added by Behnam Hatami about 3 years ago

There isn't any difference sadly.

Added by Wojciech Kapcia TigaseTeam about 3 years ago

Have you tried manually configuring IP (instead of regex)? Have you tried running this regex and can confirm that it produces valid result for you?

Added by Behnam Hatami about 3 years ago

This is the command that tigase run with and the reg-ex command figure out the ip correct, so I think setting IP manually does not effect the problem:

TIGASE_CMD          =    -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djdbc.drivers=org.postgresql.Driver -Djava.rmi.server.hostname=192.168.200.7 -Dsun.rmi.transport.tcp.localHostnameTimeOut=2000 -server  -Xms32G -Xmx64G  -XX:MaxDirectMemorySize=1g  -Dbosh-extra-headers-file=/etc/tigase/bosh-extra-headers.txt -Dclient-access-policy-file=/etc/tigase/client-access-policy.xml -Dcross-domain-policy-file=/etc/tigase/cross-domain-policy.xml -Dorg.jboss.logging.provider=jdk  -cp /usr/share/tigase/jars/bcprov-jdk16-1.46.jar:/usr/share/tigase/jars/classmate-1.1.0.jar:/usr/share/tigase/jars/common.jar:/usr/share/tigase/jars/el-api-2.2.jar:/usr/share/tigase/jars/el-impl-2.2.jar:/usr/share/tigase/jars/gcm-server-1.0.2.jar:/usr/share/tigase/jars/hamcrest-core-1.3.jar:/usr/share/tigase/jars/hibernate-validator-5.2.2.Final.jar:/usr/share/tigase/jars/ip-log-plugin.jar:/usr/share/tigase/jars/javapns-jdk16-2.3.1.jar:/usr/share/tigase/jars/javax.el-api-3.0.0.jar:/usr/share/tigase/jars/jboss-logging-3.2.1.Final.jar:/usr/share/tigase/jars/jdmkrt-1.0-b02.jar:/usr/share/tigase/jars/json-simple-1.1.1.jar:/usr/share/tigase/jars/junit-4.12.jar:/usr/share/tigase/jars/licence-lib.jar:/usr/share/tigase/jars/log4j-1.2.12.jar:/usr/share/tigase/jars/postgresql.jar:/usr/share/tigase/jars/push-component.jar:/usr/share/tigase/jars/registration-component.jar:/usr/share/tigase/jars/sms-component.jar:/usr/share/tigase/jars/tigase-extras-1.1.2-20151014.081927-254.jar:/usr/share/tigase/jars/tigase-message-archiving-1.2.0-SNAPSHOT.jar:/usr/share/tigase/jars/tigase-socks5.jar:/usr/share/tigase/jars/tigase-stats-collector-library.jar:/usr/share/tigase/jars/tigase-stats-collector-provider.jar:/usr/share/tigase/jars/validation-api-1.1.0.Final.jar:/usr/share/tigase/jars/tigase-server.jar tigase.server.XMPPServer  --property-file /etc/tigase/init.properties

    (1-11/11)