Marc Haber | 1 May 10:13 2011
Picon

Debian Migration from 2.0.1 to 2.1.5 (lenny => squeeze)

Hi,

I am currently trying to migrate my personal ejabberd from a host
running Debian lenny to a different host running Debian squeeze. So I
have to face the challenges of (a) changing the host name in the
mnesia stuff and (b) doing the actual upgrade.

First, I dumped the database on the old host (ejabberd 2.0.1) to a dump file:
| ejabberdctl --node ejabberd <at> nechayev backup /tmp/backupfile
and moved the backup file to the new host.

The new host was installed with Debian squeeze, ejabberd 2.1.5
installed and running.

The procedure outlined in the README.Debian.gz file to change the host
name does not work as advertised:
| (jabberd)root <at> cucaracha:/home/mh# sudo -u ejabberd erl -pa /usr/lib/ejabberd/ebin
| Erlang R14A (erts-5.8) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
|
| Eshell V5.8  (abort with ^G)
| 1> mnesia_convert:change_node_name('ejabberd <at> nechayev','ejabberd <at> cucaracha',"/tmp/backupfile","/tmp/newnewfile").
| ** exception error: undefined function mnesia_convert:change_node_name/4
| 2>

I thus tried to use the older migration procedure that was outlined in
a forum entry on ejabberd.im:
| cucaracha:/home/mh# wget http://www.ejabberd.im/files/contributions/convert.erl
| cucaracha:/home/mh# erl
| Erlang (BEAM) emulator version 5.6.3 [source] [smp:2] [async-threads:0] [kernel-poll:false]
|
(Continue reading)

Marc Haber | 1 May 19:14 2011
Picon

Changing hostname on Debian with 2.1.5 (was: Debian Migration from 2.0.1 to 2.1.5 (lenny => squeeze))

Hi,

On Sun, May 01, 2011 at 10:13:02AM +0200, Marc Haber wrote:
> I am currently trying to migrate my personal ejabberd from a host
> running Debian lenny to a different host running Debian squeeze. So I
> have to face the challenges of (a) changing the host name in the
> mnesia stuff and (b) doing the actual upgrade.

I have divided the problem into its two parts. The update from Debian
lenny to Debian squeeze was done with the old hostname and was done
fine. This left me with reaming the host.

I changed the hostname to the new value and proceeded to use the
"Change Computer Hostname" procedure from the Ejabberd Guide.

This failed already in step one:
cucaracha:/var/lib/ejabberd# ejabberdctl --node ejabber <at> nechayev start
Failed RPC connection to the node ejabber <at> nechayev: nodedown
cucaracha:/var/lib/ejabberd#

The procedure does not outline on which host one is supposed to do
this procedure. I guess that the procedure is to be done with the new
host name already in effect, otherwise the --node $OLDNODENAME
wouldn't make sense, would it?

What am I doing wrong?

Greetings
Marc

(Continue reading)

Franky Orson | 2 May 09:45 2011
Picon

Re: Any way to get the Nickname of the 'from' on some Presence 'Subscribe' request?



On Sat, Apr 30, 2011 at 5:22 AM, Badlop <badlop <at> gmail.com> wrote:
2011/4/29 Franky Orson <franky.orson <at> gmail.com>:
> sudo ejabberdctl get_vcard bob myTest.com NICKNAME

Try to provide the username and host in lowercase.

I tried this - no go - same issue
 

> BTW, the following fails eventough the nickname is set for that user bob - I
> check via some client IQ - any idea? (using ejabberd 2.1.3)

That command works for me using 2.1.6.
Maybe it's a bug in 2.1.3

Maybe - I'll upgrade to 2.1.6 soon and will try again then

Thanks!
 


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Franky Orson | 2 May 10:13 2011
Picon

Ejbabberd *not* returning xmpp version on <stream:stream/> from time to time - Starttls

Running Ejabberd 2.1.3 - I connect fine with my own client using SASL most of the time but then as I'm testing disconnection and re-connection, I'm finding that Ejabberd is not setting the version when replying to my <stream:stream> request - see below - 1st paragraph is when it is working fine, then the 2nd paragraph is when the 'version' is not being sent as part of the reply from Ejbabberd like if it was not supporting XMPP version 1.0 as defined in RFC 3920 - this is mostly happening after a reconnection with the server but it is working 2 times out of the 3 - weird!

2011-05-02 00:34:20.681 [79543:40b] SEND: <?xml version='1.0'?>
2011-05-02 00:34:20.681 [79543:40b] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='myTest-server.com'>
2011-05-02 00:34:20.821 [79543:40b] RECV: <?xml version='1.0'?>
// Version being set fine here on this attempt...
2011-05-02 00:34:20.822 [79543:40b] RECV: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1519821603' from='myTest-server.com' version='1.0' xml:lang='en'>
2011-05-02 00:34:20.822 [79543:40b] RECV: <stream:features>
2011-05-02 00:34:20.822 [79543:40b] RECV: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
2011-05-02 00:34:20.823 [79543:40b] RECV: <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
2011-05-02 00:34:20.823 [79543:40b] RECV: <mechanism>
2011-05-02 00:34:20.823 [79543:40b] RECV: DIGEST-MD5</mechanism>
2011-05-02 00:34:20.823 [79543:40b] RECV: <mechanism>
2011-05-02 00:34:20.823 [79543:40b] RECV: PLAIN</mechanism>
2011-05-02 00:34:20.824 [79543:40b] RECV: </mechanisms>
2011-05-02 00:34:20.824 [79543:40b] RECV: <register xmlns='http://jabber.org/features/iq-register'/>
2011-05-02 00:34:20.824 [79543:40b] RECV: </stream:features>
2011-05-02 00:34:20.825 [79543:40b] SEND: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
...
...

