powered by Jive Software

JM 2.2.1 - error on /etc/init.d/jive-messengerd

Hello,

if I want start the server, I have this following error :

/etc/init.d/jive-messengerd start

: bad interpreter: Aucun fichier ou répertoire de ce type[/code]

If I replace this file with the jive-messengerd from JM 2.1.5 (on 2.2.0 the bin/extra folder was missing) it works well.

Thanks

etzay

try comparing 2.1.5 and 2.2.1 versions of daemon, are there any differences?

i have just compared my old 2.1.3 jive-messengerd with 2.2.1 version with WinMerge. The only difference was different type of EOL. Dont know if this could cause problems. Or maybe EOL type was changed because i have edited jive-messengerd to fit my environment. Anyway. If you have clean 2.1.5 daemon, try comparing it with 2.2.1.

ok

on my box, I make clean installs :

cd /opt/

  1. rpm -ivh /home/etzay/jive_messenger_2_1_5.rpm

  2. cp -r jive_messenger jive_messenger_2.1.5

  3. rpm -Uvh /home/etzay/jive_messenger_2_2_1.rpm

  4. cp -r jive_messenger jive_messenger_2.2.1[/code]

I make a diff :

diff jive_messenger_2.1.5/bin/extra/jive-messengerd jive_messenger_2.2.1/bin/extra/jive-messengerd

1,80c1,80

.d

< # ln -s …/init.d/jive-messengerd $90jive-messengerd

< #

<

< # Set this to tell this script where messenger lives

< # If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger

< #export MESSENGER_HOME=

<

< # If there is a different user you would like to run this script as,

< # change the following line

< export MESSENGER_USER=jive

<

< # -


<

< # If a messenger home variable has not been specified, try to determine it

< if ; then

< if [ -d “/opt/jive_messenger” ]; then

< MESSENGER_HOME="/opt/jive_messenger"

< elif [ -d “/usr/local/jive_messenger” ]; then

< MESSENGER_HOME="/usr/local/jive_messenger"

< else

< echo “Could not find Jive Messenger installation under /opt or /usr/local”

< echo “Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME”

< exit 1

< fi

< fi

<

<

< function execCommand() {

< OLD_PWD=pwd

< cd $MESSENGER_HOME/bin

< CMD="./messenger $1"

< su -c “$CMD” $MESSENGER_USER &

< cd $OLD_PWD

< }

<

<

< start() {

< execCommand “start”

< }

<

< stop() {

< execCommand “stop”

< }

<

<

< case “$1” in

< start)

< start

< ;;

< stop)

< stop

< ;;

< *)

< echo “Usage $0 {start|stop}”

< exit 1

< esac

<

< exit 0


#!/bin/sh

  1. jive-messengerd

  1. chkconfig: 2345 20 80
  1. description: Used to start and stop the jive messenger XMPP server

  1. Script used to start jive messenger as daemon
  1. The script has currently been tested on Redhat Fedora Core 3,
  1. but should theoretically work on most UNIX like systems

  1. before running this script make sure $MESSENGER_HOME/bin/messenger is
  1. executable by the user you want to run messenger as
  1. (chmod +x $MESSENGER_HOME/bin/messenger)

  1. This script should be copied into /etc/init.d and linked into
  1. your default runlevel directory.
  1. You can find your default runlevel directory by typing:
  1. grep default /etc/inittab

  1. Link to the directory like follows
  1. cd /etc/rc.d
  1. ln -s …/init.d/jive-messengerd $90jive-messengerd

  1. Set this to tell this script where messenger lives
  1. If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger

#export MESSENGER_HOME=

  1. If there is a different user you would like to run this script as,
  1. change the following line

export MESSENGER_USER=jive


  1. If a messenger home variable has not been specified, try to determine it

if ; then

if [ -d “/opt/jive_messenger” ]; then

MESSENGER_HOME="/opt/jive_messenger"

elif [ -d “/usr/local/jive_messenger” ]; then

MESSENGER_HOME="/usr/local/jive_messenger"

else

echo “Could not find Jive Messenger installation under /opt or /usr/local”

echo “Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME”

exit 1

fi

fi

function execCommand() {

OLD_PWD=pwd

cd $MESSENGER_HOME/bin

CMD="./messenger $1"

su -c “$CMD” $MESSENGER_USER &

cd $OLD_PWD

}

start() {

execCommand “start”

}

stop() {

execCommand “stop”

}

case “$1” in

start)

start

;;

stop)

stop

;;

*)

echo “Usage $0 {start|stop}”

exit 1

esac

exit 0

/code

it’'s a happy diff

but I’'ve found the bug !!!

dos2unix jive_messenger_2.2.1/bin/extra/jive-messengerd

dos2unix: converting file jive_messenger_2.2.1/bin/extra/jive-messengerd to UNIX format …[/code]

and !!!

sh /opt/jive_messenger/bin/extra/redhat-postinstall.sh

  1. dos2unix /etc/init.d/jive-messengerd

dos2unix: converting file /etc/init.d/jive-messengerd to UNIX format …

  1. chmod +x /etc/init.d/jive-messengerd

  2. /etc/init.d/jive-messengerd start

testing JVM in /opt/jive_messenger/jre …

Starting messenger

nohup: ajout à la sortie de `nohup.out’’[/code]

it’'s OK !!

in conclusion : jive-messengerd should be in UNIX format, not in DOS[/b]

Hey etzay,

Thanks for the bug report and the fix. I created the issue JM-389 for this problem. BTW, which is your correct name so I can add it to the “thanks” section?

Regards,

– Gato

Hey Gato

thanks for the issue.

My real name is Yannick Sébastia and I updated it in my profile.

Regards

etzay

So that was the EOL problem Glad you’‘ve found it, will note to myself about dos2unix tool. And i’'m using old jive-messengerd script, just edited it a little:

#!/bin/sh

export JAVA_HOME=/opt/java/jre

CMD="./messenger $1 >/dev/null"

/code

the first because on my system (Archlinux 0.7) it cant find java on startup, and last one just to get rid of output on login screen

I used also the code quoted by wroot

CMD="./messenger $1 >/dev/null"[/code]

on my working server

for JAVA_HOME, I created a /etc/profile.d/java.sh[/b] with this following code :

JAVA_HOME=/path/to/my/jre

export JAVA_HOME[/code]

with that, java can be used by all my apps

Alright. Will keep that in mind It’'s just this server is only for Jive, so my tweak will do for now