Giter VIP home page Giter VIP logo

Comments (17)

woj-tek avatar woj-tek commented on May 21, 2024

When I am trying to setup BOSH, port 5280 and set it up with PIDGIN chat client its not working.

Are there any errors? Could you get the logs from the Pidgin?

From the TIgase XMPP Server perspective - are there any errors/exceptions in the logs? Is the server listening on bosh port (5280)?

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

When I am trying to setup BOSH, port 5280 and set it up with PIDGIN chat client its not working.

Are there any errors? Could you get the logs from the Pidgin?

From the TIgase XMPP Server perspective - are there any errors/exceptions in the logs? Is the server listening on bosh port (5280)?

On my windows 10 machine I have setup Tigase Server 8.0.0 with MongoDB 4.2.8 and JDK 11.0.7. Since its on localhost I have turned off dns-webservice

http () {
     'dns-webservice' (active: false) {}
}

I can see in Resource monitor and via netstat that the port is listning

C:\WINDOWS\system32>netstat -aon | findstr "5280"
  TCP    0.0.0.0:5280           0.0.0.0:0              LISTENING       10800
  TCP    [::]:5280              [::]:0                 LISTENING       10800

C:\WINDOWS\system32>tasklist | findstr "10800"
java.exe                     10800 Console                    2    283,840 K

on Pidgin (2.14.1) in the Advanced tab I have just changed the port for existing account which I had tested earlier on 5222
Connection Security = Require Encryption
Port = 5280
I have kept the Connect Server and BOSH URL field empty

On Basic Tab I have username, Domain, Protocol = XMPP and password. I have kept resource empty

on Proxy tab I have
Proxy Type = Use Global Proxy Settings

In Pidgin on changing status I am getting

(23:26:40) prefs: /purple/savedstatus/default changed, scheduling save.
(23:26:40) account: Connecting to account mongo_test1@desktop-uccc5rr/.
(23:26:40) connection: Connecting. gc = 043B8508
(23:26:40) dnssrv: querying SRV record for desktop-uccc5rr: _xmpp-client._tcp.desktop-uccc5rr
(23:26:40) dnssrv: Couldn't look up SRV record. DNS name does not exist. (9003).
(23:26:40) dnsquery: Performing DNS lookup for desktop-uccc5rr
(23:26:40) dnsquery: IP resolved for desktop-uccc5rr
(23:26:40) proxy: Attempting connection to fe80::95b7:33f8:8507:ce63
(23:26:40) proxy: Connecting to desktop-uccc5rr:5280 with no proxy
(23:26:40) proxy: Connection in progress
(23:26:40) proxy: Connecting to desktop-uccc5rr:5280.
(23:26:40) proxy: Connected to desktop-uccc5rr:5280.
(23:26:40) jabber: Sending (mongo_test1@desktop-uccc5rr): <?xml version='1.0' ?>
(23:26:40) jabber: Sending (mongo_test1@desktop-uccc5rr): <stream:stream to='desktop-uccc5rr' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(23:26:40) jabber: Recv (482): <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1' from='desktop-uccc5rr' version='1.0' xml:lang='en'><stream:error><invalid-namespace xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams' xml:lang='langcode'>Ups, what just happened? Stream open. Hey, this is a Bosh connection manager. c2s and s2s are not supported on the same port... yet.</text></stream:error></stream:stream>
(23:26:40) connection: Connection error on 043B8508 (reason: 0 description: Invalid Namespace)
(23:26:40) account: Disconnecting account mongo_test1@desktop-uccc5rr/ (027626D0)
(23:26:40) connection: Disconnecting connection 043B8508
(23:26:40) jabber: Sending (mongo_test1@desktop-uccc5rr): </stream:stream>
(23:26:40) connection: Destroying connection 043B8508

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

As you see in the error received in the server:

Ups, what just happened? Stream open. Hey, this is a Bosh connection manager. c2s and s2s are not supported on the same port... yet

So, you are not connecting to BOSH.

on Pidgin (2.14.1) in the Advanced tab I have just changed the port for existing account which I had tested earlier on 5222
Connection Security = Require Encryption
Port = 5280
I have kept the Connect Server and BOSH URL field empty

In order to use bosh, you have to specify the BOSH URL, the exact endpoint is not all that important but in the BOSH URL field you should specify: http://localhost:5280/http-bind/

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

I am now getting error that "You require encryption, but it is not available on this server." while it worked for 5222.
Giving the Pidgin log, Tigase log and Config file

In Pidgin do I need to change for account setup in Advanced Tab (below). Or anything in my config.tdsl (see below)
Connection Security = "Require encryption", "Use Encryption If available", "Use Old style SSL"
Tick Check Box "Allow Plaintext auth over unencrypted streams"

Pidgin Log

(13:57:15) account: Connecting to account mongo_test1@desktop-uccc5rr/.
(13:57:15) connection: Connecting. gc = 08830E80
(13:57:15) dnsquery: Performing DNS lookup for localhost
(13:57:15) dnsquery: IP resolved for localhost
(13:57:15) proxy: Attempting connection to ::1
(13:57:15) proxy: Connecting to localhost:5280 with no proxy
(13:57:15) proxy: Connection in progress
(13:57:15) proxy: Connecting to localhost:5280.
(13:57:15) proxy: Connected to localhost:5280.
(13:57:15) jabber: bosh: httpconn 08830A80 re-connected
(13:57:15) jabber: SendBOSH Boot (232): <body content='text/xml; charset=utf-8' secure='true' to='desktop-uccc5rr' xml:lang='en' xmpp:version='1.0' ver='1.6' xmlns:xmpp='urn:xmpp:xbosh' rid='131583939571905' wait='60' hold='1' xmlns='http://jabber.org/protocol/httpbind'/>
(13:57:15) jabber: RecvBOSH (402): <body ver="1.6" xmlns="http://jabber.org/protocol/httpbind" host="desktop-uccc5rr" wait="30" secure="true" xmpp:version="1.0" maxpause="10" hold="1" inactivity="10" polling="10" sid="59b3021e-55c7-4779-9692-45786262a7ca" authid="39aca10d-7721-463b-88ef-b0666741aa94" from="desktop-uccc5rr" xmlns:stream="http://etherx.jabber.org/streams" requests="2" ack="131583939571905" xmlns:xmpp="urn:xmpp:xbosh"/>
(13:57:15) jabber: BOSH connection manager version 1.6
(13:57:15) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(13:57:15) connection: Connection error on 08830E80 (reason: 5 description: You require encryption, but it is not available on this server.)
(13:57:15) jabber: BOSH: Sending an empty request
(13:57:15) account: Disconnecting account mongo_test1@desktop-uccc5rr/ (00E62430)
(13:57:15) connection: Disconnecting connection 08830E80
(13:57:15) connection: Destroying connection 08830E80

Tigase log

2020-07-23 13:57:15.076 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null, port_props: {remote-host=localhost, port-no=5280, new-connections-throttling=1000, ifc=[Ljava.lang.String;@7a00ccd3, socket=plain, type=accept}
2020-07-23 13:57:15.091 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER:   [[bosh]] Connection started: null, type: accept, Socket: nullSocket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null
2020-07-23 13:57:15.156 [ConnectionOpenThread]  SocketThread.<clinit>()            WARNING:  17 socketReadThreads started.
2020-07-23 13:57:15.248 [ConnectionOpenThread]  SocketThread.<clinit>()            WARNING:  17 socketWriteThreads started.
2020-07-23 13:57:15.265 [pool-32-thread-1]  IOUtil.<clinit>()                      CONFIG:   using direct byte buffers with size 65,536 per buffer
2020-07-23 13:57:15.271 [pool-32-thread-1]  SocketIO.read()                        FINER:    Read from channel 388 bytes, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.273 [pool-32-thread-1]  XMPPIOService.processSocketData()      FINEST:   bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null, READ:POST /http-bind/ HTTP/1.1
Host: localhost
User-Agent: Pidgin 2.14.1 (libpurple 2.14.1)
Content-Encoding: text/xml; charset=utf-8
Content-Length: 232

<body content='text/xml; charset=utf-8' secure='true' to='desktop-uccc5rr' xml:lang='en' xmpp:version='1.0' ver='1.6' xmlns:xmpp='urn:xmpp:xbosh' rid='131583939571905' wait='60' hold='1' xmlns='http://jabber.org/protocol/httpbind'/>
2020-07-23 13:57:15.276 [pool-32-thread-1]  XMPPIOService.moveParsedPacketsToReceived()  FINEST: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null, Read packet: <body ver="1.6" xmlns="http://jabber.org/protocol/httpbind" to="desktop-uccc5rr" wait="60" secure="true" xmpp:version="1.0" hold="1" xml:lang="en" content="text/xml; charset=utf-8" rid="131583939571905" xmlns:xmpp="urn:xmpp:xbosh"/>
2020-07-23 13:57:15.277 [pool-32-thread-1]  SocketIO.read()                        FINER:    Read from channel 0 bytes, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.278 [pool-32-thread-1]  BoshConnectionManager.processSocketData()  FINER: Processing packet: body, type: null
2020-07-23 13:57:15.279 [pool-32-thread-1]  BoshConnectionManager.processSocketData()  FINEST: Processing socket data: from=null, to=null, DATA=<body ver="1.6" xmlns="http://jabber.org/protocol/httpbind" to="desktop-uccc5rr" wait="60" secure="true" xmpp:version="1.0" hold="1" xml:lang="en" content="text/xml; charset=utf-8" rid="131583939571905" xmlns:xmpp="urn:xmpp:xbosh"/>, SIZE=232, XMLNS=http://jabber.org/protocol/httpbind, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=null
2020-07-23 13:57:15.285 [pool-32-thread-1]  BoshConnectionManager.processSocketData()  FINE: CREATE : 59b3021e-55c7-4779-9692-45786262a7ca (Socket bosh session)
2020-07-23 13:57:15.291 [pool-32-thread-1]  BoshSession.sendBody()                 FINE:     No waitTimer for the Bosh connection! bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null
2020-07-23 13:57:15.292 [pool-32-thread-1]  BoshIOService.writeRawData()           FINEST:   Writing to socket:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 402
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type
Access-Control-Max-Age: 86400
Server: Tigase Bosh/8.0.0-b10083/6923973a

<body ver="1.6" xmlns="http://jabber.org/protocol/httpbind" host="desktop-uccc5rr" wait="30" secure="true" xmpp:version="1.0" maxpause="10" hold="1" inactivity="10" polling="10" sid="59b3021e-55c7-4779-9692-45786262a7ca" authid="39aca10d-7721-463b-88ef-b0666741aa94" from="desktop-uccc5rr" xmlns:stream="http://etherx.jabber.org/streams" requests="2" ack="131583939571905" xmlns:xmpp="urn:xmpp:xbosh"/>
2020-07-23 13:57:15.301 [pool-32-thread-1]  SocketIO.write()                       FINER:    SOCKET - Writing data, remaining: 681, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.302 [pool-32-thread-1]  SocketIO.write()                       FINER:    Wrote to channel 681 bytes, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.303 [pool-32-thread-1]  BoshSession.disconnected()             FINEST:   Disconnected called for: 0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059
2020-07-23 13:57:15.304 [pool-32-thread-1]  BoshSession.disconnected()             FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.308 [in_5-message-router]  MessageRouter.processPacket()       FINEST:   Processing packet: from=null, to=null, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_OPENED" xmlns="http://jabber.org/protocol/commands"><x type="submit" xmlns="jabber:x:data"><field var="session-id"><value>CData size: 36</value></field><field var="hostname"><value>CData size: 15</value></field><field var="xml:lang"><value>en</value></field></x></command></iq>, SIZE=501, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.312 [in_5-message-router]  MessageRouter.getLocalComponent()   FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.313 [in_5-message-router]  MessageRouter.getLocalComponent()   FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.313 [in_5-message-router]  MessageRouter.processPacket()       FINEST:   1. Packet will be processed by: sess-man@desktop-uccc5rr, from=null, to=null, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_OPENED" xmlns="http://jabber.org/protocol/commands"><x type="submit" xmlns="jabber:x:data"><field var="session-id"><value>CData size: 36</value></field><field var="hostname"><value>CData size: 15</value></field><field var="xml:lang"><value>en</value></field></x></command></iq>, SIZE=501, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.314 [in_21-sess-man]   SessionManager.processPacket()          FINEST:   Received packet: from=null, to=null, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_OPENED" xmlns="http://jabber.org/protocol/commands"><x type="submit" xmlns="jabber:x:data"><field var="session-id"><value>CData size: 36</value></field><field var="hostname"><value>CData size: 15</value></field><field var="xml:lang"><value>en</value></field></x></command></iq>, SIZE=501, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.318 [in_21-sess-man]   SessionManager.processCommand()         FINER:    STREAM_OPENED command from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.320 [session-open Queue Worker 5]  SessionManager$SessionOpenProc.process()  FINER: Adding resource connection for: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.321 [session-open Queue Worker 5]  SessionManager.createUserSession()  FINEST: Setting hostname desktop-uccc5rr for connection: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, VHostItem: Domain: desktop-uccc5rr, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: 8635fbc4-2d2e-456f-9ff7-f3150d7c4173, domainFilter: ALL, domainFilterDomains: null, c2sPortsAllowed: null, saslAllowedMechanisms: null
2020-07-23 13:57:15.321 [session-open Queue Worker 5]  SessionManager.createUserSession()  FINEST: Domain set for connectionId bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.323 [session-open Queue Worker 5]  SessionManager$SessionOpenProc.process()  FINEST: Setting session-id 39aca10d-7721-463b-88ef-b0666741aa94 for connection: XMPPResourceConnection=[user_jid=null, packets=0, connectioId=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, domain=desktop-uccc5rr, authState=NOT_AUTHORIZED, isAnon=false, isTmp=false, parentSession hash=0, parentSession liveTime=]
2020-07-23 13:57:15.328 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   Processing packet: from=sess-man@desktop-uccc5rr, to=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="result" from="sess-man@desktop-uccc5rr" to="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca"/>, SIZE=156, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result
2020-07-23 13:57:15.331 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.328 [session-open Queue Worker 5]  DomainFilter.filter()       FINEST:   Filtering (packet): from=null, to=null, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_OPENED" xmlns="http://jabber.org/protocol/commands"><x type="submit" xmlns="jabber:x:data"><field var="session-id"><value>CData size: 36</value></field><field var="hostname"><value>CData size: 15</value></field><field var="xml:lang"><value>en</value></field></x></command></iq>, SIZE=501, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.332 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   No componentID matches (fast lookup against exact address): bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, for map: [monitor@desktop-uccc5rr, message-archive@desktop-uccc5rr, eventbus@desktop-uccc5rr, ws2s@desktop-uccc5rr, c2s@desktop-uccc5rr, muc@desktop-uccc5rr, http@desktop-uccc5rr, vhost-man@desktop-uccc5rr, sess-man@desktop-uccc5rr, message-router@desktop-uccc5rr, stats@desktop-uccc5rr, bosh@desktop-uccc5rr, pubsub@desktop-uccc5rr, s2s@desktop-uccc5rr, amp@desktop-uccc5rr, upload@desktop-uccc5rr]; trying VHost lookup
2020-07-23 13:57:15.334 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.334 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   No componentID matches (fast lookup against exact address): bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, for map: [monitor@desktop-uccc5rr, message-archive@desktop-uccc5rr, eventbus@desktop-uccc5rr, ws2s@desktop-uccc5rr, c2s@desktop-uccc5rr, muc@desktop-uccc5rr, http@desktop-uccc5rr, vhost-man@desktop-uccc5rr, sess-man@desktop-uccc5rr, message-router@desktop-uccc5rr, stats@desktop-uccc5rr, bosh@desktop-uccc5rr, pubsub@desktop-uccc5rr, s2s@desktop-uccc5rr, amp@desktop-uccc5rr, upload@desktop-uccc5rr]; trying VHost lookup
2020-07-23 13:57:15.335 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   1. Packet will be processed by: bosh@desktop-uccc5rr, from=sess-man@desktop-uccc5rr, to=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, DATA=<iq id="dfbb5c3a-8cef-470f-8ca8-5f0c594963f9" type="result" from="sess-man@desktop-uccc5rr" to="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca"/>, SIZE=156, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result
2020-07-23 13:57:15.336 [pool-32-thread-2]  SocketIO.read()                        FINER:    Read from channel 358 bytes, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.337 [in_5-message-router]  MessageRouter.processPacket()       FINEST:   Processing packet: from=null, to=null, DATA=<iq id="6d78ce80-eacb-476e-b560-065dcf249411" type="get" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr"><command node="GETFEATURES" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=230, XMLNS=null, PRIORITY=HIGH, PERMISSION=NONE, TYPE=get
2020-07-23 13:57:15.339 [in_5-message-router]  MessageRouter.getLocalComponent()   FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.339 [in_5-message-router]  MessageRouter.getLocalComponent()   FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.339 [in_5-message-router]  MessageRouter.processPacket()       FINEST:   1. Packet will be processed by: sess-man@desktop-uccc5rr, from=null, to=null, DATA=<iq id="6d78ce80-eacb-476e-b560-065dcf249411" type="get" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr"><command node="GETFEATURES" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=230, XMLNS=null, PRIORITY=HIGH, PERMISSION=NONE, TYPE=get
2020-07-23 13:57:15.340 [in_21-sess-man]   SessionManager.processPacket()          FINEST:   Received packet: from=null, to=null, DATA=<iq id="6d78ce80-eacb-476e-b560-065dcf249411" type="get" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr"><command node="GETFEATURES" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=230, XMLNS=null, PRIORITY=HIGH, PERMISSION=NONE, TYPE=get
2020-07-23 13:57:15.340 [in_21-sess-man]   SessionManager.processCommand()         FINER:    GETFEATURES command from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.341 [in_21-sess-man]   JabberIqRegister.supStreamFeatures()    FINEST:   VHostItem: Domain: desktop-uccc5rr, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: 8635fbc4-2d2e-456f-9ff7-f3150d7c4173, domainFilter: ALL, domainFilterDomains: null, c2sPortsAllowed: null, saslAllowedMechanisms: null
2020-07-23 13:57:15.347 [pool-32-thread-2]  XMPPIOService.processSocketData()      FINEST:   bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null, READ:POST /http-bind/ HTTP/1.1
Host: localhost
User-Agent: Pidgin 2.14.1 (libpurple 2.14.1)
Content-Encoding: text/xml; charset=utf-8
Content-Length: 202

<body rid='131583939571906' sid='59b3021e-55c7-4779-9692-45786262a7ca' to='desktop-uccc5rr' xml:lang='en' xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh' type='terminate'></body>
2020-07-23 13:57:15.348 [pool-32-thread-2]  XMPPIOService.moveParsedPacketsToReceived()  FINEST: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280], jid: null, Read packet: <body type="terminate" xmlns="http://jabber.org/protocol/httpbind" to="desktop-uccc5rr" sid="59b3021e-55c7-4779-9692-45786262a7ca" xml:lang="en" rid="131583939571906" xmlns:xmpp="urn:xmpp:xbosh"/>
2020-07-23 13:57:15.366 [pool-32-thread-2]  SocketIO.read()                        FINER:    Read from channel -1 bytes, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[addr=/0:0:0:0:0:0:0:1,port=63059,localport=5280]
2020-07-23 13:57:15.374 [pool-32-thread-2]  BoshConnectionManager.processSocketData()  FINER: Processing packet: body, type: terminate
2020-07-23 13:57:15.376 [pool-32-thread-2]  BoshConnectionManager.processSocketData()  FINEST: Processing socket data: from=null, to=null, DATA=<body type="terminate" xmlns="http://jabber.org/protocol/httpbind" to="desktop-uccc5rr" sid="59b3021e-55c7-4779-9692-45786262a7ca" xml:lang="en" rid="131583939571906" xmlns:xmpp="urn:xmpp:xbosh"/>, SIZE=196, XMLNS=http://jabber.org/protocol/httpbind, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=terminate
2020-07-23 13:57:15.379 [pool-32-thread-2]  BoshSession.processSocketPacket()      FINEST:   [0] Processing socket packet: from=null, to=null, DATA=<body type="terminate" xmlns="http://jabber.org/protocol/httpbind" to="desktop-uccc5rr" sid="59b3021e-55c7-4779-9692-45786262a7ca" xml:lang="en" rid="131583939571906" xmlns:xmpp="urn:xmpp:xbosh"/>, SIZE=196, XMLNS=http://jabber.org/protocol/httpbind, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=terminate
2020-07-23 13:57:15.385 [pool-32-thread-2]  BoshSession.processSocketPacket()      FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (Canceling inactivityTimer: 0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.386 [pool-32-thread-2]  BoshSession.processSocketPacket()      FINEST:   Setting waitTimer for 30: 59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.387 [pool-32-thread-2]  BoshSession.processSocketPacket()      FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (Scheduling waitTimer: 0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.388 [pool-32-thread-2]  BoshSession.sendBody()                 FINEST:   Canceling waitTimer: 59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.388 [pool-32-thread-2]  BoshIOService.writeRawData()           FINEST:   Writing to socket:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 245
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type
Access-Control-Max-Age: 86400
Server: Tigase Bosh/8.0.0-b10083/6923973a

<body type="terminate" from="desktop-uccc5rr" host="desktop-uccc5rr" xmlns:stream="http://etherx.jabber.org/streams" xmlns="http://jabber.org/protocol/httpbind" secure="true" xmpp:version="1.0" ack="131583939571906" xmlns:xmpp="urn:xmpp:xbosh"/>
2020-07-23 13:57:15.389 [pool-32-thread-2]  SocketIO.write()                       FINER:    SOCKET - Writing data, remaining: 524, bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[unconnected]
2020-07-23 13:57:15.390 [pool-32-thread-2]  ConnectionManager.serviceStopped()     FINER:    [[bosh]] Connection stopped: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059, type: accept, Socket: bosh@desktop-uccc5rr/0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059 Socket[unconnected], jid: null
2020-07-23 13:57:15.391 [pool-32-thread-2]  BoshConnectionManager.xmppStreamClosed()  FINER: Stream closed.
2020-07-23 13:57:15.391 [pool-32-thread-2]  BoshConnectionManager.serviceStopped()  FINE:    REMOVE : 59b3021e-55c7-4779-9692-45786262a7ca (Closing bosh session)
2020-07-23 13:57:15.392 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   Disconnected called for: 0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059
2020-07-23 13:57:15.392 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.392 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.393 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   Disconnected called for: 0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059
2020-07-23 13:57:15.393 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.394 [pool-32-thread-2]  BoshSession.disconnected()             FINEST:   TIMER : 59b3021e-55c7-4779-9692-45786262a7ca (0:0:0:0:0:0:0:1_5280_0:0:0:0:0:0:0:1_63059)
2020-07-23 13:57:15.395 [pool-32-thread-2]  BoshConnectionManager.addOutStreamClosed()  FINEST: REMOVE : 59b3021e-55c7-4779-9692-45786262a7ca (Closing bosh session)
2020-07-23 13:57:15.396 [pool-32-thread-2]  BoshConnectionManager.addOutStreamClosed()  FINEST: REMOVE : 59b3021e-55c7-4779-9692-45786262a7ca (Closing bosh session)
2020-07-23 13:57:15.426 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   Processing packet: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.427 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.427 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.428 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   1. Packet will be processed by: sess-man@desktop-uccc5rr, from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.429 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   Processing packet: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="1bddca87-0365-400e-b5a4-216811c7e4a5" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.429 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.430 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : sess-man@desktop-uccc5rr
2020-07-23 13:57:15.430 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   1. Packet will be processed by: sess-man@desktop-uccc5rr, from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="1bddca87-0365-400e-b5a4-216811c7e4a5" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.462 [in_29-sess-man]   SessionManager.processPacket()          FINEST:   Received packet: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.462 [in_29-sess-man]   SessionManager.processCommand()         FINER:    STREAM_CLOSED command from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.463 [in_29-sess-man]   SessionManager.processPacket()          FINEST:   Received packet: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="1bddca87-0365-400e-b5a4-216811c7e4a5" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.463 [in_29-sess-man]   SessionManager.processCommand()         FINER:    STREAM_CLOSED command from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.469 [session-close Queue Worker 13]  SessionManager$SessionCloseProc.process()  FINEST: Executing connection close for: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.470 [session-close Queue Worker 13]  SessionManager.closeConnection()  FINER: Stream closed from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.471 [session-close Queue Worker 13]  DomainFilter.filter()     FINEST:   Filtering (packet): null
2020-07-23 13:57:15.471 [session-close Queue Worker 13]  DomainFilter.filter()     FINEST:   Filtering (packet): from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.471 [session-close Queue Worker 13]  SessionManager$SessionCloseProc.process()  FINEST: Executing connection close for: from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="1bddca87-0365-400e-b5a4-216811c7e4a5" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.472 [session-close Queue Worker 13]  SessionManager.closeConnection()  FINER: Stream closed from: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.472 [session-close Queue Worker 13]  SessionManager.closeConnection()  FINE: Can not find resource connection for connectionId: bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.472 [session-close Queue Worker 13]  SessionManager.closeConnection()  FINE: queuing connection bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca for user null for detail stale connection check - should not happen!!
2020-07-23 13:57:15.473 [session-close Queue Worker 13]  DomainFilter.filter()     FINEST:   Filtering (packet): from=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, to=sess-man@desktop-uccc5rr, DATA=<iq id="1bddca87-0365-400e-b5a4-216811c7e4a5" type="set" from="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca" to="sess-man@desktop-uccc5rr" retryCount="15" delay="15"><command node="STREAM_CLOSED" xmlns="http://jabber.org/protocol/commands"/></iq>, SIZE=259, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2020-07-23 13:57:15.470 [in_13-message-router]  MessageRouter.processPacket()      FINEST:   Processing packet: from=sess-man@desktop-uccc5rr, to=bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, DATA=<iq id="49c734e3-3147-4a7a-a39e-be41903cdf9a" type="result" from="sess-man@desktop-uccc5rr" to="bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca"/>, SIZE=156, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result
2020-07-23 13:57:15.475 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   Called for : bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca
2020-07-23 13:57:15.475 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST:   No componentID matches (fast lookup against exact address): bosh@desktop-uccc5rr/59b3021e-55c7-4779-9692-45786262a7ca, for map: [monitor@desktop-uccc5rr, message-archive@desktop-uccc5rr, eventbus@desktop-uccc5rr, ws2s@desktop-uccc5rr, c2s@desktop-uccc5rr, muc@desktop-uccc5rr, http@desktop-uccc5rr, vhost-man@desktop-uccc5rr, sess-man@desktop-uccc5rr, message-router@desktop-uccc5rr, stats@desktop-uccc5rr, bosh@desktop-uccc5rr, pubsub@desktop-uccc5rr, s2s@desktop-uccc5rr, amp@desktop-uccc5rr, upload@desktop-uccc5rr]; trying VHost lookup

config.tdsl

admins = [
    'admin@desktop-uccc5rr'
]
'config-type' = 'default'
debug = [ 'server','xmpp.impl','xmpp.XMPPIOService','io' ]
'default-virtual-host' = 'desktop-uccc5rr'
dataSource () {
    default () {
        uri = 'mongodb://tigase_user:tigase_pass@localhost/tigasedb'
    }
}
http () {
    setup () {
        'admin-password' = 'tigase'
        'admin-user' = 'config'
    }
#	rest {
        'dns-webservice' (active: false) {}
#    }
}
'message-archive' () {
}
monitoring () {
  jmx() {
    port = 9050
  }
  http() {
    port = 9080
  }
  snmp() {
    port = 9060
  }
}
muc () {
    'muc-logger' () {
    }
}
pubsub () {
    trusted = [ 'http@desktop-uccc5rr' ]
}
'sess-man' {
    'message-archive' () {
        'default-store-method' = message
        'required-store-method' = message
        'store-muc-messages' = true
    }
    'message-archive-xep-0136' () {
    }
    'urn:xmpp:mam:1' () {
    }
}
stats () {
    'stats-history-size' = '2160'
    'stats-update-interval' = '10'
    'stats-file-logger' (class: tigase.stats.CounterDataFileLogger) {
        frequency = '120'
        'stats-datetime' = 'false'
        'stats-datetime-format' = 'HH:mm:ss'
        'stats-directory' = 'logs/statistics'
        'stats-filename' = 'output'
        'stats-level' = 'WARNING'
        'stats-unixtime' = 'true'
    }
    'stats-logger' (class: tigase.stats.CounterDataLogger) {
        repository() {
            'default'() {
                'data-source' = 'default';
            }
        }
        frequency = '60'
    }
}
upload () {
}

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

I am now getting error that "You require encryption, but it is not available on this server." while it worked for 5222.

Encryption for regular socket (5222) and BOSH are slightly different. And by default BOSH doesn't use encryption (HTTP). Usual setup involves putting Tigase's BOSH endpoint behind dedicated connection manager/load balancer, that handles termination of encrypted connections and forwards plain HTTP requests to the Tigase.

However, you can enable HTTPS BOSH - either on default port or enable dedicated HTTPS port:

bosh () {
    connections () {
        5280 () {
            socket = plain
        }
        5281 () {
            socket = ssl
        }
    }
}

Giving the Pidgin log, Tigase log and Config file

In Pidgin do I need to change for account setup in Advanced Tab (below). Or anything in my config.tdsl (see below)
Connection Security = "Require encryption", "Use Encryption If available", "Use Old style SSL"
Tick Check Box "Allow Plaintext auth over unencrypted streams"

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

But I am able to connect from Tigase web client with http-bind url in the advanced field while login, with the same setup. Does Tigase web client not use connection manager/ load balancer

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

By default Tigase web client uses wss:// which stands for encrypted WebSocket connection. If you put the same URL (http://…:5280) as the URL then such endpoint will be used (unencrypted). This also significantly depends on your setup - for example if you start Tigase and it's webclient locally (on port "8080") it will also be served over unencrypted connection.

However - what's your objective? Why do you want to use BOSH? What do you try to achieve?

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

By default Tigase web client uses wss:// which stands for encrypted WebSocket connection. If you put the same URL (http://…:5280) as the URL then such endpoint will be used (unencrypted). This also significantly depends on your setup - for example if you start Tigase and it's webclient locally (on port "8080") it will also be served over unencrypted connection.

However - what's your objective? Why do you want to use BOSH? What do you try to achieve?

I am working on a Proof of Concept to integrate chat messaging to existing product. Requirement is to use the existing https security infrastructure (Firewall, proxy, WAF, API Gateway etc).
I have identified XMPP over BOSH on Tigase fits the requirement (no plain XMPP, websocket)
So currently doing this Black Box PoC on Windows 10 with Pidgin to validate functionality (features, security, performance) on XMPP over BOSH and then identify libraries/ apps fitting our requirement

Issue I am facing

  1. Tigase document does not have much details on setup of XMPP over BOSH. It focuses on XMPP on 5222
  2. Not much details available on XMPP over BOSH Libraries/ Apps suitable for
    a) iOS and Android - React Native (hybrid app), Native Application
    b) Web Browser - React based

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

I have identified XMPP over BOSH on Tigase fits the requirement (no plain XMPP, websocket)

Out of curiosity - why not WebSocket?

Tigase document does not have much details on setup of XMPP over BOSH. It focuses on XMPP on 5222

That's true, but in general BOSH could be considered as somewhat "legacy" solution and it's recommendable to use WebSocket.
Besides, Tigase follows specification for BOSH: XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH) and XEP-0206: XMPP Over BOSH.

Of course we would gladly improve our documentation with missing bits but we would have to know specifics about what is missing exactly.

Not much details available on XMPP over BOSH Libraries/ Apps suitable for
a) iOS and Android - React Native (hybrid app), Native Application

For Android (native app) you can use our JaXMPP library. For iOS we have Tigase Swift library, but it's written in Swift and doesn't support BOSH (only socket connection)

b) Web Browser - React based

You can use any of the available JavaScript libraries: xmpp.js or Strophe.js being the most popular. Alternatively, you can try our own library halcyon written in Kotlin with being multiplatform in mind (thus, possibility to use it from browser as well)

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

Encryption for regular socket (5222) and BOSH are slightly different. And by default BOSH doesn't use encryption (HTTP). Usual setup involves putting Tigase's BOSH endpoint behind dedicated connection manager/load balancer, that handles termination of encrypted connections and forwards plain HTTP requests to the Tigase.

That's true, but in general BOSH could be considered as somewhat "legacy" solution and it's recommendable to use WebSocket.

Can I use Apache HTTP Sever on my localhost, that can handle termination of encrypted connections and forwards plain HTTP requests to the Tigase. If yes can you suggest the complete correct apache httpd.conf setting for BOSH and Websocket with http-bind and when using "dns-webservice"

I tried enabling the below modules and the lines. But I am still facing issues.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyPass /http-bind/ http://localhost:5280/http-bind
RequestHeader set Host $host

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

It can be either apache or nginx. I don't have configuration handy but it's rather strightforward. Take a look at https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension#configuring-apache-to-proxy-connections and the last example:

<VirtualHost *:443>

    SSLEngine On

    # Set the path to SSL certificate
    # Usage: SSLCertificateFile /path/to/cert.pem
    SSLCertificateFile /etc/apache2/ssl/file.pem

    ProxyPass /http-bind/ http://localhost:5280/http-bind
    ProxyPassReverse /http-bind/ http://localhost:5280/http-bind
</VirtualHost>

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

I tried setting up Apache on my windows 10 desktop for http and https both with below settings but still getting error. Is there any error in my settings.

in config.tdsl

bosh () {
    connections () {
        5280 () {
            socket = 'plain'
        }
        5281 () {
            socket = 'ssl'
        }
    }
    seeOtherHost {}
}

Pidgin BOSH http url http://127.0.0.1/http-bind/ with below setting in apache

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass /http-bind/ http://127.0.0.1:5280/htt-bind/
    ProxyPassReverse /http-bind/ http://127.0.0.1:5280/http-bind/
</VirtualHost>

Pidgin BOSH https url https://127.0.0.1/http-bind/ with below setting in apache using Tigase server certificate created at the time of installation by Tigase

<VirtualHost *:443>
    SSLEngine On

    SSLCertificateFile "C:/Program Files/Tigase/certs/desktop-uccc5rr.pem"
    SSLCertificateChainFile "C:/Program Files/Tigase/certs/desktop-uccc5rr.pem"

    ProxyPreserveHost On
    ProxyPass /http-bind/ https://127.0.0.1:5281/http-bind/
    ProxyPassReverse /http-bind/ https://127.0.0.1:5281/http-bind/
</VirtualHost>

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

Please try pointing Pidgin directly to https://127.0.0.1:5281/http-bind/ - it should work directly.

Alternatively With Apache you could Proxy port 443 with ProxyPass to http in Tigase, i.e.:

<VirtualHost *:443>
    SSLEngine On

    ProxyPreserveHost On
    ProxyPass /http-bind/ http://127.0.0.1:5280/http-bind/
    ProxyPassReverse /http-bind/ http://127.0.0.1:5280/http-bind/
</VirtualHost>

from tigase-server.

ShubjeetPal avatar ShubjeetPal commented on May 21, 2024

Using Pidgin directly on windows 10 to https://127.0.0.1:5281/http-bind/ - its giving below authentication error. Sharing screenshot of pidgin setup. Pidgin and Tigase log
For proxy port 443 so you are suggesting to use without certificate?

image
image
image

Pidgin Log

(00:33:54) account: Connecting to account mongo_test1@desktop-uccc5rr/.
(00:33:54) connection: Connecting. gc = 045D1C00
(00:33:54) dnsquery: Performing DNS lookup for 127.0.0.1
(00:33:54) dnsquery: IP resolved for 127.0.0.1
(00:33:54) proxy: Attempting connection to 127.0.0.1
(00:33:54) proxy: Connecting to 127.0.0.1:5281 with no proxy
(00:33:54) proxy: Connection in progress
(00:33:54) proxy: Connecting to 127.0.0.1:5281.
(00:33:54) proxy: Connected to 127.0.0.1:5281.
(00:33:54) nss: SSL version 3.3 using 128-bit AES-GCM with 128-bit AEAD MAC
Server Auth: 1024-bit RSA, Key Exchange: 256-bit ECDHE, Compression: NULL
Cipher Suite Name: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
(00:33:54) nss: subject=CN=default,CN=*.default,[email protected],OU=XMPP Service,O=Tigase.org issuer=CN=default,CN=*.default,[email protected],OU=XMPP Service,O=Tigase.org
(00:33:54) certificate/x509/tls_cached: Starting verify for 127.0.0.1
(00:33:54) certificate/x509/tls_cached: Checking for cached cert...
(00:33:54) certificate/x509/tls_cached: ...Found cached cert
(00:33:54) nss/x509: Loading certificate from C:\Users\acer\AppData\Roaming\.purple\certificates\x509\tls_peers\127.0.0.1
(00:33:54) certificate/x509/tls_cached: Peer cert matched cached
(00:33:54) nss/x509: Exporting certificate to C:\Users\acer\AppData\Roaming\.purple\certificates\x509\tls_peers\127.0.0.1
(00:33:54) util: Writing file C:\Users\acer\AppData\Roaming\.purple\certificates\x509\tls_peers\127.0.0.1
(00:33:54) nss: Trusting CN=default,CN=*.default,[email protected],OU=XMPP Service,O=Tigase.org
(00:33:54) certificate: Successfully verified certificate for 127.0.0.1
(00:33:54) jabber: bosh: httpconn 045D1BC0 re-connected
(00:33:54) jabber: SendBOSH Boot (ssl)(233): <body content='text/xml; charset=utf-8' secure='true' to='desktop-uccc5rr' xml:lang='en' xmpp:version='1.0' ver='1.6' xmlns:xmpp='urn:xmpp:xbosh' rid='3227944431257279' wait='60' hold='1' xmlns='http://jabber.org/protocol/httpbind'/>
(00:33:54) jabber: RecvBOSH (ssl)(403): <body ver="1.6" xmlns:xmpp="urn:xmpp:xbosh" host="desktop-uccc5rr" sid="32e36f23-b865-4a8e-9791-b114a2a54030" xmpp:version="1.0" maxpause="10" xmlns:stream="http://etherx.jabber.org/streams" polling="10" authid="fde45bac-c62c-4c2d-a489-f92ce6e88c1e" ack="3227944431257279" from="desktop-uccc5rr" secure="true" xmlns="http://jabber.org/protocol/httpbind" wait="30" requests="2" inactivity="10" hold="1"/>
(00:33:54) jabber: BOSH connection manager version 1.6
(00:33:54) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(00:33:54) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(00:33:54) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(00:33:54) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(00:33:54) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <iq xmlns='jabber:client' type='get' id='purpledebf315a'><query xmlns='jabber:iq:auth'><username>mongo_test1</username></query></iq>
(00:33:54) g_log: xmlnode_get_child_with_namespace: assertion `parent != NULL' failed
(00:33:54) jabber: BOSH: Sending an empty request
(00:33:56) jabber: RecvBOSH (ssl)(826): <body from="desktop-uccc5rr" secure="true" xmlns:xmpp="urn:xmpp:xbosh" host="desktop-uccc5rr" xmlns="http://jabber.org/protocol/httpbind" xmpp:version="1.0" ack="3227944431257280" xmlns:stream="http://etherx.jabber.org/streams"><stream:features xmlns="jabber:client"><auth xmlns="http://jabber.org/features/iq-auth"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-256</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><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></stream:features></body>
(00:33:56) sasl: Mechs found: SCRAM-SHA-256 SCRAM-SHA-1 PLAIN ANONYMOUS
(00:33:56) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' xmlns:ga='http://www.google.com/talk/protocol/auth' ga:client-uses-full-bind-result='true'>password removed</auth>
(00:33:56) jabber: BOSH: Sending an empty request
(00:33:57) jabber: RecvBOSH (ssl)(371): <body from="desktop-uccc5rr" secure="true" xmlns:xmpp="urn:xmpp:xbosh" host="desktop-uccc5rr" xmlns="http://jabber.org/protocol/httpbind" xmpp:version="1.0" ack="3227944431257281" xmlns:stream="http://etherx.jabber.org/streams"><iq xmlns="jabber:client" type="result" id="purpledebf315a"><query xmlns="jabber:iq:auth"><username/><password/><resource/></query></iq></body>
(00:33:57) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <iq xmlns='jabber:client' type='set' id='purpledebf315b'><query xmlns='jabber:iq:auth'><username>mongo_test1</username><resource>Home</resource><password>password removed</password></query></iq>
(00:33:57) jabber: BOSH: Sending an empty request
(00:33:58) jabber: RecvBOSH (ssl)(286): <body from="desktop-uccc5rr" secure="true" xmlns:xmpp="urn:xmpp:xbosh" host="desktop-uccc5rr" xmlns="http://jabber.org/protocol/httpbind" xmpp:version="1.0" ack="3227944431257282" xmlns:stream="http://etherx.jabber.org/streams"><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></body>
(00:33:58) jabber: BOSH: Sending an empty request
(00:33:59) util: Writing file prefs.xml to directory C:\Users\acer\AppData\Roaming\.purple
(00:33:59) util: Writing file C:\Users\acer\AppData\Roaming\.purple\prefs.xml
(00:33:59) util: Writing file accounts.xml to directory C:\Users\acer\AppData\Roaming\.purple
(00:33:59) util: Writing file C:\Users\acer\AppData\Roaming\.purple\accounts.xml
(00:33:59) jabber: RecvBOSH (ssl)(1050): <body from="desktop-uccc5rr" secure="true" xmlns:xmpp="urn:xmpp:xbosh" host="desktop-uccc5rr" xmlns="http://jabber.org/protocol/httpbind" xmpp:version="1.0" ack="3227944431257283" xmlns:stream="http://etherx.jabber.org/streams"><iq xmlns="jabber:client" type="error" id="purpledebf315b"><query xmlns="jabber:iq:auth"><username>mongo_test1</username><resource>Home</resource><password>test1</password></query><error code="401" type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind</text></error></iq><iq xmlns="jabber:client" type="error" id="purpledebf315b"><query xmlns="jabber:iq:auth"><username>mongo_test1</username><resource>Home</resource><password>test1</password></query><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Service not available.</text></error></iq></body>
(00:33:59) connection: Connection error on 045D1C00 (reason: 2 description: 401: Not Authorized)
(00:33:59) jabber: Unhandled IQ with id purpledebf315b
(00:33:59) jabber: BOSH: Sending an empty request
(00:33:59) account: Disconnecting account mongo_test1@desktop-uccc5rr/ (02602078)

Tigase_log.txt

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

Which pidgin versin do you use? It's definitely doing something odd - first it asks for jabber:iq:auth form (even without waiting for stream features):

(00:33:54) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <iq xmlns='jabber:client' type='get' id='purpledebf315a'><query xmlns='jabber:iq:auth'><username>mongo_test1</username></query></iq>

Then in performs SASL auth correctly after receiving the futures (to which it receives <success/> response):

(00:33:56) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' xmlns:ga='http://www.google.com/talk/protocol/auth' ga:client-uses-full-bind-result='true'>password removed</auth>

And afterwards it tries to authenticate with jabber:iq:auth:

(00:33:57) jabber: Sending (ssl) (mongo_test1@desktop-uccc5rr): <iq xmlns='jabber:client' type='set' id='purpledebf315b'><query xmlns='jabber:iq:auth'><username>mongo_test1</username><resource>Home</resource><password>password removed</password></query></iq>

to which it receives "not authorized" error:

<iq xmlns="jabber:client" type="error" id="purpledebf315b">
    <query xmlns="jabber:iq:auth">
        <username>mongo_test1</username>
        <resource>Home</resource>
        <password>test1</password>
    </query>
    <error code="401" type="auth">
        <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        <text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">You must bind the resource first:
            http://www.xmpp.org/rfcs/rfc3920.html#bind
        </text>
    </error>
</iq>
<iq xmlns="jabber:client" type="error" id="purpledebf315b">
    <query xmlns="jabber:iq:auth">
        <username>mongo_test1</username>
        <resource>Home</resource>
        <password>test1</password>
    </query>
    <error code="503" type="cancel">
        <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        <text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Service not available.</text>
    </error>
</iq>

Please try using the latest version of Pidgin and/or report this issue to their bugtracker.

from tigase-server.

Neustradamus avatar Neustradamus commented on May 21, 2024

@ShubjeetPal: Have you looked the @woj-tek comment?

Note that Pidgin is not the best XMPP client.

You have a client list here:

from tigase-server.

woj-tek avatar woj-tek commented on May 21, 2024

Closing due to lack of feedback

@Neustradamus PLEASE DON'T BUMP old issues!

from tigase-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.