Handskake working, etc...

** Now, here the issue after reconnecting (works 2 times out of 3) - the sample below failed and makes my client thinks Ejabberd does support SAS (not RFC 3920 compliant), hence I initiate the old way of authenticating with 'jabber:iq:auth'

2011-05-02 00:34:50.222 [79543:40b] SEND: <?xml version='1.0'?>
2011-05-02 00:34:50.222 [79543:40b] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='myTest-server.com'>
2011-05-02 00:34:50.299 [79543:40b] RECV: <?xml version='1.0'?>
// SEE BELOW - NO VERSION SET ON REPLY FROM EJABBERD!
2011-05-02 00:34:50.300 [79543:40b] RECV: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1443222350' from='myTest-server.com' xml:lang='en'>
2011-05-02 00:34:50.300 [79543:40b] SEND: <iq type="get">
  <query xmlns="jabber:iq:auth"/>
</iq>
2011-05-02 00:34:50.300 [79543:40b] RECV: <stream:error>
2011-05-02 00:34:50.300 [79543:40b] RECV: <invalid-namespace xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
2011-05-02 00:34:50.301 [79543:40b] RECV: </stream:error>

Settings as:

{listen,
 [
  {5222, ejabberd_c2s, [
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
                        %%zlib,
                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},
]}.

Any idea why this would be happening?

Thanks in advance,

--Frank

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Stephan Maihöfer | 2 May 13:03 2011
Picon

messages to wrong ressources

hi,

we are still trying to figure out why we get these duplicate messages:

<message xmlns='jabber:client' from='22515077 <at> muc.example.com/steam'
to='1762237 <at> example.com/web_2143633635130417940746693' type='groupchat'><body>doppelt</body></message>
<message xmlns='jabber:client' from='22515077 <at> muc.example.com/steam'
to='1762237 <at> example.com/api_push' type='groupchat'><body>doppelt</body></message>

we get both of these in the client connected as something else entirely (say, /other_client).

we wrote this message the message was written on /web_2143633635130417940746693.

/api_push is nothing but a temporary resource that we use in connection with mod_rest
to update presence information of our user. i "admit" that we do not properly leave
the room after sending presence there, but no client should get messages that are
not adressed to another resource, right?

these message appear only on the clients that are connected with the same _bare_
jid as the same writing clients, other clients get the message only once as it should be.

i can not find any obvious error in the ejabberd 2.1.3 we are using, so i am
asking the list if anyone has seen things like this happen?

greetings,
stephan
Konstantin Khomoutov | 2 May 16:22 2011
Picon
Picon

Re: Changing hostname on Debian with 2.1.5 (was: Debian Migration from 2.0.1 to 2.1.5 (lenny => squeeze))

On Sun, May 01, 2011 at 07:14:28PM +0200, Marc Haber wrote:

> On Sun, May 01, 2011 at 10:13:02AM +0200, Marc Haber wrote:
> > I am currently trying to migrate my personal ejabberd from a host
> > running Debian lenny to a different host running Debian squeeze. So I
> > have to face the challenges of (a) changing the host name in the
> > mnesia stuff and (b) doing the actual upgrade.
> 
> I have divided the problem into its two parts. The update from Debian
> lenny to Debian squeeze was done with the old hostname and was done
> fine. This left me with reaming the host.
> 
> I changed the hostname to the new value and proceeded to use the
> "Change Computer Hostname" procedure from the Ejabberd Guide.
> 
> This failed already in step one:
> cucaracha:/var/lib/ejabberd# ejabberdctl --node ejabber <at> nechayev start
> Failed RPC connection to the node ejabber <at> nechayev: nodedown
> cucaracha:/var/lib/ejabberd#
> 
> The procedure does not outline on which host one is supposed to do
> this procedure. I guess that the procedure is to be done with the new
> host name already in effect, otherwise the --node $OLDNODENAME
> wouldn't make sense, would it?
> 
> What am I doing wrong?

Hi, Marc!

(I maintain ejabberd in Debian, so I'm probably the right person to talk
to about this issue.)

The problem is two-fold.

The first thing to consider is that the ejabberdctl script in the Debian
package differs from that of upstream: in Debian, start/stop/restart
actions are carried out by the rc-script /etc/init.d/ejabberd which calls
two "back-end" scripts -- /usr/sbin/ejabberd which is used to start an
instance of ejabberd and /usr/sbin/ejabberdctl which is used to control
that running instance.
The ejabberdctl script from upstream performs both of these tasks.

I think the closest thing to replace
# ejabberdctl --node ejabberd <at> oldnode start
is changing the ERLANG_NODE variable in the /etc/default/ejabberd
file to read "ejabberd <at> oldnode" and then start it using 
# /etc/init.d/ejabberd start
or even
# /etc/init.d/ejabberd live
to easily see if it was able to start OK.

The second thing is converting the backup file.
This can be done as described in points 6-8 in the "Change Computer
Hostname" section of the official guide.

Alternatively, the conversion can be done as described in README.Debian,
but the command for conversion will be different:
ejabberd_admin:mnesia_change_nodename
instead of
mnesia_convert:change_node_name
(the meaning and ordering of the arguments is be the same).

In any case, the Debian package's README file has to be updated.
I would be grateful if you would summarise the results of your quest
here so I would have a clearer idea about what exactly to write there.
Badlop | 2 May 17:34 2011
Picon

Re: Mod_multicast service-unavailable

I've now updated this branch:
https://git.process-one.net/~badlop/ejabberd/badlop-ejabberd/commits/multicast-2.1.x

When compiled, installed, and configured mod_multicast with empty options,
your disco#info query works.

---
Badlop
ProcessOne
Badlop | 2 May 19:00 2011
Picon

Re: Ejbabberd *not* returning xmpp version on <stream:stream/> from time to time - Starttls

2011/5/2 Franky Orson <franky.orson <at> gmail.com>:
> Running Ejabberd 2.1.3 - I connect fine with my own client using SASL most
> of the time but then as I'm testing disconnection and re-connection, I'm
> finding that Ejabberd is not setting the version when replying to my
> <stream:stream> request - see below - 1st paragraph is when it is working

>  this is mostly happening after a reconnection with
> the server but it is working 2 times out of the 3 - weird!

Looking at the ejabberd 2.1.3 source code, the lack of version in the
response can only happen when the request had unexpected xmlns:stream,
hostname, or version. So, if your client sends exactly the same
request, ejabberd should produce exactly the same response. But
according to your tests, ejabberd doesn't.

And apparently this happens only when the client reconnects, and only
sometimes, and only with a custom client that only you have.

To continue investigating, you either:
A) explain how to reproduce the problem
B) or join the ejabberd chatroom, and when we meet, we'll do live
debugging. You'll need to make small changes to ejabberd source code,
compile, provoke the problem, tell me the result. And repeat until we
find some clue about what's wrong in ejabberd, or in your client.

