Hi Team, I have a Jenkins job to restart Tomcat automatically configured.
I have added a server-restart named job with the below config <org.jvnet.hudson.plugins.SSHBuildWrapper> <siteName>jenkins@qa-gse01:22</siteName> <preScript>cd /opt/tomcat/app/apache-tomcat-6.0.26/bin ./catalina.sh stop -force</preScript> <postScript>cd /opt/tomcat/app/apache-tomcat-6.0.26/bin ./catalina.sh start</postScript> </org.jvnet.hudson.plugins.SSHBuildWrapper> </buildWrappers> I have added the pre-build step to make a cd to Tomcat bin directory & execute the stop script(catalina.sh) And the post-build step to make a cd to Tomcat bin directory & execute the start script(catalina.sh) After running the job, I see the below exception. Building in workspace /var/lib/jenkins/jobs/QA-server-restart/workspace [SSH] executing pre build script: cd /opt/tomcat/app/apache-tomcat-6.0.26/bin ./catalina.sh stop -force [SSH] Exception:Auth cancel com.jcraft.jsch.JSchException: Auth cancel at com.jcraft.jsch.Session.connect(Session.java:451) at com.jcraft.jsch.Session.connect(Session.java:150) at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:118) at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:128) at org.jvnet.hudson.plugins.SSHBuildWrapper.executePreBuildScript(SSHBuildWrapper.java:78) at org.jvnet.hudson.plugins.SSHBuildWrapper.setUp(SSHBuildWrapper.java:62) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1502) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Finished: FAILURE While I do a SSH directly from the Jenkins LINUX box to the Tomcat server(qa-gse01), I'm able to login but the job to do the same task is failing. Can you guys please help me on this, I'm stuck !! -- View this message in context: http://jenkins.361315.n4.nabble.com/SSH-connection-from-Jenkins-to-Tomcat-server-failing-tp4646747.html Sent from the Jenkins issues mailing list archive at Nabble.com.