[ControlTier] Ctl-exec with -s not working when ssh is not running on 22

58 views
Skip to first unread message

karthik kumar

unread,
May 3, 2010, 3:10:05 PM5/3/10
to contr...@googlegroups.com

ctl-exec with a simple command works fine.
--------------------------------------------------------

[ctier@lin-u22r5-ctrltier installation]$ ctl-exec -p conference-server -I tags=dcs -- hostname
number of nodes to dispatch to: 3, (threadcount=1)                                            
Connecting to lin-c22u1-conf-01:4022                                                          
cmd : hostname                                                                                
lin-c22u1-conf-01                                                                             
Connecting to lin-c22u2-conf-02:4022                                                          
cmd : hostname                                                                                
lin-c22u2-conf-02                                                                             
Connecting to lin-c22u3-conf-03:4022                                                          
cmd : hostname                                                                                
lin-c22u3-conf-03                                         

ctl-exec  with -s option doent work.. It still is connecting to port 22 ...
-------------------------------------------------------------------------------------
                                    
[ctier@lin-u22r5-ctrltier installation]$ ctl-exec -v -p conference-server -I tags=dcs -s testscript.sh 
number of nodes to dispatch to: 3, (threadcount=1)                                                     
preparing for sequential execution...                                                                  
preparing for remote execution ...                                                                     
dispatching to proxy on node: lin-c22u1-conf-01:4022                                                   
copying scriptfile: '/opt/ctier/scripts/conference-server/scripts/installation/testscript.sh' to: 'lin-c22u1-conf-01:4022:/opt/ctier/ctl/var/tmp/testscript.sh'                                                                                                                                             
Connecting to lin-c22u1-conf-01:22                                                                                                                    
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused                                                                          
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215)                                                                       
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
        at java.lang.reflect.Method.invoke(Method.java:616)                                                                                           
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)                                                                
        at org.apache.tools.ant.Task.perform(Task.java:348)                                                                                           
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)                                                                       
        at com.controltier.ctl.cli.CtlExec$ExecutableTaskImpl.execute(CtlExec.java:1048)                                                              
        at com.controltier.ctl.cli.CtlExec.executeNodedispatch(CtlExec.java:950)                                                                      
        at com.controltier.ctl.cli.CtlExec$CommandAction.doAction(CtlExec.java:1105)                                                                  
        at com.controltier.ctl.cli.CtlExec.run(CtlExec.java:399)                                                                                      
        at com.controltier.ctl.cli.CtlExec.main(CtlExec.java:504)                                                                                     
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
        at java.lang.reflect.Method.invoke(Method.java:616)                                                                                           
        at launcher.CtlExecLauncher.main(CtlExecLauncher.java:31)                                                                                     
Caused by: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused                                                               
        at com.jcraft.jsch.Util.createSocket(Util.java:258)                                                                                           
        at com.jcraft.jsch.Session.connect(Session.java:183)                                                                                          
        at com.jcraft.jsch.Session.connect(Session.java:142)                                                                                          
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:212)                                                           
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:291)                                                                        
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:203)                                                                       
        ... 17 more                                                                                                                                   
Caused by: java.net.ConnectException: Connection refused                                                                                              
        at java.net.PlainSocketImpl.socketConnect(Native Method)                                                                                      
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)                                                               
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)                                                        
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)                                                                 
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:381)                                                                                 
        at java.net.Socket.connect(Socket.java:537)                                                                                                   
        at java.net.Socket.connect(Socket.java:487)                                                                                                   
        at java.net.Socket.<init>(Socket.java:384)                                                                                                    
        at java.net.Socket.<init>(Socket.java:198)                                                                                                    
        at com.jcraft.jsch.Util.createSocket(Util.java:252)                                                                                           
        ... 22 more                                                                                                                                   
--- Nested Exception ---                                                                                                                              
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused                                                                          
        at com.jcraft.jsch.Util.createSocket(Util.java:258)                                                                                           
        at com.jcraft.jsch.Session.connect(Session.java:183)                                                                                          
        at com.jcraft.jsch.Session.connect(Session.java:142)                                                                                          
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:212)                                                           
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:291)                                                                        
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:203)                                                                       
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
        at com.controltier.ctl.cli.CtlExec$ExecutableTaskImpl.execute(CtlExec.java:1048)
        at com.controltier.ctl.cli.CtlExec.executeNodedispatch(CtlExec.java:950)
        at com.controltier.ctl.cli.CtlExec$CommandAction.doAction(CtlExec.java:1105)
        at com.controltier.ctl.cli.CtlExec.run(CtlExec.java:399)
        at com.controltier.ctl.cli.CtlExec.main(CtlExec.java:504)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at launcher.CtlExecLauncher.main(CtlExecLauncher.java:31)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:381)
        at java.net.Socket.connect(Socket.java:537)
        at java.net.Socket.connect(Socket.java:487)
        at java.net.Socket.<init>(Socket.java:384)
        at java.net.Socket.<init>(Socket.java:198)
        at com.jcraft.jsch.Util.createSocket(Util.java:252)
        ... 22 more
[ctier@lin-u22r5-ctrltier installation]$



-------------------------------------------------------------------------------------------------------------------------

On Mon, May 3, 2010 at 8:47 PM, Alex Honor <al...@dtosolutions.com> wrote:
Hi Karthik,

I can have a 3.4.12 build ready later today (build system is down) but in the mean time, you can consider patching the jar file that contains the buggy class.
I have attached the class file to this email. You should only need to modify the ctl.jar file located on your server since this is the only place you are running ctl-exec.

So, on your server:

0) Save the current ctl.jar 
   cp $CTL_HOME/pkgs/apache-ant-1.7.1p1/lib/ctl.jar $CTL_HOME/pkgs/apache-ant-1.7.1p1/lib/ctl.jar.orig

1) Create a working directory somewhere 
   mkdir /tmp/target

2) Copy the ctl.jar  
   cp $CTL_HOME/pkgs/apache-ant-1.7.1p1/lib/ctl.jar /tmp/target

3) Extract the jar 
    jar xf ctl.jar

4) Copy the .class file 
    cp CtlExec$CommandAction.class /tmp/target/com/controltier/ctl/cli/CtlExec$CommandAction.class

5) Rejar the files
    cd /tmp/target; jar cmf META-INF/MANIFEST.MF ctl.jar com launcher

6) Replace the ctl.jar
    cp /tmp/target/ctl.jar $CTL_HOME/pkgs/apache-ant-1.7.1p1/lib/ctl.jar 

I'm not sure you are comfortable with this procedure (it's kind of like surgery) and if not, you'll need to wait for the full 3.4.12 build. The build system will be up later today.



Alex Honor
DTO Solutions, Inc. | office: 650.306.9605 mobile: 650.714.0913 irc.freenode.net: #controltier ]





--
You received this message because you are subscribed to the Google Groups "ControlTier" group.
To post to this group, send email to contr...@googlegroups.com
To unsubscribe from this group, send email to controltier...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/controltier?hl=en
http://wiki.controltier.org
Reply all
Reply to author
Forward
0 new messages