aMule Forum

English => aMule Help => Topic started by: Yionel on January 22, 2010, 03:21:15 PM

Title: Probleme with amule-daemon
Post by: Yionel on January 22, 2010, 03:21:15 PM
Hi,
I have installed amule on my lenny debian server without gui and configurated the amule.conf.
When I send the command : /etc/init.d/amule-daemon start

Nothing happend !

Can you help me ?

Code: [Select]
yonk@debian:~$ /etc/init.d/amule-daemon start
yonk@debian:~$
yonk@debian:~$ ps -aux | grep -i amule
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
yonk      2591  0.0  0.0   3116   788 pts/3    S+   15:40   0:00 grep -i amule
Title: Re: Probleme with amule-daemon
Post by: Stu Redman on January 22, 2010, 08:30:37 PM
What's in aMule's logfile?
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 22, 2010, 08:34:19 PM
What's in aMule's logfile?

Nothing in the log file.
At the beginning, amule works and was connected to a server. I have delete logfile and if I send /etc/init.d/amule-daemon start, there is not logfile created :/
Title: Re: Probleme with amule-daemon
Post by: Stu Redman on January 22, 2010, 08:40:22 PM
Well, something wrong with the /etc/init.d/amule-daemon script I guess. Debian problem probably.
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 22, 2010, 08:42:10 PM
Well, something wrong with the /etc/init.d/amule-daemon script I guess. Debian problem probably.

And what I have to do ?
Where can I have this script ?
Title: Re: Probleme with amule-daemon
Post by: ^marcell^ on January 22, 2010, 10:12:25 PM
Well, something wrong with the /etc/init.d/amule-daemon script I guess. Debian problem probably.

And what I have to do ?
Where can I have this script ?

You could open it with a text editor (e.g. "vim /etc/init.d/amule-daemon") and copy/paste the content of it here  so we can take a closer look.
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 22, 2010, 10:14:29 PM
Well, something wrong with the /etc/init.d/amule-daemon script I guess. Debian problem probably.

And what I have to do ?
Where can I have this script ?

You could open it with a text editor (e.g. "vim /etc/init.d/amule-daemon") and copy/paste the content of it here  so we can take a closer look.

Code: [Select]
#! /bin/sh
### BEGIN INIT INFO
# Provides:          amule-daemon
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      $network
# Should-Stop:       $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Daemonized version of aMule.
# Description:       Starts the aMule daemon with the user specified in
#                    /etc/default/amule-daemon.
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin

PROGNAME=amuled
DESC="aMule daemon"
PKGNAME="amule-daemon"
DAEMON=/usr/bin/amuled
SCRIPTNAME=/etc/init.d/$PKGNAME
WRAPPER=/usr/share/amule/amuled_home_wrapper.sh

[ -x "$DAEMON" ] || exit 0
[ -r /etc/default/$PKGNAME ] && . /etc/default/$PKGNAME

. /lib/init/vars.sh # has VERBOSE
. /lib/lsb/init-functions

if [ -z "$AMULED_USER" ]; then
    log_warning_msg \
"Not starting $DESC, AMULED_USER not set in /etc/default/$PKGNAME."
    exit 0
fi

do_start()
{
# Return
#   0 if daemon has been started
#   1 if daemon was already running
#   2 if daemon could not be started
start-stop-daemon --start --quiet --exec $DAEMON --user "$AMULED_USER" --chuid "$AMULED_USER" --test >/dev/null || return 1
start-stop-daemon --start --quiet --exec $WRAPPER --user "$AMULED_USER" --chuid "$AMULED_USER" >/dev/null || return 2
}

do_stop()
{
# Return
#   0 if daemon has been stopped
#   1 if daemon was already stopped
#   2 if daemon could not be stopped
start-stop-daemon --stop --quiet --retry="TERM/30/KILL/5" --exec $DAEMON --user "$AMULED_USER" --chuid "$AMULED_USER"
return "$?"
}


case "$1" in
  start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$PROGNAME"