---
Badlop
ProcessOne
Franky Orson | 2 May 21:09 2011
Picon

Re: Ejbabberd *not* returning xmpp version on <stream:stream/> from time to time - Starttls

Thank you Badlop and Yes I'm going to try and reproduce the problem (assuming I can) with a smaller test case.

It is very likely that this might not be an Ejabberd issue - The way I workaround the issue right now is by delaying reconnection by a bit and in this case the issue doesn't manifest - am wondering if this could be a race condition in my client (where I had forced disconnections in my tests to happen at various times) and trying to reconnect too fast maybe - would this pattern explain this answer back from Ejabberd in that case? I'll dig more and let you know in anycase. Thanks again.

On Mon, May 2, 2011 at 10:00 AM, Badlop <badlop <at> gmail.com> wrote:
2011/5/2 Franky Orson <franky.orson <at> gmail.com>:
> Running Ejabberd 2.1.3 - I connect fine with my own client using SASL most
> of the time but then as I'm testing disconnection and re-connection, I'm
> finding that Ejabberd is not setting the version when replying to my
> <stream:stream> request - see below - 1st paragraph is when it is working

>  this is mostly happening after a reconnection with
> the server but it is working 2 times out of the 3 - weird!


Looking at the ejabberd 2.1.3 source code, the lack of version in the
response can only happen when the request had unexpected xmlns:stream,
hostname, or version. So, if your client sends exactly the same
request, ejabberd should produce exactly the same response. But
according to your tests, ejabberd doesn't.

And apparently this happens only when the client reconnects, and only
sometimes, and only with a custom client that only you have.

To continue investigating, you either:
A) explain how to reproduce the problem
B) or join the ejabberd chatroom, and when we meet, we'll do live
debugging. You'll need to make small changes to ejabberd source code,
compile, provoke the problem, tell me the result. And repeat until we
find some clue about what's wrong in ejabberd, or in your client.


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Jorge Díaz | 2 May 22:07 2011
Picon

Re: Mod_multicast service-unavailable

Thanks a lot for your fast response.


What you mean with empty options?
It disco#info query won't work if you setup a host option?
Just to ensure.

Thanks again.

Jorge


On Mon, May 2, 2011 at 12:34 PM, Badlop <badlop <at> gmail.com> wrote:
I've now updated this branch:
https://git.process-one.net/~badlop/ejabberd/badlop-ejabberd/commits/multicast-2.1.x

When compiled, installed, and configured mod_multicast with empty options,
your disco#info query works.


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd



--
Jorge Díaz
email: jorgedf <at> gmail.com
spain: +34 620829213
us: +1 (415) 309-8039
chile: +56 (9) 87038661
skype: xurdedf

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

Gmane