Projects tigase _server server-core Issues #1429
How to open stream manager? (#1429)
Unknown opened 4 years ago

I have a problem with… A clear and concise description of what the problem is.

Details (please complete the following information):

  • Tigase version: [e.g. 8.1.0]
  • JVM flavour and version [e.g. AdoptOpenJDK11]
  • Operating system/distribution/version [e.g. Linux Ubuntu 20.04] Can you tell me how to open Stream Manager , XEP -0198,thanks very much
Unknown commented 4 years ago

As described in Enabling Stream Management XEP - by sending to the server following stanza:

<enable xmlns='urn:xmpp:sm:3'/>
Unknown commented 4 years ago

As described in Enabling Stream Management XEP - by sending to the server following stanza:

<enable xmlns='urn:xmpp:sm:3'/>

can you tell me how can i open Stream Management in config.tdsl ?

Unknown commented 4 years ago

You don't "open StreamManagement" in the configuration. The functionality is already enabled by default in Tigase XMPP Server and you have to send the stanza from the client.

You can configure resumption timeout, see the documentation: https://docs.tigase.net/tigase-server/master-snapshot/Administration_Guide/html/#_resumption_timeout

Unknown commented 4 years ago

You don't "open StreamManagement" in the configuration. The functionality is already enabled by default in Tigase XMPP Server and you have to send the stanza from the client.

You can configure resumption timeout, see the documentation: https://docs.tigase.net/tigase-server/master-snapshot/Administration_Guide/html/#_resumption_timeout

bug when i config it in config.tdsl

c2s {
    seeOtherHost {}
    'urn:xmpp:sm:3' (class: tigase.server.xmppclient.StreamManagementIOProcessor) {
        active = true
        'resumption-timeout' = '2'
        'max-resumption-timeout' = '5'
    }
}

i can get urn:xmpp:sm stream featurn

<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='test.com' id='2f467526-35bf-4ecf-9c13-f3f5f4db3a52' version='1.0' xml:lang='en'>
2021-04-10 23:34:35.965 4730-13198/com.test D/SMACK: RECV (5): 
    <stream:features>
      <sm xmlns="urn:xmpp:sm:3"/>
      <register xmlns="http://jabber.org/features/iq-register"/>
      <csi xmlns="urn:xmpp:csi:0"/>
      <ver xmlns="urn:xmpp:features:rosterver"/>
      <sub xmlns="urn:xmpp:features:pre-approval"/>
      <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
      <compression xmlns="http://jabber.org/features/compress">
        <method>
          zlib
        </method>
      </compression>
      <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
      <session xmlns="urn:ietf:params:xml:ns:xmpp-session">
        <optional/>
      </session>
    </stream:features>

but when i dont config it in config.tdsl i cant get stream feature

<stream:features>
      <register xmlns="http://jabber.org/features/iq-register"/>
      <csi xmlns="urn:xmpp:csi:0"/>
      <ver xmlns="urn:xmpp:features:rosterver"/>
      <sub xmlns="urn:xmpp:features:pre-approval"/>
      <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
      <compression xmlns="http://jabber.org/features/compress">
        <method>
          zlib
        </method>
      </compression>
      <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
      <session xmlns="urn:ietf:params:xml:ns:xmpp-session">
        <optional/>
      </session>
    </stream:features> 

but when i config ssm in config.tdsl

c2s {
    seeOtherHost {}
    'urn:xmpp:sm:3' (class: tigase.server.xmppclient.StreamManagementIOProcessor) {
        active = true
        'resumption-timeout' = '2'
        'max-resumption-timeout' = '5'
    }
}

when i disconnect xmppconnection,i get this error

2021-04-18 23:15:09.230 5077-5279/com.dowa D/SMACK: SENT (0): 
    <presence id='CU8QD-13' type='unavailable'/>
    <a xmlns='urn:xmpp:sm:3' h='15'/>
    </stream:stream>
2021-04-18 23:15:27.912 5077-5273/com.dowa W/zygote: Long monitor contention with owner Smack DefaultReactor Thread #1 (5274) at void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect()(SmackReactor.java:214) waiters=0 in void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect() for 20.019s
2021-04-18 23:15:36.821 5077-5274/com.dowa W/zygote: Long monitor contention with owner Smack DefaultReactor Thread #0 (5273) at void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect()(SmackReactor.java:214) waiters=0 in void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect() for 8.909s
2021-04-18 23:15:59.232 5077-5077/com.dowa I/AbstractXMPPConnection: Exception while waiting for closing stream element from the server XMPPTCPConnection[4483@dowa.com/android] (0)
    org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 50000ms (~50s). While waiting for closing stream tag from the server [XMPPTCPConnection[4483@dowa.com/android] (0)]
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrConnectionException(AbstractXMPPConnection.java:732)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrThrowConnectionException(AbstractXMPPConnection.java:737)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForClosingStreamTagFromServer(AbstractXMPPConnection.java:1024)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.shutdown(XMPPTCPConnection.java:512)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.shutdown(XMPPTCPConnection.java:492)
        at org.jivesoftware.smack.AbstractXMPPConnection.disconnect(AbstractXMPPConnection.java:972)
        at org.jivesoftware.smack.AbstractXMPPConnection.disconnect(AbstractXMPPConnection.java:944)
        at com.dowa.xmpp.XmppConnectionImpl.logoutXmpp(XmppConnectionImpl.java:262)
        at com.dowa.activity.SettingActivity$2.onSubmit(SettingActivity.java:434)
        at com.dowa.widget.TextDialog.onClick(TextDialog.java:93)
        at android.view.View.performClick(View.java:6256)
        at android.view.View$PerformClick.run(View.java:24701)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6541)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Unknown commented 4 years ago

