Tigase XMPP Server Board

Tigase server development: RE: Messages to Smack clients are duplicated with Stream Management

Sat, 07/25/2015 - 07:52

the correct android debug xml log is the last one attached

Categories: Tigase Forums

Tigase server development: Messages to Smack clients are duplicated with Stream Management

Sat, 07/25/2015 - 07:42

Hello,
I've a strange issue that I'm trying to figure out either in stable than development Tigase version: messages sent to Smack 4.1 Android clients are duplicated while ones to XMPPFramework iOS clients are not.
I'm using on both Mobile platforms stream management with stream resumption enabled, and this issue comes only on Smack clients when a user login twice without stream resumption in about 10 minutes from latest message (I guess TCP keep-alive is involved in this estimated average time)

The issue comes both on latest Tigase stable build 7.0.2 than a development 7.1.0-SNAPSHOT-b3891/84db83a3 I'm using for another issue

I've atteched two files that show that both xmpp libraries do the same thing:

1: use compression
2: use tls
3: use stream management
4: connect announcing presence
5: disconnect annoucing presence unavailable

the message sent is sent from Tigase admin user on default virtualhost, to an user on another virtualhost that has LIST policy: domain.tld;sub.domain.tld

<message id="69xbq-10" type="normal" to="kingrichard@sub.domain.tld/Smack" from="admin@domain.tld/Resource"><subject>Test</subject><body>test 1</body>..other xeps here..<amp xmlns="http://jabber.org/protocol/amp"><rule action="error" condition="expire-at" value="2015-07-24T17:01:37Z"/><rule action="error" condition="match-resource" value="other"/></amp>
both error or drop action are used in tests
<rule action="drop" condition="expire-at" value="2015-07-24T17:01:37Z"/><rule action="drop" condition="match-resource" value="other"/>
but the result is the same by the client side, messages arrive and they seems always in RAM.

I've also attached a log from Tigase side, this is what I see in Tigase logs as soon a duplicated message comes again to the mobile client. It looks like a STREAM_CLOSED event comes and trigger the resending, also this error appear:

<iq type="error" id="7ckgD-74" xmlns="jabber:client" from="kingrichard@sub.domain.tld/Smack"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>kingrichard@sub.domain.tld/Smack</jid></bind><error type="wait" code="404"><recipient-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

while client is connected indeed. It looks like the previous stream management session was not properly closed and new one didn't invalidated the old one that trigger somehow the message resend.

The strange thing is that on XMPPFramework this doesn't happens and a I see from Tigase logs I've attached only STREAM_CLOSED_UPDATE

I see another 404 but this maybe because the sender weren't available anymore

What do you think about this issue? Could really be a Smack-related issue or a misconfiguration by Tigase side that somehow works with XMPPFramework?
I really don't understand why the message keeps in RAM after is sent instead.

Thanks

Natale

Categories: Tigase Forums

Tigase server administration: RE: Configuration question.

Sat, 07/25/2015 - 05:40

As for issue with StunComponent please see https://projects.tigase.org/projects/stun/wiki/Configuration as NullPointerException is cause by missing configuration property which is required by StunComponent to initialize properly.

As for issue with WebSocket, I suppose you configured list of C2S allowed ports in your VHost configuration for anon.networklab.ca domain.
This list if set needs to contain also list of allowed WebSocket ports to use.

Categories: Tigase Forums

Tigase server development: User Ip Connection

Sat, 07/25/2015 - 05:11

Hi, In our use case of tigase, we need to log the IP address that each user connects to the server (when user authenticates) into a database,
is there any automatic way to do this?
if not, how can I add this feature and which part of tigase should be modified?

thanks
Behnam Hatami

Categories: Tigase Forums

Tigase server administration: RE: Configuration question.

Fri, 07/24/2015 - 21:02

Also some web socket issue when it reject connection with message about policy problem. I search information about all those issues, but can't find anything useful yet. Any help will thank you.

2015-07-24 22:58:21.943 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[ws2s]] Connection started: null, type: accept, Socket: TLS: nullSocket[addr=/public_ip,port=60294,localport=5291], jid: null 2015-07-24 22:58:22.192 [pool-18-thread-2] WebSocketXMPPIOService.processWebSocketHandshake() FINEST: parsing request = GET / HTTP/1.1 Host: webvc.networklab.ca:5291 Connection: Upgrade Pragma: no-cache Cache-Control: no-cache Upgrade: websocket Origin: http://networklab.global Sec-WebSocket-Version: 13 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36 Accept-Encoding: gzip, deflate, sdch Accept-Language: en-GB,en-US;q=0.8,en;q=0.6 Sec-WebSocket-Key: DxJIcfk1NfXIMlm5z1ReuQ== Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Sec-WebSocket-Protocol: xmpp 2015-07-24 22:58:22.240 [pool-18-thread-1] ClientConnectionManager.xmppStreamOpened() FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, xmlns=jabber:client, to=networklab.ca, version=1.0} 2015-07-24 22:58:22.240 [pool-18-thread-1] WebSocketXMPPIOService.writeData() FINEST: sending data = <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='tigase-error-tigase' from='anon.networklab.ca' version='1.0' xml:lang='en'><stream:error><policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream> 2015-07-24 22:58:22.240 [pool-18-thread-1] WebSocketHybi.encodeFrameAndWrite() FINEST: sending encoded data size = 293
Categories: Tigase Forums

Tigase server development: Tigase record fail

Fri, 07/24/2015 - 19:50

The general situation,start record and stop record is ok.when record folder file reaches more than several thousands,start record fail.Hard drive is large enough to save files.That why?

Categories: Tigase Forums

Tigase server administration: RE: Configuration question.

Fri, 07/24/2015 - 17:56

Hello Everyone,
Tried load stun component, but it no loaded give exception.
tigase 7.02

2015-07-24 19:48:51.446 [main] Configurator.componentAdded() WARNING: ignoring NPE java.lang.NullPointerException at tigase.stun.StunComponent.init(StunComponent.java:167) at tigase.stun.StunComponent.setProperties(StunComponent.java:115) at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540) at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177) at tigase.conf.Configurator.componentAdded(Configurator.java:50) at tigase.conf.Configurator.componentAdded(Configurator.java:33) at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116) at tigase.server.MessageRouter.addComponent(MessageRouter.java:108) at tigase.server.MessageRouter.addRouter(MessageRouter.java:145) at tigase.server.MessageRouter.setProperties(MessageRouter.java:698) at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540) at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177) at tigase.conf.Configurator.componentAdded(Configurator.java:50) at tigase.conf.Configurator.componentAdded(Configurator.java:33) at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116) at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131) at tigase.server.MessageRouter.setConfig(MessageRouter.java:597) at tigase.server.XMPPServer.start(XMPPServer.java:142) at tigase.server.XMPPServer.main(XMPPServer.java:112)
Categories: Tigase Forums

Tigase server administration: Create admin user after switch to mongodb

Fri, 07/24/2015 - 08:05

Hello,

I have successfully installed Tigase with mysql and everything worked great.

After I switched to mongodb, I have a new database created in mongodb with default schema, but missing the admin user.

My question is how do I create the admin user in the mongodb?

I'm still new to Tigase. Are there any scripts that can be run from the terminal, that can create admin user?

Thanks

Categories: Tigase Forums

Tigase server development: Plugin processes a packet 2 times from sender

Fri, 07/24/2015 - 06:21

Hi there,

I develop a plugin to track message statuses (delivered, read) http://xmpp.org/extensions/xep-0333.html

Here is my simple implementation:

public class MessageReadDelivered extends XMPPProcessor implements XMPPProcessorIfc { private static final String ID = "message-read-delivered"; private static final String XMLNS = "urn:xmpp:chat-markers:0"; public static final String RECEIVED_KEY = "received"; public static final String DISPLAYED_KEY = "displayed"; public static final String[] MESSAGE_RECEIVED_PATH = { Message.ELEM_NAME, RECEIVED_KEY}; public static final String[] MESSAGE_DISPLAYED_PATH = { Message.ELEM_NAME, DISPLAYED_KEY}; private static final Logger log = Logger.getLogger(MessageReadDelivered.class.getName()); @Override public String id() { return ID; } @Override public String[] supNamespaces() { return new String[]{XMLNS, XMLNS}; } @Override public String[][] supElementNamePaths() { return new String[][]{MESSAGE_RECEIVED_PATH, MESSAGE_DISPLAYED_PATH}; } @Override public void process(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results, Map<String, Object> settings) throws XMPPException { // You may want to skip processing completely if the user is offline. if (session == null) { return; } BareJID id = (packet.getStanzaFrom() != null) ? packet.getStanzaFrom().getBareJID() : null; if (session.isUserId(id) { if (log.isLoggable(Level.INFO)) { log.log(Level.INFO, "packet: {0}, session: {1}", new Object[] { packet, session}); } // do something with status // ... } } }

My test is simple: UserA sends a status to UserB

By some reason I see above log 2 times:

[message-read-delivered Queue Worker 0] MessageReadDelivered.process() INFO: packet: from=c2s@qq-chat1/174.30.0.248_5222_92.117.252.236_52793, to=sess-man@qq-chat1... [message-read-delivered Queue Worker 0] MessageReadDelivered.process() INFO: packet: from=sess-man@qq-chat1, to=sess-man@qq-chat1...

This is not what I expect - my logic works 2 times then.
According to this doc http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html/#_introduction

The packet has to be processed twice by the session manager. The first time it is processed on behalf of the User A as an outgoing packet and the second time it is processed on behalf of the User B as an incoming packet.

so only once on each side, not 2

To fix this I add:

if (session.isUserId(id) && packet.getPacketFrom().getLocalpart().equals("c2s")) {...

Is it a right solution or should I rewrite this in a some other way?

thank you

Categories: Tigase Forums

Tigase server administration: Cannot connect to Tigase server wtih Trillian

Thu, 07/23/2015 - 05:27

I have a default installation of Tigase sitting on an Azure VM. I can use PsPing to ping port5222 on the server but I cannot connect to it via trillian or any other client externally. If I try it on the server, it works. What could be the issue?

Categories: Tigase Forums

Tigase server administration: How to trace step by step tigase-server-7.0.2-b3821.jar commands fo...

Thu, 07/23/2015 - 01:17

Hi dear tigase developers

I have had one important question.

Can I trace and chase "tigase-server-7.0.2-b3821.jar --console" commands for learning how to compile Tigase infrastructures?
For example, when the installer create a connection into Mysql database and changing default configurations on Tigase as well as removing the Errors that manual installers maybe encountered on it. it is done I do understand the route of install Tigase manually.

Thanks in advance for answering the question.

Categories: Tigase Forums

Tigase server development: RE: how to slove Queue overflow when the tigase server run a wihle

Wed, 07/22/2015 - 07:40

9 days over,the problem comes over again,as you say,i found one deadlock with command:jstatck

Found one Java-level deadlock: =============================
"jabber:iq:auth Queue Worker 18":
waiting to lock monitor 0x00007f6d800d2768 (object 0x00000005831dfd38, a tigase.xmpp.XMPPResourceConnection),
which is held by "jabber:iq:auth Queue Worker 17"
"jabber:iq:auth Queue Worker 17":
waiting to lock monitor 0x00007f6dd8044ff8 (object 0x00000005831d7140, a tigase.xmpp.XMPPResourceConnection),
which is held by "jabber:iq:auth Queue Worker 18"

Java stack information for the threads listed above: ===================================================
"jabber:iq:auth Queue Worker 18":
at tigase.xmpp.XMPPResourceConnection.streamClosed(XMPPResourceConnection.java:429)
- waiting to lock <0x00000005831dfd38> (a tigase.xmpp.XMPPResourceConnection)
at tigase.xmpp.XMPPResourceConnection.logout(XMPPResourceConnection.java:311)
at tigase.xmpp.XMPPSession.addResourceConnection(XMPPSession.java:122)
at tigase.xmpp.XMPPResourceConnection.setResource(XMPPResourceConnection.java:958)
at tigase.xmpp.impl.JabberIqAuth.process(JabberIqAuth.java:248)
- locked <0x00000005831d7140> (a tigase.xmpp.XMPPResourceConnection)
at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2463)
at tigase.util.WorkerThread.run(WorkerThread.java:128)
"jabber:iq:auth Queue Worker 17":
at tigase.xmpp.XMPPResourceConnection.streamClosed(XMPPResourceConnection.java:429)
- waiting to lock <0x00000005831d7140> (a tigase.xmpp.XMPPResourceConnection)
at tigase.xmpp.XMPPResourceConnection.logout(XMPPResourceConnection.java:311)
at tigase.xmpp.XMPPSession.addResourceConnection(XMPPSession.java:122)
at tigase.xmpp.XMPPResourceConnection.setResource(XMPPResourceConnection.java:958)
at tigase.xmpp.impl.JabberIqAuth.process(JabberIqAuth.java:248)
- locked <0x00000005831dfd38> (a tigase.xmpp.XMPPResourceConnection)
at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2463)
at tigase.util.WorkerThread.run(WorkerThread.java:128)

Found 1 deadlock.

And the monitor show :
sess-man/Processor: jabber:iq:auth=, Queue: 21438, AvTime: 7, Runs: 4302557, Lost: 9710,
sess-man/Processor: session-close=, Queue: 50779, AvTime: 7, Runs: 3160560, Lost: 0,

is it the deadlock case this problem? Why " jabber:iq:auth" and " session-close" comes together?

and I checked the thread information,there is 24 workthread of "jabber:iq:auth Queue Worker" ,If I put the number of threads to increase, will not be a little better? And How?

Thanks in advance!

Categories: Tigase Forums

Tigase server administration: Cannot connect from to XMPP Server on Windows Azure

Wed, 07/22/2015 - 01:52

I have installed the XMPP server on a Windows Azure VM. I have enabled the 5222/5223 end point but I cannot connect to the server externally. If i try from the actual machine it connects and I can log in.

I also dont seem to be able to access http://localhost:8080/ui/ from the machine. It is becoming very frustrating.

Categories: Tigase Forums

Tigase server development: User Authentication Failed through psi.

Tue, 07/21/2015 - 02:28

I am unable to login through psi client using the user account which I added to my server's database with stored procedure "call TigAddUserPlainPw()" .
Error:
Authentication error: not authorized.

Categories: Tigase Forums

Tigase server administration: RE: Configuration question.

Sat, 07/18/2015 - 02:16

I will need help with external component. I am trying connect mod dingaling to tigase server.

https://wiki.freeswitch.org/wiki/Mod_dingaling#Sample_Configuration_.28ejabberd.29

with following configuration
--comp-name-6 = ext --comp-class-6 = tigase.server.ext.ComponentProtocol # External component --external = xmpp.networklab.ca:mypassword:listen:5270

but get this exception

2015-07-18 04:13:18.306 [ConnectionOpenThread] ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null, port_props: {port-no=5270, local-host=xmpp.networklab.ca, remote-host=null, type=accept, socket=plain, ifc=[Ljava.lang.String;@7b948f3e, max-reconnects=7200000, repo-item=xmpp.networklab.ca:HinLeMY1Yg7Cvb50ySqVn3aUSVhsOw:accept:5270:null:null:tigase.server.ext.lb.ReceiverBareJidLB} 2015-07-18 04:13:18.306 [ConnectionOpenThread] ConnectionManager.serviceStarted() FINER: [[ext]] Connection started: null, type: accept, Socket: nullSocket[addr=/pubic_ip,port=36812,localport=5270], jid: null 2015-07-18 04:13:18.306 [ConnectionOpenThread] ComponentProtocol.serviceStarted() FINEST: Connection started: pubic_ip, xmlns: null, type: accept, id=10.18.130.29_5270_pubic_ip_36812 2015-07-18 04:13:18.306 [ConnectionOpenThread] ComponentProtocol.serviceStarted() FINE: XMLNS not set, accepting a new connection with xmlns auto-detection. 2015-07-18 04:13:18.307 [pool-18-thread-1] ComponentProtocol.xmppStreamOpened() FINEST: Stream opened: pubic_ip, xmlns: jabber:client, type: accept, uniqueId=10.18.130.29_5270_pubic_ip_36812, to=xmpp.networklab.ca 2015-07-18 04:13:18.307 [pool-18-thread-1] ComponentProtocol.xmppStreamOpened() FINEST: tigase.server.ext.handlers.JabberClientStreamOpenHandler is processing request 2015-07-18 04:13:18.307 [pool-18-thread-1] XMPPIOService.processSocketData() INFO: null, type: accept, Socket: nullSocket[addr=/pubic_ip,port=36812,localport=5270], jid: null, Incorrect XML data: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='xmpp.networklab.ca' version='1.0'>, stopping connection: null, exception: java.lang.NullPointerException at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:778) at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546) at tigase.db.comp.ConfigRepository.getItem(ConfigRepository.java:223) at tigase.server.ext.ComponentProtocol.getCompRepoItem(ComponentProtocol.java:276) at tigase.server.ext.handlers.JabberClientStreamOpenHandler.streamOpened(JabberClientStreamOpenHandler.java:124) at tigase.server.ext.ComponentProtocol.xmppStreamOpened(ComponentProtocol.java:679) at tigase.server.ext.ComponentProtocol.xmppStreamOpened(ComponentProtocol.java:72) at tigase.xmpp.XMPPIOService.xmppStreamOpened(XMPPIOService.java:809) at tigase.xmpp.XMPPDomBuilderHandler.startElement(XMPPDomBuilderHandler.java:280) at tigase.xml.SimpleParser.parse(SimpleParser.java:314) at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:686) at tigase.net.IOService.call(IOService.java:253) at tigase.net.IOService.call(IOService.java:93) 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) 2015-07-18 04:13:18.307 [pool-18-thread-1] ConnectionManager.serviceStopped() FINER: [[ext]] Connection stopped: null, type: accept, Socket: nullSocket[unconnected], jid: null 2015-07-18 04:13:18.307 [pool-18-thread-1] ComponentProtocol.serviceStopped() FINER: Stopped service which hasn't sent initial stream open yet10.18.130.29_5270_pubic_ip_36812
Categories: Tigase Forums

