Tigase XMPP Server Board

Tigase server development: RE: Impossible happened :)

Wed, 01/21/2015 - 02:56

OK, I may have an idea what's going on. Please note, that this is a command packet and the impossible happened stem from the fact that the command packets are addressed completely to session manager, which doesn't have connectionId which triggers the issues. Now, before processing in tigase.server.xmppsession.SessionManager.processPacket(tigase.server.Packet, tigase.xmpp.XMPPResourceConnection) takes place, first packet is checked for being a command in tigase.server.xmppsession.SessionManager.processPacket(tigase.server.Packet)
if (packet.isCommand() && processCommand(packet)) { packet.processedBy("SessionManager"); return; }

Now, you've modified the tigase.server.xmppsession.SessionManager.processCommand(tigase.server.Packet):boolean and it seems that flag processing_result = true; is not set for some reason - I would watch logs for whether received packed was treated as a command and also maybe add more debug to the processing of case CLIENT_AUTH.

Categories: Tigase Forums

Tigase server development: RE: Custom tests using test-suite

Wed, 01/21/2015 - 00:15

Awesome ! I don't know how I couldn't find it !
Thanks alot !

Luca

Categories: Tigase Forums

Tigase server development: RE: Impossible happened :)

Tue, 01/20/2015 - 14:22

I've just reproduced the issue by doing a couple of hundred connections and killing them randomly after 2-3 seconds (so they should stop some time after SASL).
Tigase starts printing the same logs over and over, never stopping.

Time to sleep now; tomorrow I will try to reproduce it again, but in a more "controlled" environment.

Categories: Tigase Forums

Tigase server development: RE: Impossible happened :)

Tue, 01/20/2015 - 11:29

The patch I've applied 2 days ago doesn't work. And neither returning from inside the catch (it actually makes things even worse, but the problem is that I've not fully grasped all of Tigase internals yet)

Wojciech Kapcia wrote:

A few questions:
- does it happen every time?

It happens after some time, but it has always led me to restart Tigase.

- is the issue gone if you remove the additional field from the command?

Well, that might be a problem... the field is needed for authentication, so I can't do that on production where the users are "unstable" enough (e.g. I'm guessing this happens because of faulty mobile connections).

- have you made any other changes related to SessionManager handling and/or XMPPResourceConnection (I've briefly went over your github repository history but haven't noticed any significant changes)?

No, nothing.

I'm writing some stress tests to run locally to see if I can reproduce the issue with "good" (see: local) connections. If I'll not be successful, I'll try something to simulate broken sockets: maybe I can achieve something with iptables rules, I don't know...

Categories: Tigase Forums

Tigase server development: RE: Custom tests using test-suite

Tue, 01/20/2015 - 10:36

TTS has it's own section in development guide. It explains how to write test cases and test scenarios. Then you can pass your custom test case or scenario as parameter to the TTS shellscript.
TTS is currently preferred way to do that as it test complete chain of processing.

Categories: Tigase Forums

Tigase server administration: RE: Issue with connection between server and MUC external component

Tue, 01/20/2015 - 10:30

Tigase should perform re-connection automatically (from the MUC instance, which is configured with connect). Are there any exceptions/errors in the logs?

Categories: Tigase Forums

Tigase server development: RE: Impossible happened :)

Tue, 01/20/2015 - 10:22

A few questions:
- does it happen every time?
- is the issue gone if you remove the additional field from the command?
- have you made any other changes related to SessionManager handling and/or XMPPResourceConnection (I've briefly went over your github repository history but haven't noticed any significant changes)?

Categories: Tigase Forums

Tigase server development: Custom tests using test-suite

Tue, 01/20/2015 - 07:56

HI there,

I was wondering about writing some tests to verify the expected behavior for plugins and components.
To do this I wanted to use tigase-testsuite. My idea is running only my tests to validate the behavior of a particular component / plugin.

Is this the right way ? Is there any document explaining the process for custom tests ?

