Tigase XMPP Server Board

API and development: RE: Messages for domain are always delivered to admins

Wed, 11/02/2016 - 04:20

I'm using a custom plugin for these kind of messages:

https://github.com/kontalk/tigase-extension/blob/master/src/main/java/org/kontalk/xmppserver/ExtendedAddressing.java

It's kind of a multicast message (using XEP-0033: Extended Stanza Addressing), but the "to" attribute of the original message is set to the XMPP service name by the recipient.

JID to = JID.jidInstance(jid); // jid is looped from the extended addressing elements Packet fwd = packet.copyElementOnly(); fwd.initVars(packet.getStanzaFrom(), to); stripAddresses(fwd); // this removes the extended addressing elements packet.processedBy(ID); results.offer(fwd);

Am I doing something wrong?

Thanks

P.S. I know these kind of things should be implemented by a component, but there were some issues with designing it as a component so I went for a plugin.

Categories: Tigase Forums

API and development: RE: Messages for domain are always delivered to admins

Wed, 11/02/2016 - 04:01

Daniele Ricci wrote:

I can see that messages delivered to the local domain host are also copied to admins. Is that intended?

Not really:
<message to="firefly" id="domain-msg"> <body>test-domain</body> </message> <message from="firefly" type="error" to="tigase_1@firefly/Psi+/1" id="domain-msg"> <body>test-domain</body> <error type="auth" code="401"> <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">You must authorize session first.</text> </error> </message>

Is it happening on the default Tigase installation or with a server with some customizations?

Categories: Tigase Forums

API and development: RE: Handling client disconnecting in component

Wed, 11/02/2016 - 03:56

Taras Panchak wrote:

And my questions are:
1) how i can handle client disconnection (component on server-side)?
2) where i can find some information about list of events which Tigase can handle?

  • currently there is no list of available events (generated by the default set of Tigase components)
  • currently there isn't any event related to user logging-in/logging-out - version 7.1.0 laid foundations for TCF and introduced EventBus, however more wide use is planned fro upcoming 7.2.0.
Categories: Tigase Forums

Installation and maintenance: RE: MUC not returning history.

Wed, 11/02/2016 - 03:45

Ralph Hammerfell wrote:

We've set up our server, version 5.3 and Muc 2.2.1.

Why are you using such an old version? We recommend using the latest.

All is working great, but even though we're setting the MUC rooms to return the last 10 messages in the history, nothing is being returned when a user joins a room. Anything we need to enable in the configuration?

  • are there any exceptions in the logs?
  • are the messages stored in the repository?
  • how are you joining the room and retrieving the messages?
Categories: Tigase Forums

API and development: RE: SSLException: bad record MAC

Wed, 11/02/2016 - 03:39

Have you modified Tigase/Java configuration in any way (related to the cryptography/security)? Changed ciphers, enabled hardened mode, etc.?

Please also answer previous question: Does your server have a stable and reliable connection to such machine?

Categories: Tigase Forums

Installation and maintenance: RE: Testing register of Tigase by Tsung

Wed, 11/02/2016 - 00:13

Hi Eric,

I had found the mistake in my jabber_register.xml

<option type="ts_jabber" name="global_number" value="20"></option>
<option type="ts_jabber" name="userid_max" value="20"></option>

These two option limit the users max 20.

Categories: Tigase Forums

Installation and maintenance: RE: Testing register of Tigase by Tsung

Tue, 11/01/2016 - 21:00

Hi Eric,

I add thinktimes to jabber_register.xml.

But why still just the 20 users were register successfully ?

Categories: Tigase Forums

Installation and maintenance: RE: Testing register of Tigase by Tsung

Tue, 11/01/2016 - 19:37

Hi Eric,

The tsung logfile attached.

How to confirm what register requests were sent to Tigase server from log?

Categories: Tigase Forums

API and development: Messages for domain are always delivered to admins

Tue, 11/01/2016 - 13:42

Hello,
before reporting this as an issue, I'd like to be sure that it is indeed one.

I can see that messages delivered to the local domain host are also copied to admins. Is that intended?

There is a method in class SessionManager called processAdminsOrDomains which handles this specific case, but it is called from two points, both in SessionManager:

  • from void processPacket(Packet packet, XMPPResourceConnection conn) which I is fine
  • from void processPacket(final Packet packet)

The latter is where processAdminsOrDomains() is called indiscriminately, without checking if the packet was already processed.

I'd be grateful for any clarification on the matter.

Best

Categories: Tigase Forums

Installation and maintenance: RE: Testing register of Tigase by Tsung

Tue, 11/01/2016 - 09:41

Can you try to add some thinktimes to jabber_register.xml especially after connect. Also look at tsung logfile.

Categories: Tigase Forums

API and development: Handling client disconnecting in component

Tue, 11/01/2016 - 08:40

Could you please provide some help - we developed new component:

public class MyComponent extends AbstractComponent<MyComponentContext> { ... }

and related to it controller:

