FAQ
Hi,

ant 1.7.1, jsch-0.1.33, commons-net-1.5.0-dev, Red Hat Enterprise
Linux Server release 5.2 (Tikanga)

I am trying to use ant on one server, which is using sshexec to invoke
ant on a remote server. I also tried creating a shell script that just
executes ant and using that as the command attr value for sshexec. The
shell script also errors out with ant:command not found). I keep
getting:

"Remote command failed with exit status 127

[sshexec] bash: ant: command not found"

ANT_HOME is defined correctly and the $ANT_HOME/bin is added to the
PATH. Both the ant build (and shell script calling the ant build) work
when I am ssh'd into the remote machine. I use the same user for
sshexec as the one that successfully logs in and runs locally. I have
ssh'd into the remote machine from the calling machine and accepted
the key.

THE MAIN DIFFERENCE: This used to work for me in the past on Red Hat
ES 3 (I believe I am remembering the version correctly) and now the
machine is running Red Hat Enterprise Linux Server release 5.2 (Tikanga)

Any ideas what I am doing wrong?

thanks,
-Rob


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

Search Discussions

  • Stefan Bodewig at Sep 3, 2008 at 4:00 am

    On Tue, 2 Sep 2008, Robert Koberg wrote:

    Hi,

    ant 1.7.1, jsch-0.1.33, commons-net-1.5.0-dev, Red Hat Enterprise
    Linux Server release 5.2 (Tikanga)

    I am trying to use ant on one server, which is using sshexec to
    invoke ant on a remote server. I also tried creating a shell script
    that just executes ant and using that as the command attr value for
    sshexec. The shell script also errors out with ant:command not
    found). I keep getting:

    "Remote command failed with exit status 127

    [sshexec] bash: ant: command not found"

    ANT_HOME is defined correctly and the $ANT_HOME/bin is added to the
    PATH.
    Make sshexec run "env". When running a command via ssh (as opposed to
    opening an interactive shell) your environment may not be what you
    think it is.
    THE MAIN DIFFERENCE: This used to work for me in the past on Red Hat
    ES 3 (I believe I am remembering the version correctly) and now the
    machine is running Red Hat Enterprise Linux Server release 5.2
    (Tikanga)
    I think there are a couple of configuration options to sshd that
    control what environment is used, so maybe your configuration is
    different. ISTR there are a few things you can configure in
    ~/.ssh/config (or something similar) but don't remember the details
    right now.

    Stefan

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
    For additional commands, e-mail: user-help@ant.apache.org
  • Robert Koberg at Sep 3, 2008 at 12:24 pm

    On Sep 2, 2008, at 11:58 PM, Stefan Bodewig wrote:
    On Tue, 2 Sep 2008, Robert Koberg wrote:

    Hi,

    ant 1.7.1, jsch-0.1.33, commons-net-1.5.0-dev, Red Hat Enterprise
    Linux Server release 5.2 (Tikanga)

    I am trying to use ant on one server, which is using sshexec to
    invoke ant on a remote server. I also tried creating a shell script
    that just executes ant and using that as the command attr value for
    sshexec. The shell script also errors out with ant:command not
    found). I keep getting:

    "Remote command failed with exit status 127

    [sshexec] bash: ant: command not found"

    ANT_HOME is defined correctly and the $ANT_HOME/bin is added to the
    PATH.
    Make sshexec run "env". When running a command via ssh (as opposed to
    opening an interactive shell) your environment may not be what you
    think it is.
    Yes, that was the problem.

    Putting java and ant on the PATH in the shell script solves the problem.

    thanks!
    -Rob

    THE MAIN DIFFERENCE: This used to work for me in the past on Red Hat
    ES 3 (I believe I am remembering the version correctly) and now the
    machine is running Red Hat Enterprise Linux Server release 5.2
    (Tikanga)
    I think there are a couple of configuration options to sshd that
    control what environment is used, so maybe your configuration is
    different. ISTR there are a few things you can configure in
    ~/.ssh/config (or something similar) but don't remember the details
    right now.

    Stefan

    ---------------------------------------------------------------------
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedSep 3, '08 at 12:31a
activeSep 3, '08 at 12:24p
posts3
users2
websiteant.apache.org

2 users in discussion

Robert Koberg: 2 posts Stefan Bodewig: 1 post

People

Translate

site design / logo © 2022 Grokbase