Tigase server administration: RE: Configuration question.

Fri, 07/17/2015 - 06:08
Why are you doing that? What are you trying to achieve? Simply opening this in your browser won't do anything. Please peruse XEP-0124: Bidirectional-streams Over Synchronous HTTP and XEP-0206: XMPP Over BOSH

I am trying to connect muc room via bosh from my corporate website. And I tried to test if bosh url correct or not.

So Dynamic Roster is perfect fit - please see my previous link. #sess-man/plugins-conf/jabber\:iq\:roster/db-uri =

What classes is available for dynamic roster ?
Is mysql is involve in it ? If yes how is schema then created ?

#sess-man/plugins-conf/jabber\:iq\:roster/db-uri = #sess-man/plugins-conf/jabber\:iq\:roster/dynamic-roster-classes =
Categories: Tigase Forums

Tigase server development: RE: Roster

Thu, 07/16/2015 - 21:50

Any update on this?

Categories: Tigase Forums

Tigase server development: Connection under XEP-114

Thu, 07/16/2015 - 08:00

Hello,
I'm going to try to connect Under XEP-0114 Jabber component. When i check the Stream this error has throw :

SEND : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:component:accept" to="mydomain.com" version="1.0" > RECEIVED : <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="mydomain.com" id="14a60757-7a82-4dfd-8cba-c9d526ffbcfd" version="1.0" xml:lang="en" > SEND : <handshake xmlns="jabber:component:accept">9150db63e9c02e4534179cc8144e496aa4acceb4</handshake> RECEIVED : <stream:features xmlns:stream="http://etherx.jabber.org/streams"> <ver xmlns="urn:xmpp:features:rosterver" /> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /> <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> <mechanism>PLAIN</mechanism> <mechanism>ANONYMOUS</mechanism> </mechanisms> <register xmlns="http://jabber.org/features/iq-register" /> <compression xmlns="http://jabber.org/features/compress"> <method>zlib</method> </compression> </stream:features> RECEIVED : <handshake xmlns="jabber:component:accept" type="error"> <error code="501" type="cancel"> <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">Feature not supported yet.</text> </error> </handshake>

Does Tigase support XEP-0114 ? If true, what kind of connection has been supported ?

Thnks,

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