@ejabberd_xmlrpc:build_fault_response:386 Error -118 A problem '{error,invalid_account_data}'

Hello .
I am working with ejabberd 16.01. and I am using php-jabber-rpc () for creating jabber user through php.

php-jabber-rpc requires ejabberd_xmlrpc. Thus I setup ejabberd with ejabberd_xmlrpc. But when I try to use ejabberd_xmlrpc I have the following error in ejabberd log file.

@ejabberd_listener:accept:333 (#Port<0.7363>) Accepted connection 192.168.0.102:51026 -> 192.168.0.100:4560
[info] <0.661.0>@ejabberd_http:init:158 started: {gen_tcp,#Port<0.7363>}
[warning] <0.661.0>@ejabberd_xmlrpc:build_fault_response:386 Error -118
A problem '{error,invalid_account_data}' occurred executing the command register with arguments
[{host,<<"esfam.auf.org">>},
{user,<<"Ivan">>},
{password,<<"someStrongPassword">>}]

Please could someone help me to understand the meaning of this error ?

Best ragard.

Well, apparently the account

Well, apparently the account with that username doesn't exist, or the host is not defined in ejabberd.yml, or the password is not valid for that account.

Hi. Thanks for your answer. I

Hi.
Thanks for your answer. I ckeck my setting and I still get the same error.
The user I am using for testing purpose is able to use pidgin hence the username, the passord and the host are defined.

hosts:
  - "esfam.auf.org"
listen:
  -
     port: 4560
           module: ejabberd_xmlrpc
           maxsessions: 10
           timeout: 5000
           access_commands:
           xmlrpc_access:
           commands: all
           options: []
acl:
     xmlrpc_access:
           user:
               - "admin": "esfam.auf.org"
access:
      xmlrpc_access:
      xmlrpc_access: allow

Please could someone help me. I dont know what's wrong with my settings.

Add also the

Add also the line

commands_admin_access: xmlrpc_access

When calling the command, remember to provide the admin credentials. Try this Python client, that works for me (using ejabberd 17.04, ans should work with your old version too):

import xmlrpclib

server_url = 'http://127.0.0.1:4560'
server = xmlrpclib.ServerProxy(server_url)

EJABBERD_XMLRPC_LOGIN = {'user':'admin', 'server':'localhost', 'password':'mypass11', 'admin':True}

def ejabberdctl(command, data):
    fn = getattr(server, command)
    return fn(EJABBERD_XMLRPC_LOGIN, data)

print ""
print "Calling with auth details..."
result = ejabberdctl('register', {'user':'user4', 'host':'localhost', 'password':'newpass'})
print "Results: "
print result
Syndicate content