Thanks in advance,
Luca

Categories: Tigase Forums

Tigase server administration: Issue with connection between server and MUC external component

Tue, 01/20/2015 - 07:13

Hi everyone

We use a multi-user chat as an external component.
We have 2 physical servers: one for ligase-server and the second one for MUC component

Tigase-Server has next settings in init.properties:
--comp-name-1 = ext
--comp-class-1 = tigase.server.ext.ComponentProtocol
--external = muc.chatcluster.example.com:muc-secret:listen:5270:IP:ReceiverBareJidLB

MUC component has next settings in init.properties:
--comp-name-1 = muc
--comp-class-1 = tigase.muc.MUCComponent
--external = muc.chatcluster.example.com:muc-secret:connect:5270:chatcluster.example.com;cluster-test-1;cluster-test-2:accept

We noticed one issue - when we rebooted Tigase-Server then MUC component became unreachable for Tigase-Server. Looks like connection is lost and to fix this we have to reboot MUC component.

Is there a way to automatically re-establish the connection from MUC to Tigase-server?

Categories: Tigase Forums

Tigase server development: RE: Tigase closes the client's connection

Tue, 01/20/2015 - 03:01

Gabriel Rossetti wrote:

It looks like this is not enabled by default so I guess this is not what is causing the issue.

It is enabled by default - you have:
Default value: xmpp:2500:0:disc,bin:20m:0:disc
so your client will get disconnected after sending more than 2500 stanzas per minute or more than 20m bytes.

BTW, 'high traffic' components are components in cluster mode or is this something else?

Again, as linked documentation says: that is s2s, external components and other high - which also includes clustering component.

There is another mechanism related to limitations: --elements-number-limit

Categories: Tigase Forums

Tigase server development: RE: Tigase closes the client's connection

Tue, 01/20/2015 - 02:46

Super, thx.

It looks like this is not enabled by default so I guess this is not what is causing the issue.

BTW, 'high traffic' components are components in cluster mode or is this something else?

Categories: Tigase Forums

Tigase server development: RE: Tigase closes the client's connection

Tue, 01/20/2015 - 02:07

Gabriel Rossetti wrote:

Does Tigase have some sort of protection against this and kicks my client off?

Most likely this: --cm-traffic-throttling (and there is similar property for 'high traffic' components as well --cm-ht-traffic-throttling)

Categories: Tigase Forums

Tigase server development: Tigase closes the client's connection

Mon, 01/19/2015 - 09:24

Hi,

I have an issue that I am trying to debug, basically the server sends the client (smack) lots of msgs. The client at some point starts sending them back as XMPP errors (another issue I am having). At some point it looks like the server closes the client's connection. I say it looks because I am having issues debugging this since it happens with high volume.

Does Tigase have some sort of protection against this and kicks my client off?

Thanks

Categories: Tigase Forums

Tigase server development: RE: Changing one component's config with Ad-Hoc command reloads all co...

Mon, 01/19/2015 - 06:59

Ok, thanks for the info.

Could you pls add this to the initializationCompleted() javadoc or at least to the page that describes the component startup order? From reading those docs I was not able to know the above.

Thanks

Categories: Tigase Forums

Tigase server administration: RE: Tigase performance tests

Mon, 01/19/2015 - 02:31

Thanks for your fast reply.

Categories: Tigase Forums

Tigase server administration: RE: Automatically accept Presence Subscription requests

Mon, 01/19/2015 - 01:48

Tigase has such mechanism. You can enable it either only for presence (subscription request will automatically be authorized on both ends) or also for roster (adding item to roster will trigger presence subscription request and actions as described for presence). Matching options are as follow: (last one enables both options)
sess-man/plugins-conf/presence/auto-authorize=true sess-man/plugins-conf/jabber\:iq\:roster/auto-authorize=true sess-man/plugins-conf/auto-authorize=true

Categories: Tigase Forums

Tigase server development: RE: Impossible happened :)

