You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bill Winspur <bw...@wynnon.com> on 2005/07/04 02:34:49 UTC

Connection Failures On SSHExec Task

Synopsis
-------- I am running ant 6.1.2 on XP Pro and have a test
case that produces SSH connection failures by repetitively
running the same <sshexec .../> task.

The first failure occurs after about two thirds (10) of the tasks
have executed. At this point ant hangs up for about 2 minutes,
then logs the following exception on the console.
    com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: .

If I then run the build again it hangs up immediately for 20 seconds,
then logs the following exception on the console.
  com.jcraft.jsch.JSchException: Session.connect: 
java.net.ConnectException: Connection timed out: connect

Once the failure occurs I must wait about ten minutes until
the connection timeouts go away and I can run the build
again until the connection problem reappears.

The server is running Openssh on fedora RC2.

Question 1
----------
Is this a known problem with SSHExec (ant), jsch, or openssh?


Details
-------
The build file is very simple, and looks like this:

===============================
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="grabbit">
    <target name="grabbit">
        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>

        <sshexec host="xxx.com" username="root"
            command="whoami" password="secret" trust="true"/>
    </target>
</project>
===============================

Running the build produces the following console output:

===============================
E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
Buildfile: build.xml

grabbit:
  [sshexec] Connecting to xxx.com:22
  [sshexec] root
  [sshexec] Connecting to xxx.com:22   <----  Question 2. why does the 
console output from
  [sshexec] Connecting to xxx.com:22                      tasks 
disappear at this point?
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22
  [sshexec] Connecting to xxx.com:22

BUILD FAILED
E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:31: 
com.jcraft.jsch.JSchException: Session.connect: java.io.IOException:

Total time: 2 minutes 14 seconds



E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
Buildfile: build.xml

grabbit:
  [sshexec] Connecting to xxx.com:22

BUILD FAILED
E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:5: 
com.jcraft.jsch.JSchException: Session.connect: 
java.net.ConnectException: Connection timed out: connect

Total time: 21 seconds
E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>
===============================

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Connection Failures On SSHExec Task

Posted by Steve Cohen <sc...@javactivity.org>.
Bill: Can you please set your system clock correctly?  It is very 
disconcerting to see emails in my box dated a month in the future.

Bill Winspur wrote:
> Synopsis
> -------- I am running ant 6.1.2 on XP Pro and have a test
> case that produces SSH connection failures by repetitively
> running the same <sshexec .../> task.
> 
> The first failure occurs after about two thirds (10) of the tasks
> have executed. At this point ant hangs up for about 2 minutes,
> then logs the following exception on the console.
>    com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: .
> 
> If I then run the build again it hangs up immediately for 20 seconds,
> then logs the following exception on the console.
>  com.jcraft.jsch.JSchException: Session.connect: 
> java.net.ConnectException: Connection timed out: connect
> 
> Once the failure occurs I must wait about ten minutes until
> the connection timeouts go away and I can run the build
> again until the connection problem reappears.
> 
> The server is running Openssh on fedora RC2.
> 
> Question 1
> ----------
> Is this a known problem with SSHExec (ant), jsch, or openssh?
> 
> 
> Details
> -------
> The build file is very simple, and looks like this:
> 
> ===============================
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="project" default="grabbit">
>    <target name="grabbit">
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
> 
>        <sshexec host="xxx.com" username="root"
>            command="whoami" password="secret" trust="true"/>
>    </target>
> </project>
> ===============================
> 
> Running the build produces the following console output:
> 
> ===============================
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
> Buildfile: build.xml
> 
> grabbit:
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] root
>  [sshexec] Connecting to xxx.com:22   <----  Question 2. why does the 
> console output from
>  [sshexec] Connecting to xxx.com:22                      tasks disappear 
> at this point?
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
>  [sshexec] Connecting to xxx.com:22
> 
> BUILD FAILED
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:31: 
> com.jcraft.jsch.JSchException: Session.connect: java.io.IOException:
> 
> Total time: 2 minutes 14 seconds
> 
> 
> 
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
> Buildfile: build.xml
> 
> grabbit:
>  [sshexec] Connecting to xxx.com:22
> 
> BUILD FAILED
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:5: 
> com.jcraft.jsch.JSchException: Session.connect: 
> java.net.ConnectException: Connection timed out: connect
> 
> Total time: 21 seconds
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>
> ===============================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Connection Failures On SSHExec Task

Posted by Woodchuck <wo...@yahoo.com>.
hey, get in line like everyone else!

use correct time and dates.  

i delete all annoying future dated posts


--- Bill Winspur <bw...@wynnon.com> wrote:

> Synopsis
> -------- I am running ant 6.1.2 on XP Pro and have a test
> case that produces SSH connection failures by repetitively
> running the same <sshexec .../> task.
> 
> The first failure occurs after about two thirds (10) of the tasks
> have executed. At this point ant hangs up for about 2 minutes,
> then logs the following exception on the console.
>     com.jcraft.jsch.JSchException: Session.connect:
> java.io.IOException: .
> 
> If I then run the build again it hangs up immediately for 20 seconds,
> then logs the following exception on the console.
>   com.jcraft.jsch.JSchException: Session.connect: 
> java.net.ConnectException: Connection timed out: connect
> 
> Once the failure occurs I must wait about ten minutes until
> the connection timeouts go away and I can run the build
> again until the connection problem reappears.
> 
> The server is running Openssh on fedora RC2.
> 
> Question 1
> ----------
> Is this a known problem with SSHExec (ant), jsch, or openssh?
> 
> 
> Details
> -------
> The build file is very simple, and looks like this:
> 
> ===============================
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="project" default="grabbit">
>     <target name="grabbit">
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
> 
>         <sshexec host="xxx.com" username="root"
>             command="whoami" password="secret" trust="true"/>
>     </target>
> </project>
> ===============================
> 
> Running the build produces the following console output:
> 
> ===============================
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
> Buildfile: build.xml
> 
> grabbit:
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] root
>   [sshexec] Connecting to xxx.com:22   <----  Question 2. why does
> the 
> console output from
>   [sshexec] Connecting to xxx.com:22                      tasks 
> disappear at this point?
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
>   [sshexec] Connecting to xxx.com:22
> 
> BUILD FAILED
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:31: 
> com.jcraft.jsch.JSchException: Session.connect: java.io.IOException:
> 
> Total time: 2 minutes 14 seconds
> 
> 
> 
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>ant
> Buildfile: build.xml
> 
> grabbit:
>   [sshexec] Connecting to xxx.com:22
> 
> BUILD FAILED
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit\build.xml:5: 
> com.jcraft.jsch.JSchException: Session.connect: 
> java.net.ConnectException: Connection timed out: connect
> 
> Total time: 21 seconds
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\hangit>
> ===============================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org