[ejabberd] ejabberdctl problems and bulkloading

Johnny Matthews johnny.matthews at gmail.com
Mon Dec 6 20:34:42 MSK 2004


Sergei Golovan wrote:

>On Mon, Dec 06, 2004 at 04:53:42PM -0000, James Tait wrote:
>  
>
>>Johnny,
>>
>>Are you running ejabberdctl as the same user who is running ejabberd?  ISTR
>>that I got the same error when the Erlang Cookie for ejabberdctl didn't
>>match that for ejabberd.
>>    
>>
>
>Yes, I forget about this cookie problem. In Debian ejabberd package
>ejabberd runs from user ejabberd (HOME=/var/lib/ejabberd) and ejabberdctl
>sets HOME environment variable to /var/lib/ejabberd if it's readable.
>
>  
>
>>I got around this by copying the file .erlang.cookie from /root into
>>/etc/ejabberd, making it readable only by the user who runs ejabberd and
>>ejabberdctl (user ejabberd in my case) and modifying my ejabberd start
>>script to read the cookie value from there using the -setcookie option.
>>    
>>
>
>  
>
I installed this with the Debian apt-get.  I moved the cookie from /root 
to /etc/ejabberd and gave read permission to the ejabberd user. I then 
changed /etc/init.d/ejabberd  I added

COOKIE="/etc/ejabberd/.erlang.cookie"

and changed

start()
{
    su $EJABBERDUSER -c "$EJABBERD -noshell -detached"
}
 to
start()
{
    su $EJABBERDUSER -c "$EJABBERD -noshell -detached -setcookie $COOKIE"
}

After a reboot, this is the entry from ps axu

ejabberd   294  1.2  6.4 13640 8168 ?        S    11:28   0:01 
/usr/lib/erlang/erts-5.3.6.3/bin/beam -- -root /usr/lib/erlang -progname 
erl -- -home /var/lib/ejabberd -sname ejabberd -s ejabberd -ejabberd 
config "/etc/ejabberd/ejabberd.cfg" log_path 
"/var/log/ejabberd/ejabberd.log" -sasl sasl_error_logger 
{file,"/var/log/ejabberd/sasl.log"} -mnesia dir "/var/lib/ejabberd" 
-noshell -noshell -noinput -setcookie /etc/ejabberd/.erlang.cookie

jabberctl still does not work as root or if I su to ejabberd.   Any more 
thoughts?


More information about the ejabberd mailing list