# ejabberd wont stop or start

## Cotton

```
dev portage # /etc/init.d/ejabberd start

 * WARNING:  "ejabberd" has already been started.

dev portage # /etc/init.d/ejabberd stop

 * Stopping eJabberd ...

RPC failed on the node ejabberd@dev: nodedown [ !! ]

```

it is definitely not running... how can i tell the system it isn't running?  i'm not sure what other info may be needed to troubleshoot...

----------

## jk3us

```
/etc/init.d/ejabberd zap
```

?

----------

## cypher24

Hello,

i have the same problem this is every time and the server won't start 

cya

cypher

----------

## PaulBredbury

Check what /etc/init.d/ejabberd is doing. Also read:

```
man start-stop-daemon
```

----------

## Rion

i just started my ejabberd server with next command

```
erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd -ejabberd config \"/etc/jabber/ejabberd.cfg\" log_path \"/var/log/jabber/ejabberd.log\" -sasl sasl_error_logger \{file,\"/var/log/jabber/sasl.log\"\} -mnesia dir \"/var/spool/jabber\"
```

and it works fine

when i start it with /etc/init.d/ejabberd start it looks started but doesn't work; on /etc/init.d/ejabberd stop i get the same error as in first post

so, i think maintainer of ebuild must correct ctl script to start/stop ejabberd right way

----------

## dougm

It's a problem with /var/run/jabber/.erlang.cookie most likely.  Try changing the ownership to jabber:jabber

----------

## bathizte

 *dougm wrote:*   

> It's a problem with /var/run/jabber/.erlang.cookie most likely.  Try changing the ownership to jabber:jabber

 

I have the same issue and changed the ownership the way you suggested it.

----------

## bathizte

Ok, self-answer : that was probably due to a misconfig and a pb with start-stop daemon.  

 *Quote:*   

> 
> 
> ```
> /etc/init.d/ejabberd zap
> ```
> ...

 

did the trick. Thanks jk3us !

----------

