0

I've put the following snippet into my ejabberd.cfg, under the modules section:

{mod_register, [
                   {ip_access, "my.ip.add.ress"},
                   %%% some default rules included with the cfg file %%%
               ]},

Alongside this, the following access rule is in place:

{access, register, [{allow, all}]}

This was to restrict registration to a single client IP address.

While the server still works as normal for registered users, in-channel registrations cause clients to display a 503 error.

Why is this error showing up, and how can I enable in-channel registration from a single IP?

Jules
  • 201
  • 3
  • 11

1 Answers1

0

You may be looking for the registration_timeout option, as described in ejabberd documentation for mod_register:

registration_timeout: Timeout. This option limits the frequency of registration from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this number of seconds after his previous registration will receive an error resource-constraint with the explanation: “Users are not allowed to register accounts so quickly”. The timeout is expressed in seconds, and it must be an integer. To disable this limitation, instead of an integer put a word like: infinity. Default value: 600 seconds.

  • I just tried updating it to `infinity`, and running `service ejabberd restart` for good measure. No dice. Any other ideas? – Jules Sep 24 '15 at 12:53
  • It should work. Look in your logs. – Mickaël Rémond Sep 24 '15 at 13:11
  • [Here's a Gist with the last two entries in the logfile](https://gist.github.com/verandaguy/d4611d1c2bf81e4b2564). The first one is when the connection was established, the second one when the 503 was sent back (replaced IP addresses with placeholder text, obviously). I can't make heads or tails of the Erlang stack trace, which is my main problem right now. – Jules Sep 24 '15 at 13:17
  • Which version of ejabberd are you using ? What your log show is that you have a crash in ejabberd. It is not application of the limits, it is simply that the register process crash and thus does not complete. It is likely a misconconfiguration or installation issue. – Mickaël Rémond Sep 24 '15 at 13:24
  • ... Which is why I'm essentially asking if I've misconfigured ejabberd in my original question. `ejabberdctl status` says I've got version 2.1.11 running. – Jules Sep 24 '15 at 13:26
  • So, answer is that you have a crash. It may be a bug in that version (it is 4 years old) or a problem in the option configuration that is not known by ejabberd and could cause it to crash. What I am sure is that in recent version, this works properly (15.x) – Mickaël Rémond Sep 24 '15 at 14:09