@public class DefaultMyController implements Initializable {
private MyComponentContext;

@Inject
private EventBus eventBus; public DefaultMyController (MyComponentContext context) {
this.context = context;
} public EventBus getEventBus() {
return eventBus;
} public void setEventBus(EventBus eventBus) { this.eventBus = eventBus; } @Override
public void initialize() { eventBus.addHandler("RoomJoin", "tigase:events:muc", (name, xmlns, event) -> {
String room = event.getCDataStaticStr(new String[]{"RoomJoin", "room"});
String nickname = event.getCDataStaticStr(new String[]{"RoomJoin", "nickname"});
String jid = event.getCDataStaticStr(new String[]{"RoomJoin", "jid"}); // Do something after room joining... - This works fine. });
@

And my questions are:
1) how i can handle client disconnection (component on server-side)?
2) where i can find some information about list of events which Tigase can handle?

Any help appreciated.

Categories: Tigase Forums

Installation and maintenance: MUC not returning history.

Tue, 11/01/2016 - 04:10

We've set up our server, version 5.3 and Muc 2.2.1. All is working great, but even though we're setting the MUC rooms to return the last 10 messages in the history, nothing is being returned when a user joins a room. Anything we need to enable in the configuration?

Categories: Tigase Forums

Installation and maintenance: Testing register of Tigase by Tsung

Tue, 11/01/2016 - 01:51

I used tsung do the register testing on Tigase.

With this setup, during the first 10 minutes of the test, a new user will be created every 20 seconds
In this case, only 20 users will be created.

But From the logs/tigase.log.0, I just see the log of five user test_reg_r1_1 to test_reg_r1_5.

Is any mistake of the configuration?

The files of tigase.conf, init.properties, tsung script, the log of tigase server were Attached.

postgresql was used as user-db.

JVM options: -Xms2048M -Xmx10240M -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:MaxDirectMemorySize=512m

Tsung script :

<load>
<arrivalphase phase="1" duration="10" unit="minute">
<users maxnumber="20" interarrival="20" unit="second"></users>
</arrivalphase>
</load>

<options>
<option type="ts_jabber" name="global_number" value="20"></option>
<option type="ts_jabber" name="userid_max" value="20"></option>
<option type="ts_jabber" name="domain" value="192.168.1.27"></option>
<option type="ts_jabber" name="username" value="test_reg_r1_"></option>
<option type="ts_jabber" name="passwd" value="test_reg_r1_"></option>
</options>

<sessions>
<session probability="100" name="jabber-example" type="ts_jabber">
<request>
<jabber type="connect" ack="local"></jabber>
</request>
<request>
<match do="abort" when="match">error</match>
<jabber type="register" ack="local" id="new"></jabber>
</request>
<request>
<jabber type="close" ack="local"></jabber>
</request>
</session>
</sessions>

Categories: Tigase Forums

API and development: RE: SSLException: bad record MAC

Mon, 10/31/2016 - 00:56

Firstly,I'm sorry that the Tigase version is 7.0.2 rather than 7.0.1.
My Operating system is Red Hat Enterprise Linux Server 6.4.
More importantly,I get something odd from log files by debugging java ssl.I find that everytime the server throws this SSLException when the ssl connection is resumed.
The log information is in attachments.

Categories: Tigase Forums

API and development: RE: SSLException: bad record MAC

Thu, 10/27/2016 - 02:58

I was able to see the stacktrack in the image - that was comment for the future.

Could you:
  • share full logs;
  • try OpenJDK flavor of Java?

What Operating system do you use?

Categories: Tigase Forums

API and development: RE: SSLException: bad record MAC

Thu, 10/27/2016 - 01:33

Thanks the reply. The connection is stable and reliable. More information is as following.

jre: oracle 1.8.0_92

exception: javax.net.ssl.SSLException: bad record MAC at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1728) at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:981) at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907) at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781) at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) at tigase.io.TLSWrapper.unwrap(TLSWrapper.java:363) at tigase.io.TLSIO.decodeData(TLSIO.java:365) at tigase.io.TLSIO.read(TLSIO.java:209) at tigase.net.IOService.readData(IOService.java:1032) at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:654) at tigase.net.IOService.call(IOService.java:252) at tigase.net.IOService.call(IOService.java:94) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: javax.crypto.BadPaddingException: bad record MAC at sun.security.ssl.EngineInputRecord.decrypt(EngineInputRecord.java:238) at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:974) at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907) at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781) at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) at tigase.io.TLSWrapper.unwrap(TLSWrapper.java:363) at tigase.io.TLSIO.decodeData(TLSIO.java:365) at tigase.io.TLSIO.read(TLSIO.java:209) at tigase.net.IOService.readData(IOService.java:1032) at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:654) at tigase.net.IOService.call(IOService.java:252) at tigase.net.IOService.call(IOService.java:94) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Categories: Tigase Forums

API and development: RE: New component development : MessageRouterConfig.hasClassForServerCompone...

Wed, 10/26/2016 - 07:40
--debug = server … --comp-class-5 = tigase.translate.TranslateComponent --debug=server,cluster,xml

Frist of all - you have two debug configurations - you should use only one. Please also take a look at --debug which explains it.

In your code, only Leve.INFO will be logged by default.

Categories: Tigase Forums

Installation and maintenance: RE: Deployment of Tigase in High Performance Configurations

Wed, 10/26/2016 - 07:35

Bruce Chung wrote:

If want to limit the RAM size 100G for Tigase process, just need to set JVM -Xmx102400m, no need to set the --max-queue-size property.
Is my above idea correct?

Yes, those are calculated on the max heap size.

Categories: Tigase Forums

API and development: RE: 7.1 release

Wed, 10/26/2016 - 07:31

We are putting final touches on it. We will release new version when those are finalised.

Categories: Tigase Forums

API and development: RE: SSLException: bad record MAC

Wed, 10/26/2016 - 07:28

First of all - please past stacktraces in text form instead of images.

Does that happen with all s2s connections or only single one? Does your server have a stable and reliable connection to such machine? It may happen

Which exact JRE are you using (Oracle? which exact version?)

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