Jérôme Sautret | 3 Aug 2010 17:33
Favicon

[ANN] ejabberd 2.1.5 and exmpp 0.9.5 bugfix releases

Hello,

We are pleased to announce the bugfix releases ejabberd 2.1.5 and exmpp 0.9.5.

Regarding ejabberd 2.1.5:

The main changes are:
- Erlang/OTP R12 support fixed
- Erlang/OTP R14A support added
- OpenSSL 0.9.8 or higher is required
- BOSH: New optional connection attribute process-delay
- C2S: Don't ask for client certificate when using TLS
- C2S: Inform client that SSL session caching is disabled
- CTL: Fix problem when FIREWALL_WINDOW options for erl kernel were used
- CTL: Some systems delete the lock dir; in such case don't use Flock at all
- Caps: Support all the hash functions required by XEP-0115
- Config: Fix typo in --enable-transient_supervisors
- Config: New configure option: --enable-nif
- Extauth: Support parallel script running
- MUC: Allow admins to see private rooms in disco
- ODBC: Correct handling of SQL boolean types
- ODBC: Discard too old queued requests (the caller has already got a timeout)
- ODBC: Fixes wrong SQL escaping when --enable-full-xml is set
- ODBC: Use ets instead of asking supervisor in ejabberd_odbc_sup:get_pids/1
- Pubsub: Enforce disco features results
- S2S: When logging s2s out connection attempt or success, log if TLS is used
- Shared Rosters: When account is deleted, delete also member of stored rosters

Check the Release Notes for a more complete list of changes:
http://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.1.5
(Continue reading)

Jérôme Sautret | 6 Aug 2010 17:26
Favicon

[ANN] ejabberd 3.0.0-alpha-1 for testing

Hello again,

Today we are pleased to announce ejabberd 3.0.0-alpha-1.

This first alpha includes three major changes compared to ejabberd 2.1.5:
exmpp library is used, gen_storage for a database abstraction layer,
and Massive Hosting which isn't yet usable.

Many tables have changed both in Mnesia and MySQL/PgSQL/ODBC.
Fortunately, now ejabberd is able to create tables, update the tables
and reformat their content in Mnesia and also in external databases.
Or at least it should do.

Please note that the database schema used in this preliminary release
is not yet definitive, and it will probably change in the next alpha
and beta releases.

When compiling the source code, it is necessary to install exmpp:
http://exmpp.org/

Recommendation: try this alpha release far away from a production server.
Try it with an empty database, or with a copy of your existing database.
Please report bugs you find, including logged errors if any, in the usual
 https://support.process-one.net/browse/EJAB
or in this mailing list.

For more information check the release notes included in the release and in
https://git.process-one.net/ejabberd/mainline/blobs/raw/master/doc/release_notes_3.0.0.txt

The download page for preliminary releases is:
(Continue reading)

George Hazan | 7 Aug 2010 20:12
Picon

Re: ejabberd 3.0.0-alpha-1 for testing

   Bonjour, Jerome!
   Vous avez ecrit Fri, 6 Aug 2010 17:26:40 +0200:

JS> Today we are pleased to announce ejabberd 3.0.0-alpha-1.

No more 2.x development?

--

-- 
WMBR, George Hazan.
Evgeniy Khramtsov | 8 Aug 2010 06:02
Picon
Gravatar

Re: ejabberd 3.0.0-alpha-1 for testing

08.08.2010 04:12, George Hazan wrote:
> No more 2.x development?
>    

Critical bugfixes only.

--

-- 
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:xram <at> jabber.ru.
David Gregory | 9 Aug 2010 20:54

extauth issue - script aborting due to exception vs. quitting because of shutdown of ejabberd

I’m having an issue where my .py authentication script is shutting down due to an exception.  I’m using a close variation of this:

 

http://tkabber.jabber.ru/files/contributions/check_mysql_python.txt

 

The way this is written, it will abort on any exception.  Leaving ejabberd with no external authentication.  This isn’t very fault tolerant.

 

