Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145373 - net-im/ejabberd-1.1.1 starts but init.d script returns failure
Summary: net-im/ejabberd-1.1.1 starts but init.d script returns failure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-28 09:35 UTC by Chris Carlin
Modified: 2006-10-12 09:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/ejabberd-1.1.1.initd (ejabberd,1.27 KB, text/plain)
2006-08-29 09:45 UTC, Chris Carlin
Details
Debian init.d file (ejabberd,1.37 KB, text/plain)
2006-08-29 09:47 UTC, Chris Carlin
Details
baselayout-compatible init.d (ejabberd-1.1.1.initd,1.29 KB, text/plain)
2006-10-05 13:06 UTC, Dustin J. Mitchell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Carlin 2006-08-28 09:35:39 UTC
I believe Tony Vroon <chainsaw@gentoo.org> has been handling ejabberd stuff...

This may be some strange error on my part as I was running ejabberd for a while with no problems. I can't remember if this broke after the upgrade to 1.1.1 or not.

When I run /etc/init.d/ejabberd start I receive a failure ([ !! ]), but the server is actually started and seems to be running fine. I can see it running through ps with a line including the following:

/usr/lib/erlang/erts-5.4.6/bin/beam -- -root /usr/lib/erlang

Could it be that start-stop-daemon searches for a process with the name ejabberd since that's what it tries to start? I've heard that start-stop-daemon has issues with wrapper scripts.
Comment 1 Conrad Kostecki gentoo-dev 2006-08-28 12:55:38 UTC
Jep! I see exact this Error too ..
Comment 2 Chris Carlin 2006-08-29 09:42:21 UTC
I suggest that ejabberd follows the lead of how debian does it: using su instead of start-stop-daemon. After all, if we're not using start-stop-daemon to stop perhaps it shouldn't be used to start...

I'll attach a debian-inspired init.d script for review. Since it uses su it requires a real shell for the jabber user... is that ok?
Comment 3 Chris Carlin 2006-08-29 09:45:25 UTC
Created attachment 95382 [details]
files/ejabberd-1.1.1.initd
Comment 4 Chris Carlin 2006-08-29 09:47:26 UTC
Created attachment 95383 [details]
Debian init.d file

Attaching Debian's init.d file for comparison
Comment 5 Conrad Kostecki gentoo-dev 2006-08-29 16:23:33 UTC
Hello!
The new init.d script is not working here :(

BlackBox init.d # /etc/init.d/ejabberd start
 * Starting eJabberd ...
This account is currently not available. [ !! ]
Comment 6 Conrad Kostecki gentoo-dev 2006-08-29 17:00:41 UTC
Ok, sry!
Its my fault ;)

Forget to set a valid shell!

Now, the init.d script works fine. start, stop and reload!
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-09-22 03:41:05 UTC
Jakub: net-im/ejabberd != net-im/jabberd
Comment 8 Igor 2006-09-30 01:40:20 UTC
Add folowing lines to init.d script.

After line "start-stop-daemon ....."

and before line "eend $?"

insert lines:

if [ -z "$EJABBERD_NODE" ];
then
    EJABBERD_NODE="ejabberd@`hostname -s`"
fi
/usr/bin/ejabberdctl $EJABBERD_NODE status | grep 'Status: started'

Problem solved on my system with ejabberd-1.1.1.ebuild for amd64 arch.

ps Why 1.1.1.ebuild for amd64 not exists?
Comment 9 Dustin J. Mitchell 2006-10-05 13:06:43 UTC
Created attachment 98875 [details]
baselayout-compatible init.d

I've attached a new init.d script that works for me with baselayout-1.12.5 on amd64.
Comment 10 Dustin J. Mitchell 2006-10-05 13:08:42 UTC
Incidentally, when this change is accepted into the tree, #141302 should be pinged to keyword this ~amd64.  The software itself is terrible, especially its logging, but the ebuild is as good on amd64 as on x86.
Comment 11 Tony Vroon (RETIRED) gentoo-dev 2006-10-12 09:23:13 UTC
+*ejabberd-1.1.1-r1 (12 Oct 2006)
+
+  12 Oct 2006; Tony Vroon <chainsaw@gentoo.org>
+  +files/ejabberd-1.1.1-r1.initd, +files/self-cert-v2.sh, +files/ssl.cnf,
+  ejabberd-1.1.1.ebuild, +ejabberd-1.1.1-r1.ebuild:
+  Revision bump, robust start/stop script thanks to Chris Carlin
+  <ccarlin@physics.tamu.edu> and Dustin J. Mitchell <dustin@v.igoro.us> in bug
+  #145373. Statsdx & SOCKS5 proxy support thanks to Nikolaus Polak
+  <nik@linuxlovers.at> in bug #137724. And finally, thanks to Micha Krause
+  <linux@krausam.de> for pointing out that the SSL eclass did not create
+  certificates usable for S2S connections in bug #150088.

This should fix it then. My apologies for how long this bug has lingered, it was not assigned to the correct person.