1 Reply Latest reply on Dec 24, 2008 9:58 PM by ron_sigal

    starting and stopping server remote server

      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