In my particular case, the exception is mysql related:

  File "/etc/ejabberd/JabberAuth.py", line 135, in ?

    op_result = auth(ejab_request[1], ejab_request[2], ejab_request[3])

  File "/etc/ejabberd/JabberAuth.py", line 98, in auth

    data=db_entry(in_user)

  File "/etc/ejabberd/JabberAuth.py", line 84, in db_entry

    dbcur.execute("SELECT %s,%s FROM %s WHERE %s ='%s'"%(db_username_field,db_password_field , db_table, db_username_field, in_user))

  File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute

    self.errorhandler(self, exc, value)

  File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler

    raise errorclass, errorvalue

_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')

 

This particular exception isn’t anything to do with ejabberd, obviously.  It’s my problem.

 

I could, on certain exceptions, keep looping and waiting for input, rather than quitting the python script.

 

However----

 

If I do that, and I have to restart ejabberd for other reasons, I get multiple JabberAuth.py instances running.  I don’t want that.

 

Here’s my question: How does ejabberd tell an extauth script to quit gracefully?  It seems like, at the moment, it sends “bad input”, which causes an exception, which causes the script to quit – This is a guess, however.  How can I have my script detect the difference between a legitimate quit request and an exception?

 

The protocol listed here:

https://git.process-one.net/ejabberd/mainline/blobs/raw/2.1.x/doc/dev.html#htoc8

 

doesn’t seem to provide any answers.  I’m hoping someone can help me.

 

Thanks!

 

-Dave

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Markus | 10 Aug 2010 09:22

Connection via BOSH http-bind is not listed in ejabberdctl connected_users

Hi,

I'm using ejabberd 2.1.4 and authenticating users via PLAIN authentication.
I'm using a anonymous login. The user can specify a username but a password is not necessary
(config: [{auth_method, [anonymous]}, {allow_multiple_connections, false},   {anonymous_protocol, both}])

This is how I negotiate the connection:

1. client to server (start session)
 <body xmlns="http://jabber.org/protocol/httpbind" hold="1" rid="311985980" to="chat2.myserver.com" route="chat2.myserver.com:5280" wait="60" xml:lang="en" xmlns:xmpp="urn:xmpp:bosh" xmpp:version="1.0"/>

2. server to client (session id)
 <body xmlns='http://jabber.org/protocol/httpbind' sid='c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='chat2.myserver.com' secure='true' authid='2757744332' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>ANONYMOUS</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='HzhW199FSAS7rIkHllLdacqERmE='/><register xmlns='http://jabber.org/features/iq-register'/></stream:features></body>

3. client to server (login with username and no password check)
 <body xmlns="http://jabber.org/protocol/httpbind" rid="311985981" sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AEJPU0hfTVVDXzE5MTk4Nl83NQA0YzYwZjkwOTFhMjI5</auth></body>

4. server to client (login successful)
 <body xmlns='http://jabber.org/protocol/httpbind'><success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/></body>

5. client to server (restart stream)
 <body xmlns="http://jabber.org/protocol/httpbind" rid="311985982" sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83" to="chat2.myserver.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true" xmpp:version="1.0"/>

6. server to client (stream features)
<body xmlns='http://jabber.org/protocol/httpbind' sid='c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='chat2.myserver.com' secure='true' authid='2191765278' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='HzhW199FSAS7rIkHllLdacqERmE='/><register xmlns='http://jabber.org/features/iq-register'/></stream:features></body>

7. client to server (bind resource)
<body xmlns="http://jabber.org/protocol/httpbind" rid="311985983" sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83"><iq xmlns="jabber:client" type="set" id="4c60f909380b1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>resource</resource></bind></iq></body>

8.server to client (full jid)
 <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' id='4c60f909380b1' type='result'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>BOSH_MUC_191986_75 <at> chat2.myserver.com/resource</jid></bind></iq></body>

