[ejabberd] handshake_we_started error?

Bill McGonigle bill at bfccomputing.com
Sat Jun 21 03:15:16 MSD 2008


On Jun 20, 2008, at 03:16, Christoph Mewes wrote:

> this also happens if you try to connect with the wrong hostname  
> (uname -n vs. localhost for example). be sure you start ejabberd  
> with the same name as is used in ejabberdctl.


OK, this was very helpful.   I've been all around the block on this,  
but now I think it's a problem with the ejabberdctl script in  
Fedora.  It appears that ejabberdctl needs to run as the ejabberd  
user for it to succeed, and based on the above, the hostname in one  
place was using `hostname | cut -d. -f1` and in another localhost.

Preliminarily, this appears to fix it:

--- /usr/sbin/ejabberdctl-dist  2008-06-20 18:50:18.000000000 -0400
+++ /usr/sbin/ejabberdctl       2008-06-20 19:07:13.000000000 -0400
@@ -9,7 +9,7 @@

  # define default environment variables
  NODE=ejabberd
-HOST=localhost
+HOST=`hostname | cut -d. -f1`
  ERLANG_NODE=$NODE@$HOST
  ROOTDIR=
  EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
@@ -139,11 +139,13 @@
  # common control function
  ctl ()
  {
+    /sbin/runuser -s /bin/bash - ejabberd -c " \
      erl \
        $NAME ejabberdctl \
        -noinput \
        -pa $EJABBERD_EBIN \
-      -s ejabberd_ctl -extra $ERLANG_NODE $@
+      -s ejabberd_ctl -extra $ERLANG_NODE $@ \
+    "
      result=$?
      case $result in
      0) :;;


Now:
   [root at borlaug ~]# /usr/sbin/ejabberdctl status
   Node ejabberd at borlaug is started. Status: started
   ejabberd is running

And I can register and then connect as that user.

It's possible that I'm just masking something stupid I did, so if  
anybody sees that please holler.  I'll report it over at Redhat's  
bugzilla as well.

Thanks,
-Bill

------
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
bill at bfccomputing.com           Cell: 603.252.2606
http://www.bfccomputing.com/    Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf



More information about the ejabberd mailing list