Sun, 01/18/2015 - 08:28

This issue is really driving me mad.
In the meantime, I've patched this one:
https://github.com/kontalk/tigase-server/commit/a48425d52c247f1a8453254767be3dc6655e053f

To see what happens. I assure you, it's very hard to debug this kind of issues.

Categories: Tigase Forums

Tigase server development: RE: Unable to see new mechanism from clients

Sun, 01/18/2015 - 07:04

I found the problem.
JabberIqAuth was also inserting TigaseSaslProvider at position 1 before SaslAuth was doing it.
Removing JabberIqAuth from the list of loaded plugins solves the problem. You should probably document this somewhere :)

Categories: Tigase Forums

Tigase server development: RE: Unable to see new mechanism from clients

Sun, 01/18/2015 - 06:57

I'm doing some tests and I've noticed that my SaslServerFactory is completely ignored when running inside Tigase.
If I create a stupid main() program that registers a TigaseSaslProvider with my factory, it works (Sasl.getSaslServerFactories returns my factory too).
https://gist.github.com/daniele-athome/9d77c8dae9bd1d4bf426

If I execute it in Tigase (which does the same exact thing), my factory isn't the ones among Sasl.getSaslServerFactories.
https://gist.github.com/daniele-athome/339153e6d4e37b007a3a (snippet from SaslAuth.java)

What's the difference? Classpath errors? And if there were any, how was the class even loaded correctly?

Categories: Tigase Forums

Tigase server development: Unable to see new mechanism from clients

Sat, 01/17/2015 - 10:56

Hello,
I'm implementing a new SASL mechanism for Tigase for my own use. However, I still continue to see just PLAIN and EXTERNAL from clients, despite my configuration.

According to documentation, I've implemented these classes:

Server factory for the new mechanism:
https://github.com/kontalk/tigase-extension/blob/master/src/main/java/org/kontalk/xmppserver/auth/KontalkSaslServerFactory.java

Mechanism selector:
https://github.com/kontalk/tigase-extension/blob/master/src/main/java/org/kontalk/xmppserver/auth/KontalkMechanismSelector.java

And of course the mechanism:
https://github.com/kontalk/tigase-extension/blob/master/src/main/java/org/kontalk/xmppserver/auth/SaslKontalkToken.java

Here is my init.properties:
config-type=--gen-config-def basic-conf/auth-repo-params/sasl-mechs=EXTERNAL,KONTALK-TOKEN sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/factory=org.kontalk.xmppserver.auth.KontalkSaslServerFactory sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/mechanism-selector=org.kontalk.xmppserver.auth.KontalkMechanismSelector sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/legacy-fingerprint=37D0E678CDD19FB9B182B3804C9539B401F8229C sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/host=beta.kontalk.net sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/callbackhandler-EXTERNAL=org.kontalk.xmppserver.auth.KontalkCertificateCallbackHandler sess-man/plugins-conf/fingerprint=37D0E678CDD19FB9B182B3804C9539B401F8229C --sm-plugins=-amp,-message-carbons,-jabber:iq:register,+message,+msgoffline,+presence:urn:xmpp:pubkey:2,+kontalk:jabber:iq:register,+kontalk:jabber:iq:roster,+urn:xmpp:pubkey:2 --admins=admin@prime.kontalk.net --virt-hosts=prime.kontalk.net --debug=server,xmpp.impl --debug-packages=org.kontalk --user-db=mysql --user-db-uri=jdbc:mysql://localhost:3306/tigase?user=root&password=ciao&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true --vhost-anonymous-enabled=false --vhost-tls-required=true

I'd like to allow only EXTERNAL and KONTALK-TOKEN.
What am I doing wrong?

Thanks for your help.

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

  • @tigase Okay so you’re the fucking best on Network and RTC but you suck at SSL certificates Management on your own website… 11 hours 17 min ago
  • @tigase Is Desktop Sharing with Tigase XMPP Server possible? 1 month 2 weeks ago
Back to Top