Tigase XMPP Server Board

Installation and maintenance: Cluster Configuration Not Working

Thu, 02/04/2016 - 02:00

Our current cluster configuration works perfectly. We are trying to setup tigase in a new environment (in aws), tigase works but cluster nodes are not recognised. cluster_nodes are empty, PSI service discovery doesn't return any cluster nodes. I have attached our configuration and log below. Please advice. We use tigase 7.0.0.

init.properties :

config-type = --gen-config-def --virt-hosts = im.domain --user-db-uri = xxxxxxxxxxxxxxxx --user-db = mysql --admins = admin@im.domain --cluster-mode = true --cluster-nodes= ip-10-0-1-16.ap-southeast-1.compute.internal,ip-10-0-2-17.ap-southeast-1.compute.internal #(Note : When I remove this line, auto discovery also not working) --max-queue-size= 500000 --sm-plugins=+urn:xmpp:sm:3,-presence,+message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,-jabber:iq:roster,+roster-presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,-basic-filter,-domain-filter,-pep,-zlib,+jabber:iq:last --debug=server,cluster --comp-name-6 = http --comp-name-5 = push --comp-name-4 = pubsub --comp-name-3 = message-archive --comp-name-2 = proxy --comp-name-1 = ext --comp-class-1 = tigase.server.ext.ComponentProtocol --external=muc.im.domain:tigase:listen:5270 --comp-class-3 = tigase.archive.MessageArchiveComponent --comp-class-2 = tigase.socks5.Socks5ProxyComponent --comp-class-4 = tigase.pubsub.PubSubComponent --comp-class-5 = com.ncs.onechat.PushComponent --comp-class-6 = tigase.http.HttpMessageReceiver

LOG (10.0.1.16) :