This is Smack error so please ask for it in the Smack forums.

As for the stream resumption: - you are sending </stream:stream> which virtually closes the stream which makes it impossible to resume. Please take a look at the specification: https://xmpp.org/extensions/xep-0198.html#resumption for the details.

Unknown commented 4 years ago

This is Smack error so please ask for it in the Smack forums.

As for the stream resumption: - you are sending </stream:stream> which virtually closes the stream which makes it impossible to resume. Please take a look at the specification: https://xmpp.org/extensions/xep-0198.html#resumption for the details.

thanks very much,but i can`t understand you. i want to disconnect connection . when i run mXMPPConnection.disconnect() , i get this error

when i disconnect xmppconnection,i get this error

2021-04-18 23:15:09.230 5077-5279/com.dowa D/SMACK: SENT (0): 
    <presence id='CU8QD-13' type='unavailable'/>
    <a xmlns='urn:xmpp:sm:3' h='15'/>
    </stream:stream>
2021-04-18 23:15:27.912 5077-5273/com.dowa W/zygote: Long monitor contention with owner Smack DefaultReactor Thread #1 (5274) at void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect()(SmackReactor.java:214) waiters=0 in void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect() for 20.019s
2021-04-18 23:15:36.821 5077-5274/com.dowa W/zygote: Long monitor contention with owner Smack DefaultReactor Thread #0 (5273) at void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect()(SmackReactor.java:214) waiters=0 in void org.jivesoftware.smack.SmackReactor$Reactor.handleScheduledActionsOrPerformSelect() for 8.909s
2021-04-18 23:15:59.232 5077-5077/com.dowa I/AbstractXMPPConnection: Exception while waiting for closing stream element from the server XMPPTCPConnection[4483@dowa.com/android] (0)
    org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 50000ms (~50s). While waiting for closing stream tag from the server [XMPPTCPConnection[4483@dowa.com/android] (0)]
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrConnectionException(AbstractXMPPConnection.java:732)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrThrowConnectionException(AbstractXMPPConnection.java:737)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForClosingStreamTagFromServer(AbstractXMPPConnection.java:1024)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.shutdown(XMPPTCPConnection.java:512)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.shutdown(XMPPTCPConnection.java:492)
        at org.jivesoftware.smack.AbstractXMPPConnection.disconnect(AbstractXMPPConnection.java:972)
        at org.jivesoftware.smack.AbstractXMPPConnection.disconnect(AbstractXMPPConnection.java:944)
        at com.dowa.xmpp.XmppConnectionImpl.logoutXmpp(XmppConnectionImpl.java:262)
        at com.dowa.activity.SettingActivity$2.onSubmit(SettingActivity.java:434)
        at com.dowa.widget.TextDialog.onClick(TextDialog.java:93)
        at android.view.View.performClick(View.java:6256)
        at android.view.View$PerformClick.run(View.java:24701)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6541)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Is this smack error?

Unknown commented 4 years ago

when i run mXMPPConnection.disconnect()

Please ask in smack forums how to handle stream-management and resumption in Smack.

From the Tigase point of view your server is configured correctly and advertise StreamManagement (<sm xmlns="urn:xmpp:sm:3"/>)

issue 1 of 1
Type
Question
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1429
Please wait...
Page is in error, reload to recover