Starting a process remotely

Hello all,

Please, i try to start cassandra remotely but it didn't work. i don't find cassandra process when using ps aux|grep cassandra

ssh -t root@g-8 -x "sshpass -p 'ubuntu' ssh -t root@10.147.243.163 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -x '/home/apache-cassandra-2.1.6/bin/cassandra'"

Have you an idea please ?

Thanks a lot.

Best Regards.

Dont you have anything in your logs?

Thank you for your answer.
which log files please ?

I have created test.sh:

echo "hi"
/home/apache-cassandra-2.1.6/bin/cassandra

When i use:

ssh -t root@g-8 -x "sshpass -p 'ubuntu' ssh -t root@10.147.243.163 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -x './test.sh'"

it display:

Warning: Permanently added '10.147.243.163' (ECDSA) to the list of known hosts.
hi
Connection to 10.147.243.163 closed.


but i can't fin cassandra proces..

P.S: when i use /home/apache-cassandra-2.1.6/bin/cassandra directly on the remote machine, it works.

Kind Regards.

My undertanding ( I dont know cassandra...) is that if you connect on the remote it works, then it has to do with the shell... when you say it works, if you disconnect from the remote and reconnect do you see the product still running?
But on the remote box did you not go and see in /var/log/cassandra if you have clues?

Yes it still running.

Did you look in /var/log/cassandra ?

I wonder if it not something to do with your environment...
like not having JAVA_HOME set...
A good way of testing is to try to stra cassandra using cron on the remote, if it doesnt work then sure it is to do with your environment...

1 Like

No, i can't find any log file of cassandra in /var/log.

I have resolved the problem, i have juste delete '-t' option of the second ssh in my command.
any explanation please ?

Thanks.
Kind regards.

where are you checking the process,the remote server??
Just asking in avoid any silly mistakes