activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mindspin311 <connoc.minds...@gmail.com>
Subject Re: starting activemq remotely
Date Mon, 08 Sep 2008 14:56:37 GMT

Tried this and it didn't work either..

<exec executable="bash">
			<arg line="-c 'ssh ${deploy.username}@${deploy.host}
${activemq.root}/start_activemq.sh' \\&amp;" />
		</exec>




mindspin311 wrote:
> 
> I'm trying to start activemq remotely with ssh in ant. I can stop it fine.
> 
> <sshexec host="${deploy.host}"
> 				 username="${deploy.username}"
> 				 failonerror="false"
> 				 keyfile="${public.key}"
> 				 command="sudo ${activemq.root}/activemq-admin stop" />
> 
> 
> but when I try to start it, it always hangs up. I can never get it to run
> it in the background on the deploy host, and return from the task on the
> local machine. It seems I've tried every combination of nohup and using &
> or \& to run in the background. 
> 
> I can get the following to work from the command line.
> 
> ssh deploy@media150-03.qa.xxxxxxxxxxxx.net
> /usr/local/activemq/bin/start_activemq.sh \&
> 
> but doing this in ant doesn't work.
> 
> <target name="startActivemqIndividual">
> 	    <sshexec host="${deploy.host}"
> 	             username="${deploy.username}"
> 	             failonerror="false"
> 	             keyfile="${public.key}"
> 	             command="${activemq.root}/start_activemq.sh  \\&amp;" />	
> 
> Wasn't sure if I had to escape '\' so I tried both. Each of them return
> nothing to the terminal when running and hangup. Activemq however is
> started, but this is pointless as I will have to do this on several
> machines remotely.
> 
> I am using a patched version 5.1 of activemq and start_activemq.sh looks
> like this
> 
> #!/bin/sh
> 
> if [ -z "$JAVA_HOME" ] ; then
>     export JAVA_HOME="/usr/local/java"
> fi
> 
> if [ -z "$ACTIVEMQ_HOME" ] ; then
>     ACTIVEMQ_HOME="/usr/local/activemq"
> fi
> 
> $ACTIVEMQ_HOME/bin/activemq &> /dev/null
> 

-- 
View this message in context: http://www.nabble.com/starting-activemq-remotely-tp19372454p19373817.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message