Authenticaton seems to work according to the ejabberd.log:

 "Accepted authentication for BOSH_MUC_191986_75 by ejabberd_auth_anonymous"


No error is shown but the user is not listed in "ejabberdctl connected_users".
Am I missing something?

Thanks for your help!

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Jesse Thompson | 10 Aug 2010 16:27
Picon

Re: extauth issue - script aborting due to exception vs. quitting because of shutdown of ejabberd

On 08/09/2010 01:54 PM, David Gregory wrote:
> I’m having an issue where my .py authentication script is shutting down
> due to an exception. I’m using a close variation of this:
>
> http://tkabber.jabber.ru/files/contributions/check_mysql_python.txt
>
> The way this is written, it will abort on any exception. Leaving
> ejabberd with no external authentication. This isn’t very fault tolerant.
>
> In my particular case, the exception is mysql related:
>
> File "/etc/ejabberd/JabberAuth.py", line 135, in ?
>
> op_result = auth(ejab_request[1], ejab_request[2], ejab_request[3])
>
> File "/etc/ejabberd/JabberAuth.py", line 98, in auth
>
> data=db_entry(in_user)
>
> File "/etc/ejabberd/JabberAuth.py", line 84, in db_entry
>
> dbcur.execute("SELECT %s,%s FROM %s WHERE %s
> ='%s'"%(db_username_field,db_password_field , db_table,
> db_username_field, in_user))
>
> File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163,
> in execute
>
> self.errorhandler(self, exc, value)
>
> File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line
> 35, in defaulterrorhandler
>
> raise errorclass, errorvalue
>
> _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')
>
> This particular exception isn’t anything to do with ejabberd, obviously.
> It’s my problem.
>
> I could, on certain exceptions, keep looping and waiting for input,
> rather than quitting the python script.
>
> However----
>
> If I do that, and I have to restart ejabberd for other reasons, I get
> multiple JabberAuth.py instances running. I don’t want that.
>
> Here’s my question: How does ejabberd tell an extauth script to quit
> gracefully? It seems like, at the moment, it sends “bad input”, which
> causes an exception, which causes the script to quit – This is a guess,
> however. How can I have my script detect the difference between a
> legitimate quit request and an exception?
>
> The protocol listed here:
>
> https://git.process-one.net/ejabberd/mainline/blobs/raw/2.1.x/doc/dev.html#htoc8
>
> doesn’t seem to provide any answers. I’m hoping someone can help me.

I think that you need to exit() if if len(input_length) is not 2

Jesse

>
> Thanks!
>
> -Dave
>
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd <at> jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

Attachment (smime.p7s): application/pkcs7-signature, 3403 bytes
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Rick Moynihan | 11 Aug 2010 13:41

ODBC vs Native MySQL

Hi all,

I'm just beginning to get stuck in to ejabberd configuration and
module development.  One of our requirements (amongst others) is to
authenticate against a MySQL database.  Rather than go via an external
script, which was proving to be a little hard to administer, we've
created an ejabberd Erlang module that authenticates against our
database.

We're currently using unixodbc for this job, but I've noticed a
comment at the end of this post which suggests that this isn't
recommended:

https://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+an+ODBC+relational+database

Is this still the case?  If so

1) Why isn't odbc recommended?

2) How do I go about using the native mysql driver?

3) How do I use the native driver with ejabberd?

4) We're also considering migrating from mnesia to mysql...  Are there
any instructions on what is required to do this with the native
driver?

Many thanks,

R.
Yann Leboulanger | 12 Aug 2010 22:28

Re: Error when moving a user to another group

