mathiasertl / django-xmpp-account

Django application for Jabber account registration
GNU General Public License v3.0
30 stars 7 forks source link

ejabberd and mod_last #10

Closed kjde closed 9 years ago

kjde commented 9 years ago

Since I updated ejabberd and dxa I get an ERROR 500 on the registration completion page of zsim.de. The good part is that the account is still registered and everything except this works.

This is the error log of ejabberd:

CRASH REPORT Process <0.13313.3> with 0 neighbours crashed with reason: call to undefined function mod_last_odbc:store_last_info("kase4k", "zsim.de", 1420974002, "Registered")

And this is the log created by dxa:

  File "/home/jabberac/django-xmpp-account/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    except Exception as e:

  File "/home/jabberac/django-xmpp-account/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)

  File "./core/views.py", line 59, in dispatch
    except UnicodeEncodeError:

  File "/home/jabberac/django-xmpp-account/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)

  File "/home/jabberac/django-xmpp-account/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 171, in post
    form = self.get_form(form_class)

  File "./core/views.py", line 144, in form_valid
    purpose=self.purpose).get(key=self.kwargs['key'])

  File "./register/views.py", line 101, in handle_key

  File "./backends/ejabberd_xmlrpc.py", line 97, in create
    self.client = xmlrpclib.ServerProxy(HOST, **kwargs)

  File "./backends/ejabberd_xmlrpc.py", line 78, in rpc
    ``ejabberd-contrib`` repository. Configuring the interface is simple::

  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)

  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose

  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)

  File "/usr/lib/python2.7/xmlrpclib.py", line 1294, in single_request
    response = h.getresponse(buffering=True)

  File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
    response.begin()

  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()

  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)

BadStatusLine: ''

mod_last seems to be a requirement for dxa. I would like to see an config flag where I can disable mod_last support.

mod_last:
    db_type: odbc
mathiasertl commented 9 years ago

Hi,

The last activity is set because ejabberdctl delete_old_users also deletes users that have never logged in at all. If a user registers, but doesn't configure his client right away, e.g. a daily cronjob would frequently delete accounts.

In any case, the issue is with ejabberd-contrib, specifically mod_admin_extra. We have encountered the same issue before. If you compile modules yourself, apply this patch. The packages in our apt-repository are already patched.

If fixing mod_admin_extra itself is not an option for you, please let me know - I will implement the option right away.

kjde commented 9 years ago

Thank you. I applied the patch and everything works fine again. You made a great job!

mathiasertl commented 9 years ago

Thank you very much! It's good to have nice feedback. Thank you!