No response on iq:register when successful

Hi,

I use some code to register new users on my ejabberd 2.1.9.

Here are the packages:

Request:

<iq id="CEoU6-7" to="localhost" type="get">
  <query xmlns="jabber:iq:register"/>
</iq>

Response from server:

<iq from="localhost" to="backline@localhost/local" id="CEoU6-7"
type="result">
  <query xmlns="jabber:iq:register">
    <instructions>Choose a username and password to register with this server</instructions>
    <username>backline</username>
    <password/>
    <registered/>
  </query>
</iq>

Request to create the user:

<iq id="CEoU6-8" to="localhost" type="set">
  <query xmlns="jabber:iq:register">
    <username>TestID_12</username>
    <registered/>
    <password>HFDGog4c7k</password>
  </query>
</iq>

My problem now is, that the user is created, but ejabberd doesn't tell me that. I'd expect something like

<iq type='result' id='CEoU6-8'/>

but that message isn't sent.

Am I making something wrong?

Greets

Tomcat wrote: My problem now

Tomcat wrote:

My problem now is, that the user is created, but ejabberd doesn't tell me that. I'd expect something like

<iq type='result' id='CEoU6-8'/>

but that message isn't sent.

It's strange that you don't get an Iq Result. I tried with ejabberd 2.1.9, and the query receives a response:

<iq id='2:456312'
	type='set'
	to='localhost'>
  <query xmlns='jabber:iq:register'>
    <username>user11123<username>
    <password>mypass11<password>
  <query>
<iq>

<iq from='localhost'
	to='user@localhost/tka'
	id='2:456312'
	type='result'>
  <query xmlns='jabber:iq:register'>
    <username>user11123<username>
    <password>mypass11<password>
  <query>
<iq>

I tried it again from another

I tried it again from another programm language, but the result is the same. Here is the log of the messages. After that the account is created, but I don't get a package telling me this. I'm only getting a response, when something goes wrong. Any idea what i'm doing wrong?

2011-11-25 17:20:30.4981 DEBUG: Send : <iq type="get" to="localhost" id="12345" xmlns="jabber:client">
  <query xmlns="jabber:iq:register" />
</iq>
2011-11-25 17:20:30.5121 DEBUG: Received : <iq xmlns="jabber:client" from="localhost" to="jadmin@localhost/PROTEL-JANTH" id="12345" type="result">
  <query xmlns="jabber:iq:register">
    <instructions>Choose a username and password to register with this server</instructions>
    <username>jadmin</username>
    <password />
    <registered />
  </query>
</iq>
2011-11-25 17:20:32.8902 DEBUG: Send : <iq type="set" to="localhost" id="64789" xmlns="jabber:client">
  <query xmlns="jabber:iq:register">
    <username>Test1</username>
    <password>bla</password>
  </query>
</iq>

Could any config-parameter change the behaviour? Here are my differences to the example-config:

%% In-band registration allows registration of any possible username.
%% To disable in-band registration, replace 'allow' with 'deny'.
{access, register_from, [{allow, admin}]}.

%% By default the frequency of account registrations from the same IP
%% is limited to 1 account every 10 minutes. To disable, specify: infinity
{registration_timeout, 0}.

and

  %%
  %% When a user registers, send a notification to
  %% these XMPP accounts.
  %%
  {registration_watchers, ["jadmin@localhost"]},

  %%
  %% Only clients in the server machine can register accounts
  %%
%%   {ip_access, [{allow, "192.168.0.0/16"},
%%        {deny, "0.0.0.0/0"}]},

  %%
  %% Local c2s or remote s2s users cannot register accounts
  %%
  {access_from, register_from},

After some testing I found an

After some testing I found an error in the log file:

=ERROR REPORT==== 2011-12-05 14:05:18.272 ===
E(<0.331.0>:gen_iq_handler:118) : {function_clause,
[{inet_parse,ntoa,
[{"jadmin","localhost",[]}]},
{mod_register,
send_registration_notifications,2},
{mod_register,try_register,5},
{mod_register,
try_register_or_set_password,9},
{gen_iq_handler,process_iq,6},
{gen_iq_handler,handle_info,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}

and after disabling this line :

  {registration_watchers, ["jadmin@localhost"]},

everything works fine. Is my syntax wrong or is this a bug?

Seems a bug. Probably in the

Seems a bug. Probably in the code that you added.

Syndicate content