On 07/29/2010 02:04 PM, Yann Leboulanger wrote:
> On 02/01/2010 03:41 AM, Evgeniy Khramtsov wrote:
>> Yann Leboulanger wrote:
>>> Yann Leboulanger wrote:
>>>> Hi,
>>>>
>>>> I use ejabberd 2.1.1 with MySQL to store rosters. Since I upgraded to
>>>> 2.1.1, I have an error when I change the groups of my contacts:
>>>>
>>>> =ERROR REPORT==== 2010-01-26 22:20:36 ===
>>>> E(<0.16553.7>:ejabberd_odbc:317) : SQL transaction restarts exceeded
>>>> ** Restarts: 10
>>>> ** Last abort reason: "#23000Duplicate entry 'MY_USERNAME-CONTACT_JID'
>>>> for key 'i_rosteru_user_jid'"
>>>> ** Stacktrace: [{ejabberd_odbc,sql_query_t,1},
>>>> {odbc_queries,update_roster,5},
>>>> {mod_roster_odbc,'-process_item_set/3-fun-0-',7},
>>>> {ejabberd_odbc,outer_transaction,3},
>>>> {ejabberd_odbc,handle_call,3},
>>>> {gen_server,handle_msg,5},
>>>> {proc_lib,init_p_do_apply,3}]
>>>> ** When State == {state,<0.16554.7>,mysql}
>>>>
>>>> It happens only in one of my 2 domain hosted on this server.
>>>>
>>>> Any idea what could be the reason?
>>>>
>>>> Thanks for your help!
>>>
>>> No idea? That's really annoying to not be able to change the group of a
>>> contact :/
>>>
>>
>> Enable logging in MySQL to see what happens. It is hard to say anything
>> without SQL logs.
>>
>
> Here are SQL logs when I move a contact in another group:
>
> 100729 13:56:01 275 Query begin
> 275 Query select username, jid, nick, subscription, ask, askmessage,
> server, subscribe, type from rosterusers where username='ME' and
> jid='CONTACT'
> 275 Query update rosterusers set username='ME', jid='CONTACT',
> nick='NICK', subscription='B', ask='N', askmessage='', server='N',
> subscribe='', type='item' where username='ME' and jid='CONTACT'
> 275 Query insert into rosterusers(username, jid, nick, subscription,
> ask, askmessage, server, subscribe, type) values ('ME', 'CONTACT',
> 'NICK', 'B', 'N', '', 'N', '', 'item')
> 275 Query rollback
>
>
> 1/ I don't understand why there is a update in rosterusers table, only
> rostergroups should be updated
> 2/ There should definitively not be a insert, which cause the
> rostergroups update to be aborded.
>
> Any idea why this happen?

Am I the only one with this problem? Any idea why ejabberd try to 
re-insert the user in database?

--

-- 
Yann
Evgeniy Khramtsov | 13 Aug 2010 06:10
Picon
Gravatar

Re: Error when moving a user to another group

13.08.2010 06:28, Yann Leboulanger wrote:
> On 07/29/2010 02:04 PM, Yann Leboulanger wrote:
>>
>> Here are SQL logs when I move a contact in another group:
>>
>> 100729 13:56:01 275 Query begin
>> 275 Query select username, jid, nick, subscription, ask, askmessage,
>> server, subscribe, type from rosterusers where username='ME' and
>> jid='CONTACT'
>> 275 Query update rosterusers set username='ME', jid='CONTACT',
>> nick='NICK', subscription='B', ask='N', askmessage='', server='N',
>> subscribe='', type='item' where username='ME' and jid='CONTACT'
>> 275 Query insert into rosterusers(username, jid, nick, subscription,
>> ask, askmessage, server, subscribe, type) values ('ME', 'CONTACT',
>> 'NICK', 'B', 'N', '', 'N', '', 'item')
>> 275 Query rollback
>>
>>
>> 1/ I don't understand why there is a update in rosterusers table, only
>> rostergroups should be updated
>> 2/ There should definitively not be a insert, which cause the
>> rostergroups update to be aborded.
>>
>> Any idea why this happen?
>
> Am I the only one with this problem? Any idea why ejabberd try to 
> re-insert the user in database?
>

Seems so. Are you using the most recent version of mysql driver?

--

-- 
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:xram <at> jabber.ru.

Gmane