do_start
case "$?" in
0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
1) [ "$VERBOSE" != no ] && \
log_progress_msg "(already running)" && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1; exit 1 ;;
esac
;;
  stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$PROGNAME"
do_stop
case "$?" in
0 | 1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2)     [ "$VERBOSE" != no ] && log_end_msg 1; exit 1 ;;
esac
;;
  restart|force-reload)
log_daemon_msg "Restarting $DESC" "$PROGNAME"
do_stop
case "$?" in
  0 | 1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1; exit 1 ;; # Old process is still running
*) log_end_msg 1; exit 1 ;; # Failed to start
esac
;;
  *)
  # Failed to stop
log_end_msg 1
exit 1
;;
esac
;;
  *)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac

exit 0
Title: Re: Probleme with amule-daemon
Post by: wuischke on January 23, 2010, 09:25:29 AM
Quote
# Description:       Starts the aMule daemon with the user specified in
#                    /etc/default/amule-daemon.
Did you change the user in this file?
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 23, 2010, 08:55:17 PM
Quote
# Description:       Starts the aMule daemon with the user specified in
#                    /etc/default/amule-daemon.
Did you change the user in this file?

Yes !

In the file there is WRAPPER=/usr/share/amule/amuled_home_wrapper.sh
And I haven't got files /usr/share/amule/ ! only directory
Title: Re: Probleme with amule-daemon
Post by: ^marcell^ on January 24, 2010, 07:48:36 PM
Please open the file in an editor and add the following line above "PATH=/..." in line #15:
Code: [Select]
set -x(Note: there is a blank between "set" and "-x" !)

Save the changes to the script and execute it again. Then please post the output here.
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 24, 2010, 08:27:11 PM
Please open the file in an editor and add the following line above "PATH=/..." in line #15:
Code: [Select]
set -x(Note: there is a blank between "set" and "-x" !)

Save the changes to the script and execute it again. Then please post the output here.

The output :

Code: [Select]
yonk@debian:~$ /etc/init.d/amule-daemon start
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ PROGNAME=amuled
+ DESC='aMule daemon'
+ PKGNAME=amule-daemon
+ DAEMON=/usr/bin/amuled
+ SCRIPTNAME=/etc/init.d/amule-daemon
+ WRAPPER=/usr/share/amule/amuled_home_wrapper.sh
+ '[' -x /usr/bin/amuled ']'
+ exit 0
Title: Re: Probleme with amule-daemon
Post by: Vollstrecker on January 24, 2010, 08:42:13 PM
Are you sure amuled is still installed. What says "apt-cache policy amule-daemon"
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 25, 2010, 01:38:08 AM
Are you sure amuled is still installed. What says "apt-cache policy amule-daemon"

Code: [Select]
debian:/home/yonk# apt-cache policy amule-daemon
amule-daemon:
  Installed: 2.2.6-1
  Candidate: 2.2.6-1
  Version table:
 *** 2.2.6-1 0
        500 http://www.vollstreckernet.de stable/amule-stable Packages
        100 /var/lib/dpkg/status
     2.2.1-1+lenny2 0
        500 http://ftp.fr.debian.org lenny/main Packages
        500 http://security.debian.org lenny/updates/main Packages