2016-02-04 17:25:32.560 [scheduler_pool-5-thread-1-cl-comp] ConnectionManager$1.run() FINE: Reconnecting service for component: cl-comp, to remote host: ip-10-0-2-17.ap-southeast-1.compute.internal on port: 5277 2016-02-04 17:25:32.560 [scheduler_pool-5-thread-1-cl-comp] ConnectionManager$1.run() FINE: Reconnecting service for component: cl-comp, to remote host: ip-10-0-2-17.ap-southeast-1.compute.internal on port: 5277 2016-02-04 17:25:32.562 [ConnectionOpenThread] ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null, port_props: {socket=plain, port-no=5277, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@2f9bc4ca, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@1b94c231, sessionID=7a079e53-d2af-4435-80e2-39ba0894b917, local-host=ip-10-0-1-16.ap-southeast-1.compute.internal, secret=5afd0245d0884704b987d31d6c324feec661b6bd7972fb6ee7283348be305802, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@28688f7b, type=connect, max-reconnects=99999999} 2016-02-04 17:25:32.604 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[cl-comp]] Connection started: null, type: connect, Socket: nullSocket[addr=ip-10-0-2-17.ap-southeast-1.compute.internal/10.0.2.17,port=5277,localport=33149], jid: null 2016-02-04 17:25:32.604 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cluster connection opened: 10.0.2.17, type: connect, id=10.0.1.16_33149_10.0.2.17_5277 2016-02-04 17:25:32.604 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cid: null, sending: <stream:stream xmlns='tigase:cluster' xmlns:stream='http://etherx.jabber.org/streams' from='ip-10-0-1-16.ap-southeast-1.compute.internal' to='ip-10-0-2-17.ap-southeast-1.compute.internal'> 2016-02-04 17:25:32.604 [ConnectionOpenThread] ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null, port_props: {socket=plain, port-no=5277, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@13a0abcf, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@196fad1a, sessionID=0e30a0bb-000e-4c51-b5b2-282e968bdf1e, local-host=ip-10-0-1-16.ap-southeast-1.compute.internal, secret=5afd0245d0884704b987d31d6c324feec661b6bd7972fb6ee7283348be305802, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@454d6695, type=connect, max-reconnects=99999999} 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClConSQLRepository.reload() FINEST: Last reload performed in 43, skipping: 2016-02-04 17:25:32.605 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[cl-comp]] Connection started: null, type: connect, Socket: nullSocket[addr=ip-10-0-2-17.ap-southeast-1.compute.internal/10.0.2.17,port=5277,localport=33150], jid: null 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cluster connection opened: 10.0.2.17, type: connect, id=10.0.1.16_33150_10.0.2.17_5277 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cid: null, sending: <stream:stream xmlns='tigase:cluster' xmlns:stream='http://etherx.jabber.org/streams' from='ip-10-0-1-16.ap-southeast-1.compute.internal' to='ip-10-0-2-17.ap-southeast-1.compute.internal'> 2016-02-04 17:25:32.605 [ConnectionOpenThread] ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null, port_props: {type=accept, socket=plain, ifc=[Ljava.lang.String;@e8fb7a8, remote-host=localhost, required=false, port-no=5277} 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClConSQLRepository.reload() FINEST: Last reload performed in 43, skipping: 2016-02-04 17:25:32.605 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[cl-comp]] Connection started: null, type: accept, Socket: nullSocket[addr=/10.0.2.17,port=49058,localport=5277], jid: null 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cluster connection opened: 10.0.2.17, type: accept, id=10.0.1.16_5277_10.0.2.17_49058 2016-02-04 17:25:32.605 [ConnectionOpenThread] ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null, port_props: {type=accept, socket=plain, ifc=[Ljava.lang.String;@e8fb7a8, remote-host=localhost, required=false, port-no=5277} 2016-02-04 17:25:32.605 [ConnectionOpenThread] ClConSQLRepository.reload() FINEST: Last reload performed in 43, skipping: 2016-02-04 17:25:32.606 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[cl-comp]] Connection started: null, type: accept, Socket: nullSocket[addr=/10.0.2.17,port=49059,localport=5277], jid: null 2016-02-04 17:25:32.606 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted() INFO: cluster connection opened: 10.0.2.17, type: accept, id=10.0.1.16_5277_10.0.2.17_49059 2016-02-04 17:25:32.625 [pool-18-thread-9] ClusterConnectionManager.xmppStreamOpened() INFO: Stream opened: {to=ip-10-0-1-16.ap-southeast-1.compute.internal, xmlns:stream=http://etherx.jabber.org/streams, from=ip-10-0-2-17.ap-southeast-1.compute.internal, xmlns=tigase:cluster}, service: null, type: accept, Socket: nullSocket[addr=/10.0.2.17,port=49058,localport=5277], jid: null 2016-02-04 17:25:32.625 [pool-18-thread-9] ClusterConnectionManager.updateConnectionDetails() FINEST: ClusterRepoItem: null, port_props: {port-no=5277, socket=plain, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@42a1b124, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@574d4a9, sessionID=91a674f9-863f-41bd-8d4b-f9b42870c94d, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@e8fb7a8, type=accept, required=false, max-reconnects=0} 2016-02-04 17:25:32.626 [pool-18-thread-2] ClusterConnectionManager.xmppStreamOpened() INFO: Stream opened: {to=ip-10-0-1-16.ap-southeast-1.compute.internal, xmlns:stream=http://etherx.jabber.org/streams, from=ip-10-0-2-17.ap-southeast-1.compute.internal, xmlns=tigase:cluster}, service: null, type: accept, Socket: nullSocket[addr=/10.0.2.17,port=49059,localport=5277], jid: null 2016-02-04 17:25:32.626 [pool-18-thread-2] ClusterConnectionManager.updateConnectionDetails() FINEST: ClusterRepoItem: null, port_props: {port-no=5277, socket=plain, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@71283984, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@7d84326, sessionID=a56a56c8-5314-4acf-8625-5693c7349897, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@e8fb7a8, type=accept, required=false, max-reconnects=0} 2016-02-04 17:25:32.627 [pool-18-thread-6] ConnectionManager.serviceStopped() FINER: [[cl-comp]] Connection stopped: null, type: accept, Socket: nullSocket[unconnected], jid: null 2016-02-04 17:25:32.627 [pool-18-thread-6] ClusterConnectionManager.serviceStopped() FINEST: serviceStopped: result=true / size=0 / connPool={ip-10-0-2-17.ap-southeast-1.compute.internal=[]} / serv=null, type: accept, Socket: nullSocket[unconnected], jid: null / conns=[] / type=accept 2016-02-04 17:25:32.627 [pool-18-thread-4] ClusterConnectionManager.xmppStreamOpened() INFO: Stream opened: {id=1607f9af-4556-4cd9-8895-fd4f236c8357, to=ip-10-0-1-16.ap-southeast-1.compute.internal, xmlns:stream=http://etherx.jabber.org/streams, from=ip-10-0-2-17.ap-southeast-1.compute.internal, xmlns=tigase:cluster}, service: null, type: connect, Socket: nullSocket[addr=ip-10-0-2-17.ap-southeast-1.compute.internal/10.0.2.17,port=5277,localport=33149], jid: null 2016-02-04 17:25:32.627 [pool-18-thread-4] ConnectionManager.serviceStopped() FINER: [[cl-comp]] Connection stopped: null, type: connect, Socket: nullSocket[unconnected], jid: null 2016-02-04 17:25:32.627 [pool-18-thread-4] ClusterConnectionManager.serviceStopped() FINEST: serviceStopped: result=true / size=0 / connPool={ip-10-0-2-17.ap-southeast-1.compute.internal=[]} / serv=null, type: connect, Socket: nullSocket[unconnected], jid: null / conns=[] / type=connect 2016-02-04 17:25:32.627 [pool-18-thread-4] ConnectionManager.reconnectService() FINER: Reconnecting service for: cl-comp, scheduling next try in 5secs, cid: null@null, props: {port-no=5277, socket=plain, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@6499fc57, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@3985e75a, sessionID=1607f9af-4556-4cd9-8895-fd4f236c8357, local-host=ip-10-0-1-16.ap-southeast-1.compute.internal, secret=5afd0245d0884704b987d31d6c324feec661b6bd7972fb6ee7283348be305802, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@28688f7b, type=connect, max-reconnects=99999999} 2016-02-04 17:25:32.628 [pool-18-thread-5] ClusterConnectionManager.xmppStreamOpened() INFO: Stream opened: {id=4c72de96-b70e-4691-bc38-da4e097dd64f, to=ip-10-0-1-16.ap-southeast-1.compute.internal, xmlns:stream=http://etherx.jabber.org/streams, from=ip-10-0-2-17.ap-southeast-1.compute.internal, xmlns=tigase:cluster}, service: null, type: connect, Socket: nullSocket[addr=ip-10-0-2-17.ap-southeast-1.compute.internal/10.0.2.17,port=5277,localport=33150], jid: null 2016-02-04 17:25:32.628 [pool-18-thread-7] ConnectionManager.serviceStopped() FINER: [[cl-comp]] Connection stopped: null, type: accept, Socket: nullSocket[unconnected], jid: null 2016-02-04 17:25:32.628 [pool-18-thread-7] ClusterConnectionManager.serviceStopped() FINEST: serviceStopped: result=true / size=0 / connPool={ip-10-0-2-17.ap-southeast-1.compute.internal=[]} / serv=null, type: accept, Socket: nullSocket[unconnected], jid: null / conns=[] / type=accept 2016-02-04 17:25:32.628 [pool-18-thread-5] ConnectionManager.serviceStopped() FINER: [[cl-comp]] Connection stopped: null, type: connect, Socket: nullSocket[unconnected], jid: null 2016-02-04 17:25:32.628 [pool-18-thread-5] ClusterConnectionManager.serviceStopped() FINEST: serviceStopped: result=true / size=0 / connPool={ip-10-0-2-17.ap-southeast-1.compute.internal=[]} / serv=null, type: connect, Socket: nullSocket[unconnected], jid: null / conns=[] / type=connect 2016-02-04 17:25:32.628 [pool-18-thread-5] ConnectionManager.reconnectService() FINER: Reconnecting service for: cl-comp, scheduling next try in 5secs, cid: null@null, props: {port-no=5277, socket=plain, service-connected-task-future=tigase.cluster.ClusterConnectionManager$ServiceConnectedTimerTask@617e337, remote-host=ip-10-0-2-17.ap-southeast-1.compute.internal, routing-table=[Ljava.lang.String;@a463301, sessionID=4c72de96-b70e-4691-bc38-da4e097dd64f, local-host=ip-10-0-1-16.ap-southeast-1.compute.internal, secret=5afd0245d0884704b987d31d6c324feec661b6bd7972fb6ee7283348be305802, hostname-key=ip-10-0-2-17.ap-southeast-1.compute.internal, ifc=[Ljava.lang.String;@454d6695, type=connect, max-reconnects=99999999}
Categories: Tigase Forums

Installation and maintenance: RE: Users not seems in database when create user using Spark Client...

Thu, 02/04/2016 - 00:06

It would be really better for me if you can give some guideline for what to comment/disable in which files as i'm not much aware about this process.

It will be really surely appreciable.

Categories: Tigase Forums

Installation and maintenance: RE: Clarification required regarding Licensing policy

Wed, 02/03/2016 - 21:02

Ok, thanks. If I understand correctly,I need to submit the changed code to Tigase team once I am done (In my case the SQL scripts). Where can I do that? Could you please give me any link / document that explains the steps I need to follow while submitting the code.

Categories: Tigase Forums

Installation and maintenance: hostname requirements

Wed, 02/03/2016 - 14:53

When clustering, does Tigase require a Linux system hostname to be set to the FQDN?

There are responses in the forum stating the canonical name must be unique and the hostname must be resolvable in DNS.
My interpretation of this is Tigase will perform a getCanonicalbyHostName() or getHostbyName() to retrieve the FQDN. Thus, the requirement would be the system hostname must resolve in DNS and of course be unique. Not that the hostname=FQDN.

Other documentation states, "Please note the proper DNS configuration is critical for the cluster to work correctly. Make sure the 'hostname' command returns a full DNS name on each cluster node." This implies something different as hostname w/o options would only use gethostname(). Did they mean to say hostname -f or hostname --fqdn?

It would be very unusual for any application to require a system hostname be set to its FQDN.
Can someone please confirm that the following command output would be ok for a cluster node:
command hostname returns "node"
command "hostname -f" returns "node.domain.com"

Furthermore, if every node FQDN is defined in each node's /etc/hosts and /etc/nsswitch.conf is set to hosts: files then you wouldn't need the box registered in DNS, correct?

Categories: Tigase Forums

Installation and maintenance: RE: Clarification required regarding Licensing policy

Wed, 02/03/2016 - 08:37

You don't need to notify us about the changes Vijay, feel free to start!

Categories: Tigase Forums

Installation and maintenance: RE: Users not seems in database when create user using Spark Client...

Wed, 02/03/2016 - 02:32

Well user got registered correctly (you can check that in the database) but! You use following configuration (which requires more changes in the installer):
--sm-plugins=+message-archive-xep-0136,-jabber:iq:auth,-urn:ietf:params:xml:ns:xmpp-sasl,-urn:ietf:params:xml:ns:xmpp-bind,-urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,-jabber:iq:privacy,-jabber:iq:version,-http://jabber.org/protocol/stats,-starttls,+msgoffline,-vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,-pep,-zlib
which disables any authentication option with: -jabber:iq:auth,-urn:ietf:params:xml:ns:xmpp-sasl hence the problem with connecting. What's more - you are trying to use legacy jabber:iq:auth which is not recommended:
<iq xmlns="jabber:client" id="7368u-2" type="get"><query xmlns="jabber:iq:auth"><username>jignesh</username></query></iq>

I would suggest changing the configuration and either commenting out above line (prefix it with #) or enabling mentioned plugins (removing - prefix from entries).

Categories: Tigase Forums

Installation and maintenance: RE: Websockets at a certain port

Wed, 02/03/2016 - 01:37

Yes, you can configure any component to use any port, in case of websockets following configuration should be used (for encrypted WS):
ws2s/connections/ports[i]=80,443 ws2s/connections/443/socket=ssl ws2s/connections/443/type=accept

However please bare in mind, that under Linux there is a limitation in terms of ports you can use for processes run in the user account (i.e. ports greater than 1024). So you would have to either run Tigase as an server or use port forwarding (possibility to use iptables).

Categories: Tigase Forums

Installation and maintenance: RE: Clarification required regarding Licensing policy

Wed, 02/03/2016 - 01:14

Thank you Daniel Wisnewski and Artur Hefczyc. So my understanding is that, I can go ahead and make the required changes. Only thing is, I need to keep a document in the Tigase installation folder mentioning the changes to the database. Should I inform Tigase team also regarding the same? If "Yes" what is the procedure for that?

Thanks
Vijay

Categories: Tigase Forums

Installation and maintenance: RE: Clarification required regarding Licensing policy

Tue, 02/02/2016 - 21:42

Regardless you modify the Tigase source code or not, you customize the DB or not, you still have to obey the AGPLv3 license terms if you use Tigase with the AGPLv3 license. Modifications or lack of them to the software code does not change anything.

If you use Tigase with AGPLv3 license, please refer to the license terms and conditions for all the details related to allowed use. As for the question you asked, AGPLv3 license does not forbid you from modifying the software code or it's database. Just on the contrary, it encourages people to modify, improve and share the code.

Categories: Tigase Forums

Installation and maintenance: RE: Clarification required regarding Licensing policy

Tue, 02/02/2016 - 09:19

I do not believe that modifying the database is outside the licensing terms. Please keep a document handy with tigase (in the main directory is fine) mentioning the changes to the database in the directory to ensure if a copy is made somewhere, that it is not representative of the vanilla Tigase product.

Categories: Tigase Forums

Installation and maintenance: Websockets at a certain port

Tue, 02/02/2016 - 08:18

Hello
I need to implement websockets, on 80 and 443 ports using tigase.
Is it possible?

Categories: Tigase Forums

API and development: RE: How to get all the room members in the MUC module?

Tue, 02/02/2016 - 01:44

Hi!
I'm not sure what you exactly have in mind. MUC doesn't keeps list of all occupants joined to room in the past if now they are disconnected now. If user disconnects, then Server sends presence offline to MUC what is equals to leaving room, and MUC forgets about him.

But if you have members-only room, each occupant must be stored in MUC database with assigned affiliation. You can get it with tigase.muc.Room#getAffiliations (I know, very intuitive method name) and you can iterate over this list and check affiliation of each users with affiliation (tigase.muc.Room#getAffiliation(tigase.xmpp.BareJID)).

Please check XEP-0045 to see how affiliations works.

Categories: Tigase Forums

Installation and maintenance: Clarification required regarding Licensing policy

Mon, 02/01/2016 - 23:16

We are developing a web application that uses Tigase XMPP server (Running on MS SQL) for chat functionality. We have a unique requirement of updating our application database whenever an offline message is sent to a user. We plan to accomplish this by creating an AFTERINSERT Trigger for the table [msg_history] in Tigase XMPP database. Basically we want to customize tigase XMPP database by adding our own trigger.

We understand that Tigase is under AGPLv3 license. Does the licensing policy prevent us from customizing Tigase Database? Please note we are not planning to customize Tigase source code.

Regards,
Vijay

Categories: Tigase Forums

API and development: How to get all the room members in the MUC module?

Mon, 02/01/2016 - 04:51

We're adding a little functionality to send push notifications for MUC members that are offline/out of the room. We checked the MUC module code, and it's doing the following:

room.getOccupantsNicknames()

But I think that will only get us a list of the members currently in the room, and not all the members in the list, correct? How can we get a list of all the members belonging to that room, whether they are online or not?

Categories: Tigase Forums

Installation and maintenance: RE: Users not seems in database when create user using Spark Client...

Mon, 02/01/2016 - 02:36

Here, I attached complete log files.

Categories: Tigase Forums

Installation and maintenance: RE: Too many close_wait connections

Fri, 01/29/2016 - 02:43

Following line in your etc/init.properties file:
http/http/server-class=tigase.http.jetty.JettyStandaloneHttpServer
forces Tigase HTTP API Component to use Jetty HTTP Server as server responsible for accepting, processing and closing connections opened on port 8083 of your server.
This means that Jetty HTTP Server is not closing properly opened connections for some reason. To diagnose this issue I would suggest to enable debugging of Tigase HTTP API component and Jetty HTTP Server.

To enable debugging of Tigase HTTP API coponent you need to add following line to etc/init.properties file:
--debug=http

As for enabling debugging of Jetty HTTP Server I think you would need to use alternative loggers as described at https://projects.tigase.org/projects/tigase-server/wiki/Alternate_loggers_in_Tigase and properly configure logback.xml file.

Categories: Tigase Forums

API and development: RE: Connection time optimizations

Fri, 01/29/2016 - 02:15

It's "enabled" by default, i.e. it was never mandatory and simply advertised as possible in the stream futures.

Categories: Tigase Forums

API and development: RE: Connection time optimizations

Fri, 01/29/2016 - 01:51

Interesting Artur. Is it enabled per default or can it be enabled in the property file?

Categories: Tigase Forums

Installation and maintenance: RE: Too many close_wait connections

Fri, 01/29/2016 - 01:39

Did you have a chance to check provided details? Please help us with this.

Categories: Tigase Forums

Pages

Get in touch

We provide software products, consulting and custom development services

Tigase, Inc.
100 Pine Street, Suite 1250
San Francisco, CA 94111, USA
Phone: (415) 315 9771

Follow us on:

Twitter

Back to Top