SSH command can not start remote java process -
i have start
function, , put in script resides on remote site, function's code shows below.
function start() { cd $install_dir mkdir -p logs export classpath=$classpath:$target_jar nohup java -xms2048m -xmx8192m -server -xx:permsize=128m -xx:maxpermsize=256m \ -xx:+printgcdetails -xx:+printgcdatestamps \ -xx:-omitstacktraceinfastthrow \ -cp $target_jar $main_class >> logs/jvm.log 2>&1 & echo "service started, see logs" }
and when try call function use ssh ssh xxx@host "./service.sh start"
, can not start java process, got response message "service started, see logs" , there's no error, jvm.log empty. apparently me script has executed, target java process didn't run.
if logon remote site, , execute ./service.sh start
, works.
since able run service manually, ssh , script part fine.
what go wrong environment. example referred java without absolute path. hence may running different version of it. possible variable shared library loading (ld_library_path) having different values.
finally check file permissins
Comments
Post a Comment