Code: [Select]
debian:/home/yonk# /etc/init.d/amule-daemon start
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ PROGNAME=amuled
+ DESC='aMule daemon'
+ PKGNAME=amule-daemon
+ DAEMON=/usr/bin/amuled
+ SCRIPTNAME=/etc/init.d/amule-daemon
+ WRAPPER=/usr/share/amule/amuled_home_wrapper.sh
+ '[' -x /usr/bin/amuled ']'
+ '[' -r /etc/default/amule-daemon ']'
+ . /etc/default/amule-daemon
++ AMULED_USER=yonk
++ AMULED_HOME=
+ . /lib/init/vars.sh
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
+++ TMPTIME=0
+++ SULOGIN=no
+++ DELAYLOGIN=no
+++ UTC=yes
+++ VERBOSE=no
+++ FSCKFIX=no
+++ RAMRUN=no
+++ RAMLOCK=no
++ '[' -r /proc/cmdline ']'
++ grep -q ' noswap' /proc/cmdline
++ NOSWAP=no
++ '[' '!' -e /proc/cmdline ']'
++ egrep -qw quiet /proc/cmdline
++ VERBOSE=no
++ '[' '' ']'
++ true
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ '[' -z yonk ']'
+ case "$1" in
+ '[' no '!=' no ']'
+ do_start
+ start-stop-daemon --start --quiet --exec /usr/bin/amuled --user yonk --chuid yonk --test
+ start-stop-daemon --start --quiet --exec /usr/share/amule/amuled_home_wrapper.sh --user yonk --chuid yonk
start-stop-daemon: stat /usr/share/amule/amuled_home_wrapper.sh: No such file or directory (No such file or directory)
+ return 2
+ case "$?" in
+ '[' no '!=' no ']'
+ exit 1
Title: Re: Probleme with amule-daemon
Post by: ^marcell^ on January 25, 2010, 06:39:43 AM
Like you said, the problem is that "/usr/share/amule/amuled_home_wrapper.sh" is not there. Have you tried searching for it?
Maybe "locate amuled_home_wrapper.sh" or "find / -name amuled_home_wrapper.sh" can help you. Unfortunately I don't know where this file comes from.
Title: Re: Probleme with amule-daemon
Post by: Vollstrecker on January 25, 2010, 09:47:05 AM
Like the init-script and the /etc/default file, the wrapper comes from officisal repo and isn't included in my packages.  Would in the first post be mentioned that he uses my pkg's, this all would be clear. I think I bump the init-script up to the top of my todo-list. The wrapper is just there, because the one that wrote the init script wasn't able to read the help of amuled. start-stop-daemontdoesn't set the env correctly at the point amuled needs it, so this is why I implemented --config-dir switch
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 25, 2010, 10:26:37 AM
Like you said, the problem is that "/usr/share/amule/amuled_home_wrapper.sh" is not there. Have you tried searching for it?
Maybe "locate amuled_home_wrapper.sh" or "find / -name amuled_home_wrapper.sh" can help you. Unfortunately I don't know where this file comes from.

I haven't got this file on my disc :(
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 25, 2010, 10:27:54 AM
Like the init-script and the /etc/default file, the wrapper comes from officisal repo and isn't included in my packages.  Would in the first post be mentioned that he uses my pkg's, this all would be clear. I think I bump the init-script up to the top of my todo-list. The wrapper is just there, because the one that wrote the init script wasn't able to read the help of amuled. start-stop-daemontdoesn't set the env correctly at the point amuled needs it, so this is why I implemented --config-dir switch

I don't understand what I have to do :/

Sorry (I'm so bad in english)
Title: Re: Probleme with amule-daemon
Post by: Vollstrecker on January 25, 2010, 11:22:00 AM
The init script and /etc/default don't get deleted on update because they are config files. The wrapper get's deleted. So you have to start the daemon manually.
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 25, 2010, 01:41:14 PM
The init script and /etc/default don't get deleted on update because they are config files. The wrapper get's deleted. So you have to start the daemon manually.

How ?  ;D
Title: Re: Probleme with amule-daemon
Post by: ^marcell^ on January 25, 2010, 06:17:40 PM
The init script and /etc/default don't get deleted on update because they are config files. The wrapper get's deleted. So you have to start the daemon manually.

How ?  ;D
This is a case for the amuled FAQ (http://wiki.amule.org/index.php/FAQ_amuled). I am sure you will find what you need in there.
Title: Re: Probleme with amule-daemon
Post by: Yionel on January 25, 2010, 07:47:21 PM
The init script and /etc/default don't get deleted on update because they are config files. The wrapper get's deleted. So you have to start the daemon manually.

How ?  ;D
This is a case for the amuled FAQ (http://wiki.amule.org/index.php/FAQ_amuled). I am sure you will find what you need in there.

Yes great !! thanks
It works fine !
I will install a proxy now