[ejabberd] mod_rest does not return process_rosteritems results

Kirk Bateman kirk.bateman at gmail.com
Wed Nov 14 19:52:05 MSK 2012


David,

Not sure how accurate this still is but there certainly used to be an issue
that mod_rest is capable of executing commands but not capable of actually
returning any data.

For example creating accounts works but possibly results are only displayed
in the shell that is running ejabberd.

Badlop may be able to clarify that ?

Cheers

Kirk
On 14 Nov 2012 15:01, "David Cunningham" <dcunningham at voisonics.com> wrote:

> Hi Kirk,
>
> Thanks for the suggestion. Here are the logs:
>
> ---- When using ejabberdctl ----
>
> =INFO REPORT==== 2012-11-15 01:52:17 ===
> D(<0.5019.0>:ejabberd_commands:314) : Executing command
> mod_admin_extra:process_rosteritems with Args=["list",
>
> "any",
>
> "any",
>
> "any",
>
> "any"]
>
>
> ---- When using mod_rest ----
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> I(<0.449.0>:ejabberd_listener:281) : (#Port<0.5874>) Accepted connection
> {{12,34,56,78},53863} -> {{12,34,56,78},5280}
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> D(<0.5023.0>:ejabberd_http:142) : S: [{["rest"],mod_rest},
>                                       {["captcha"],ejabberd_captcha},
>                                       {["admin"],ejabberd_web_admin},
>                                       {["http-bind"],mod_http_bind},
>                                       {["http-poll"],ejabberd_http_poll}]
>
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> I(<0.5023.0>:ejabberd_http:146) : started: {gen_tcp,#Port<0.5874>}
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> D(<0.5023.0>:ejabberd_http:268) : (#Port<0.5874>) http query: 'POST' /rest/
>
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> D(<0.5023.0>:ejabberd_http:447) : client data: "process_rosteritems list
> any any any any"
>
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> D(<0.5023.0>:ejabberd_http:346) : ["rest"] matches ["rest"]
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> I(<0.5023.0>:mod_rest:92) : Data: "process_rosteritems list any any any
> any"
>
> =INFO REPORT==== 2012-11-15 01:53:58 ===
> D(<0.5023.0>:ejabberd_commands:314) : Executing command
> mod_admin_extra:process_rosteritems with Args=["list",
>
> "any",
>
> "any",
>
> "any",
>
> "any"]
>
>
> Thanks.
>
>
> On 14 November 2012 03:32, Kirk Bateman <kirk.bateman at gmail.com> wrote:
>
>> David,
>>
>> You'll get a much more useful response if you post the ejabberd.log for
>> when the mod_rest request gets processed.
>>
>> Regards
>>
>> Kirk Bateman
>>  On 13 Nov 2012 22:58, "David Cunningham" <dcunningham at voisonics.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I'm having a problem with using mod_rest to get a list of everyone's
>>> presence roster. When I run "ejabberdctl process_rosteritems" from the
>>> command line I get the results fine, but when calling it via mod_rest it
>>> always returns "0". Examples below.
>>> Anyone have any idea why?
>>> Thanks in advance.
>>>
>>>
>>> # ejabberdctl process_rosteritems list any any any any
>>> There are 2 roster items in total.
>>>
>>> =INFO REPORT==== 14-Nov-2012::09:51:52 ===
>>> D(<5084.4579.0>:ejabberd_commands:314) : Executing command
>>> mod_admin_extra:process_rosteritems with Args=["list",
>>>
>>> "any",
>>>
>>> "any",
>>>
>>> "any",
>>>
>>> "any"]
>>> ** at node ejabberd at myhost **
>>> Matches: bob at myhost user at myhost
>>> Progress 50% - visited 1 - deleted 1
>>> Matches: user at myhost bob at myhost
>>> Progress 100% - visited 2 - deleted 2
>>>
>>>
>>> # wget http://myhost:5280/rest/ --server-response --post-data
>>> 'process_rosteritems list any any any any' -O index.html
>>> --2012-11-14 09:51:20--  http://myhost:5280/rest/
>>> Resolving myhost... 12.34.56.78
>>> Connecting to myhost|12.34.56.78|:5280... connected.
>>> HTTP request sent, awaiting response...
>>>   HTTP/1.0 200 OK
>>>   Connection: keep-alive
>>>   Content-Type: text/html; charset=utf-8
>>>   Content-Length: 1
>>> Length: 1 [text/html]
>>> Saving to: `index.html'
>>>
>>> 100%[=====================================================================================>]
>>> 1           --.-K/s   in 0s
>>>
>>> 2012-11-14 09:51:20 (65.5 KB/s) - `index.html' saved [1/1]
>>>
>>> # cat index.html
>>> 0
>>>
>>>
>>> --
>>> David Cunningham, Voisonics
>>> http://voisonics.com/
>>> USA: +1 213 221 1092
>>> UK: +44 (0) 20 3298 1642
>>> Australia: +61 (0) 2 8063 9019
>>>
>>>
>>> _______________________________________________
>>> ejabberd mailing list
>>> ejabberd at jabber.ru
>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>>
>>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>>
>
>
> --
> David Cunningham, Voisonics
> http://voisonics.com/
> USA: +1 213 221 1092
> UK: +44 (0) 20 3298 1642
> Australia: +61 (0) 2 8063 9019
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20121114/de39a887/attachment-0001.html>


More information about the ejabberd mailing list