[jboss-user] [Remoting] - starting and stopping server remote server

siba.swain do-not-reply at jboss.com
Wed Dec 3 14:05:35 EST 2008


HI ,

I have two machines one is build and the other is server. Both are linux machine. 

I writing one ant script which will call the shell script present in remote box(server) where my jboss instances running. My shell scripts contains the commands to stop the jboss. When I am running the shell script in the remote box I am able to stop and start the server.
          
            But when I am trying to run the shellscript from build machine via ant script using execssh task I am getting the following exception

[sshexec] Connecting to bangepcnt2:22

   [sshexec] Warning: -Xms512m not understood. Ignoring.

  [sshexec] Warning: -Xmx1024m not understood. Ignoring.

  [sshexec] Exception in thread "main"

  [sshexec] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial

  [sshexec]    at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getDefaultInitCtx() (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.lookup(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at org.jboss.Shutdown.main(java.lang.String[]) (Unknown Source)
 
  [sshexec] Warning: -Xms512m not understood. Ignoring.

  [sshexec] Warning: -Xmx1024m not understood. Ignoring.

  [sshexec] Exception in thread "main"

  [sshexec] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial

  [sshexec]    at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getDefaultInitCtx() (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.lookup(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at org.jboss.Shutdown.main(java.lang.String[]) (Unknown Source)

  [sshexec] Warning: -Xms512m not understood. Ignoring.

  [sshexec] Warning: -Xmx1024m not understood. Ignoring.

  [sshexec] Exception in thread "main"

  [sshexec] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial

  [sshexec]    at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getDefaultInitCtx() (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at javax.naming.InitialContext.lookup(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

  [sshexec]    at org.jboss.Shutdown.main(java.lang.String[]) (Unknown Source)

my shell script is as follows:

cd /opt/jboss-4.0.5/bin

sh shutdown.sh -server localhost:1299

sh shutdown.sh --server localhost:1199


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194133#4194133

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194133



More information about the jboss-user mailing list