2

java and mpj express are installed in /opt in compute node. JAVA_HOME, MPJ_HOME and PATH are set already via bashrc.

error when running mpjboot machines:

bash: java: command not found

java is working already in both machines

mpjboot:

#!/bin/sh

if [ $# -ne 1 ]; then
  echo "Usage: mpjboot <machines_file>";
  exit 127
fi 

java -jar $MPJ_HOME/lib/daemonmanager.jar -boot -m "$@"
JR Galia
  • 17,229
  • 19
  • 92
  • 144
  • can you type `whereis java` if you kick start the binary for example `/usr/bin/java` manually does it work then? do you have permissions to execute java? – Tschallacka Apr 10 '15 at 08:06
  • - what if you write echo ${JAVA_HOME} inside a script? Maybe you didn't 'export' the JAVA_HOME and PATH variables – Benjamin Apr 10 '15 at 09:28

1 Answers1

2

which Linux Distribution are you using? Try placing MPJ_HOME and JAVA_HOME at top of .bashrc. It fixes this problem in case of Ubuntu particularly.

Ansar
  • 131
  • 3
  • Any reason for this? As I am also running into this problem while running mpj in cluster mode. Its saying MPJ_HOME isn't set, despite being already set in .bashrc. – user1612078 Apr 24 '15 at 03:36
  • 3
    The default Ubuntu bashrc file has `# If not running interactively, don't do anything [ -z "$PS1" ] && return` and mpjboot runs in non interactive mode. If you set your environment variables below this line it will not be visible to mpjboot and it will complain. – mohsan Apr 24 '15 at 17:20