Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
skhanna #1
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Subject: Condition Conflict error
Hi Alex,

I have added log on OnReceiveXML and OnStreamError event. Some time I am getting  below error in my log file. Can you please check why it is getting?

OnReceiveXML:
Message:
  1. <stream:error xmlns:stream="http://etherx.jabber.org/streams">
  2.  <conflict xmlns="urn:ietf:params:xml:ns:xmpp-streams" />
  3. </stream:error>

OnStreamError: error condition Conflict


Thanks,
Sanjeev Khanna
This post was edited on 2016-08-23, 14:35 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This means that another session for this user and the same resource connected to the server. Then the server kicks the previous session. So you are trying to open 2 sessions at the same time with the same resource.

Alex
Avatar
skhanna #3
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks!!

I am using the same code for connect and reconnect that you have provided in Matrix example.  How i can resolve this issue.

Sanjeev Khanna
Avatar
skhanna #4
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Alex,

Is  there any way to check my previous session is open or not? Can I reuse the same session. This is urgent. Please help me.


Thanks,
Sanjeev
Avatar
Alex #5
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Your session is closed when you get the OnClose event.

There must be a bug in your code which opens a second session while the previous session is still active.
Avatar
skhanna #6
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Hi Alex,

I have rest API to send message and in Rest API, i am creating XMPP connection. Connection is start on Service Start Event. But some time my service start event is executed 2-3 times that I can not handle it. That's why my connection open method is called 2-3 times. I want to ignore second time connection calling,  if session is already open. If i use different resource id will it work?  Is there any other way to handle this case?


Thanks in Advance
Sanjeev
Avatar
Alex #7
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry, I cannot help you there. If your start event gets executed multiple times then you need to find a way to handle this on your side and open the XMPP session only once.
Avatar
skhanna #8
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks!

I have solved this problem from my service side. But I checked that login event is executing after some time interval and I have also checked that login user status on openfire is showing offline. Once I send any message then It will showing online. Means in ideal case it is showing offline on openfire.

Timestamp: 8/24/2016 4:21:43 PM
OnLogin: Login

Timestamp: 8/24/2016 4:22:29 PM
OnLogin: Login

Timestamp: 8/24/2016 4:25:04 PM
OnLogin: Login

Timestamp: 8/24/2016 4:26:55 PM
OnLogin: Login

Thanks,
Sanjeev Khanna
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS