Projects tigase _server server-core Issues #1435
Setting XMPP user status (#1435)
Unknown opened 4 years ago

I'm trying to set user status with REST API.

The API Key is working, but getting "succes: false" in the response.

I've added the 'user-status-endpoint@http.{clusterNode}' in the domain trusted jid's.

Am I missing something?

Thanks in advance

This is a part of the log:

[2021-04-14 19:43:26:177] [FINEST  ] [   in_2-message-router ] MessageRouter.processPacket()    : Processing packet: from=http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, to=null, DATA=<iq type="set" id="95819e52-4a4c-4170-ab08-cd8774cc6c37" to="sess-man@company.local" from="user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72"><command xmlns="http://jabber.org/protocol/commands" node="USER_STATUS"><x xmlns="jabber:x:data" type="submit"><field var="jid"><value>CData size: 33</value></field><field var="available"><value>CData size: 4</value></field></x><presence><priority>-1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.google.com/xmpp/client/caps" ext="voice-v1" ver="8.1.2-b10915/87522b38"/></presence></command></iq>, SIZE=622, XMLNS=null, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set
[2021-04-14 19:43:26:178] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): Called for : sess-man@company.local
[2021-04-14 19:43:26:178] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): sess-man@company.local, for map: [sess-man@servername.company, amp@servername.company, http@servername.company, message-archive@servername.company, stats@servername.company, ws2s@servername.company, s2s@servername.company, bosh@servername.company, eventbus@servername.company, muc@servername.company, vhost-man@servername.company, message-router@servername.company, pubsub@servername.company, monitor@servername.company, c2s@servername.company]; trying VHost lookup
[2021-04-14 19:43:26:179] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): Called for : sess-man@company.local
[2021-04-14 19:43:26:179] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): sess-man@company.local, for map: [sess-man@servername.company, amp@servername.company, http@servername.company, message-archive@servername.company, stats@servername.company, ws2s@servername.company, s2s@servername.company, bosh@servername.company, eventbus@servername.company, muc@servername.company, vhost-man@servername.company, message-router@servername.company, pubsub@servername.company, monitor@servername.company, c2s@servername.company]; trying VHost lookup
[2021-04-14 19:43:26:179] [FINEST  ] [   in_2-message-router ] MessageRouter.processPacket()    : 1. Packet will be processed by: sess-man@servername.company, from=http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, to=null, DATA=<iq type="set" id="95819e52-4a4c-4170-ab08-cd8774cc6c37" to="sess-man@company.local" from="user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72"><command xmlns="http://jabber.org/protocol/commands" node="USER_STATUS"><x xmlns="jabber:x:data" type="submit"><field var="jid"><value>CData size: 33</value></field><field var="available"><value>CData size: 4</value></field></x><presence><priority>-1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.google.com/xmpp/client/caps" ext="voice-v1" ver="8.1.2-b10915/87522b38"/></presence></command></iq>, SIZE=622, XMLNS=null, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set
[2021-04-14 19:43:26:179] [FINEST  ] [         in_2-sess-man ] SessionManager.processPacket()   : Received packet: from=http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, to=null, DATA=<iq type="set" id="95819e52-4a4c-4170-ab08-cd8774cc6c37" to="sess-man@company.local" from="user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72"><command xmlns="http://jabber.org/protocol/commands" node="USER_STATUS"><x xmlns="jabber:x:data" type="submit"><field var="jid"><value>CData size: 33</value></field><field var="available"><value>CData size: 4</value></field></x><presence><priority>-1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.google.com/xmpp/client/caps" ext="voice-v1" ver="8.1.2-b10915/87522b38"/></presence></command></iq>, SIZE=622, XMLNS=null, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set
[2021-04-14 19:43:26:179] [FINER   ] [         in_2-sess-man ] SessionManager.processCommand()  : USER_STATUS command from: http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce
[2021-04-14 19:43:26:180] [FINEST  ] [   in_2-message-router ] MessageRouter.processPacket()    : Processing packet: from=sess-man@company.local, to=http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, DATA=<iq type="error" id="95819e52-4a4c-4170-ab08-cd8774cc6c37" to="user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72" from="sess-man@company.local"><command xmlns="http://jabber.org/protocol/commands" node="USER_STATUS"><x xmlns="jabber:x:data" type="submit"><field var="jid"><value>CData size: 33</value></field><field var="available"><value>CData size: 4</value></field></x><presence><priority>-1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.google.com/xmpp/client/caps" ext="voice-v1" ver="8.1.2-b10915/87522b38"/></presence></command><error type="auth" code="403"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">CData size: 30</text></error></iq>, SIZE=819, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=error
[2021-04-14 19:43:26:180] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): Called for : user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72
[2021-04-14 19:43:26:180] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72, for map: [sess-man@servername.company, amp@servername.company, http@servername.company, message-archive@servername.company, stats@servername.company, ws2s@servername.company, s2s@servername.company, bosh@servername.company, eventbus@servername.company, muc@servername.company, vhost-man@servername.company, message-router@servername.company, pubsub@servername.company, monitor@servername.company, c2s@servername.company]; trying VHost lookup
[2021-04-14 19:43:26:181] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): No component name matches (VHost lookup against component name): user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72, for map: [vhost-man, amp, c2s, ws2s, monitor, bosh, stats, s2s, eventbus, http, muc, sess-man, message-archive, message-router, pubsub], for all VHosts: [default, company.local]; trying other forms of addressing
[2021-04-14 19:43:26:181] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): Component matched: user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72, for comp: [vhost-man, amp, c2s, ws2s, monitor, bosh, stats, s2s, eventbus, http, muc, sess-man, message-archive, message-router, pubsub], basename: servername.company
[2021-04-14 19:43:26:181] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): Called for : http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce
[2021-04-14 19:43:26:181] [FINEST  ] [   in_2-message-router ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, for map: [sess-man@servername.company, amp@servername.company, http@servername.company, message-archive@servername.company, stats@servername.company, ws2s@servername.company, s2s@servername.company, bosh@servername.company, eventbus@servername.company, muc@servername.company, vhost-man@servername.company, message-router@servername.company, pubsub@servername.company, monitor@servername.company, c2s@servername.company]; trying VHost lookup
[2021-04-14 19:43:26:181] [FINEST  ] [   in_2-message-router ] MessageRouter.processPacket()    : 1. Packet will be processed by: http@servername.company, from=sess-man@company.local, to=http@servername.company/042ce18d-b45b-4b01-8af2-acc55c25c3ce, DATA=<iq type="error" id="95819e52-4a4c-4170-ab08-cd8774cc6c37" to="user-status-endpoint@http.servername.company/893d9cdae7a27cce6332766359994bd4daeaf65149a62d2a8b5ee0bcc0913d72" from="sess-man@company.local"><command xmlns="http://jabber.org/protocol/commands" node="USER_STATUS"><x xmlns="jabber:x:data" type="submit"><field var="jid"><value>CData size: 33</value></field><field var="available"><value>CData size: 4</value></field></x><presence><priority>-1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://www.google.com/xmpp/client/caps" ext="voice-v1" ver="8.1.2-b10915/87522b38"/></presence></command><error type="auth" code="403"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">CData size: 30</text></error></iq>, SIZE=819, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=error
Unknown commented 4 years ago

I've added the 'user-status-endpoint@http.{clusterNode}' in the domain trusted jid's.

How exactly did you configured that? Do I understand correctly that you've done it for the particular VHost only? Could you try configuring it in the config.tdsl?

Unknown commented 4 years ago

I just added this in config.tdsl, but still getting "succes": false in the REST API.

pubsub () {
    trusted = [ 'http@{clusterNode}', 'user-status-endpoint@http.{clusterNode}' ]
}
Unknown commented 4 years ago

It should be in the root context (or sess-man):

trusted = [ 'http@{clusterNode}', 'user-status-endpoint@http.{clusterNode}' ]
Unknown commented 4 years ago

It should be in the root context (or sess-man):

trusted = [ 'http@{clusterNode}', 'user-status-endpoint@http.{clusterNode}' ]

That does it! Thanks @woj-tek !!

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