We were using ejabberd (2.1.5 through 2.1.8) on a Windows Server 2003 box, but the "session logout" problems got out of hand and we made a CentOS 6 virtual machine and installed ejabberd 2.1.8 on it, from the repos.
I took the binary backup from our 2003 server and put it in "/var/lib/ejabberd/spool/ejabberd.backup". I used the web UI to import the data to our new server, and tried connecting using Pidgin. Everything looked fine.
Our setup is not far from the default settings: we cut the server-to-server out, configured the hostname, we use the internal authentication, changed the language to "fr", etc.
The problem is, when you send a request to change your nick, the server replies accordingly to the XMPP standards, but it won't keep it.
Using Pidgin, I change my nick name. Since I'm in my own roster, I see my display name change to the new nick name. I exit and reconnect. My displayed name will be "my.account@server.domain". The same happens with moods. I tried to track the problem down, and it seemed to come from mod_pubsub, but the configuration looks ok to me.
{mod_pubsub, [
{access_createnode, pubsub_createnode},
%%{ignore_pep_from_offline, true}, % reduces resource comsumption, but XEP incompliant
{ignore_pep_from_offline, false}, % XEP compliant, but increases resource comsumption
{last_item_cache, false},
{plugins, ["flat", "hometree", "pep"]} % pep requires mod_caps
]},
In term of access, I believe anyone using our server should be able to change their nicknames (since everyone is "local").
%% Only accounts on the local ejabberd server can create Pubsub nodes:
{access, pubsub_createnode, [{allow, local}]}.
So, I tried to stop ejabberd, delete all the pubsub_* files from my "/var/lib/ejabberd/spool/" but, so far, nothing seems to work. The event seems to be sent to other contacts on your roster since they will see your new nickname until they exit and reconnect the client.
Right now, all the pubsub files are saved in RAM and on disc.
If anyone wants to ask for more informations, I'll do my best to collect them. I hope someone has a solution ;-)
Edit : I started a test server with most default settings, still on CentOS 6. The nickname isn't kept. When I publish a nick name and asks for it afterwards, it returns :
<iq from='my.account@server' to='my.account@server' id='purple...' type='result'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='http://jabber.org/protocol/nick'/>
</pubsub>
</iq>
It's as if the nick name never gets published, even if it is accepted.
Another interesting edit :
I installed 2.1.6 and imported my users. Everything worked fine. I reinstalled 2.1.8 and changed nicknames don't update to new ones. A user without a nickname won't be able to get one, and one with a nickname set in 2.1.6 won't be able to change it.
Hi. It would be easier to
Hi. It would be easier to reproduce the problem, if you showed what exact stanzas you send to set the nickname, and get it.
Also, if you are only interested in setting and asking nicknames, maybe you don't need pubsub: you can store nickname in vcards.
The client asks for the last
The client asks for the last nickname, which seems to be working well.
<iq type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='http://jabber.org/protocol/nick' max_items='1'/>
</pubsub>
</iq>
The server replies with the last nickname, which is empty if no nickname exists :
<iq from='carriere.p@server' to='carriere.p@server/ressource' id='purplee9228bb7' type='result'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='http://jabber.org/protocol/nick'>
<item id='5259D99652540'>
<nick xmlns='http://jabber.org/protocol/nick'>My Last Nickname</nick>
</item>
</items>
</pubsub>
</iq>
The user changes his or her nickname using Pidgin's interface and send it. The client sends the new nickname :
<iq type='set' id='purplee9228bb8'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='http://jabber.org/protocol/nick'>
<item>
<nick xmlns='http://jabber.org/protocol/nick'>My New Nickname</nick>
</item>
</publish>
</pubsub>
</iq>
When I tested 2.1.8, both on Windows Server 2003 and CentOS 6, those stanzas were working. The problem was that they weren't accepted on the server. Either by not sending a reply at all, or by sending the error I posted in the first post.
As I said, we are currently working with the 2.1.6 version, but as soon as I can, I'll install 2.1.9 on a test server and run some tests.
Thank you for your time!