Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CAA817C01 for ; Fri, 13 Feb 2015 02:01:26 +0000 (UTC) Received: (qmail 87426 invoked by uid 500); 13 Feb 2015 02:01:26 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 87370 invoked by uid 500); 13 Feb 2015 02:01:26 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 87354 invoked by uid 99); 13 Feb 2015 02:01:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2015 02:01:25 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of pbw@pbw.id.au does not designate 74.50.53.57 as permitted sender) Received: from [74.50.53.57] (HELO oz-ehealth.org) (74.50.53.57) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2015 02:00:59 +0000 Received: from lydia.local (60-241-98-20.static.tpgi.com.au [60.241.98.20]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pbw) by oz-ehealth.org (Postfix) with ESMTPSA id 4D761204D4; Fri, 13 Feb 2015 12:00:23 +1000 (AEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: sshexec From: Peter West In-Reply-To: <6DB2A904-32BA-4010-904E-A1088340DC4B@yahoo.com> Date: Fri, 13 Feb 2015 12:00:20 +1000 Cc: Ant Users List Content-Transfer-Encoding: quoted-printable Message-Id: <1E50A84A-9300-400B-BF71-283C645A09C6@pbw.id.au> References: <131431206.677973.1423604173570.JavaMail.yahoo@mail.yahoo.com> <1123716485.763722.1423668027943.JavaMail.yahoo@mail.yahoo.com> <94C40A04-1108-4CF9-9CBB-E4262A66979D@pbw.id.au> <912108588.913746.1423759592138.JavaMail.yahoo@mail.yahoo.com> <684C35CD-10AF-41E9-89EE-9900C39E5C0B@pbw.id.au> <6DB2A904-32BA-4010-904E-A1088340DC4B@yahoo.com> To: Eric Fetzer X-Mailer: Apple Mail (2.2070.6) X-Virus-Checked: Checked by ClamAV on apache.org Someone who knows the codebase better than I do may choose to comment, = but I can't imagine why a Java program with full access to the Javi API = facilities would try to run a javascript script. =46rom the look of the = trace, the error is being reported bak to the sshexec process, so it's = happening on the remote side. Your sshexec setup is invoking a bash = script as a login with use ant. Because it's a login script, it will, I = think, try to execute any .profile, .bash_profile, .bashrc, etc, and = when it finishes, ti will execute any .bash_logout it finds. Try remote executing the ant task directly, without the intervening bash = invocation. That is, instead of calling bash, call ant directly. Is your daughter Syro_Phoenician? In any case, I hope she is well now. Peter West "Yes, Lord; yet even the dogs under the table eat the children's = crumbs." > On 13 Feb 2015, at 11:18 am, Eric Fetzer wrote: >=20 > Yes Peter, the one line left is in the calling ant script. When it = returns from the sshexec, always returning with success, sometimes = sshexec must be misinterpreting as failure. I'm not sure where that = JavaScript is coming from, I assumed that was a part of the sshexec task = itself. >=20 > BTW, thanks for the table scraps, I assume my daughter is better now! = ;0) >=20 >> On Feb 12, 2015, at 7:39 PM, Peter West wrote: >>=20 >> Hi Eric, >>=20 >> I'm still confused. When you say there's one line left in the ant = script, I assume you're talking about the calling script I assume also = that the one line left is the "copy" task that you see reporting below. >>=20 >> In your original post, the copy task doesn't get executed because of = a failure in the _remote_ task, i.e. the sshexec. So is it the case = that the remote task fails _sometimes_, giving the error trace you sent, = and otherwise succeeds, giving the trace you have just posted? >>=20 >> Also, where is the javascript being executed? This is a javascript = security violation error that's being reported. >>=20 >> Peter West >> "Yes, Lord; yet even the dogs under the table eat the children's = crumbs." >>=20 >>> On 13 Feb 2015, at 2:46 am, Eric Fetzer = wrote: >>>=20 >>> Here it is with a successful finish Peter: [sshexec] [sshexec] = main: >>> [sshexec] [sshexec] [sshexec] BUILD SUCCESSFUL [sshexec] Total = time: 1 minute 9 seconds [copy] Copying 1 file to = c:\BuildDeployScripts\dist\Logs\2.16.3.5-20150211-0807\output That's it, = no stack trace. Once the sshexec finishes, there is only one more line = of ant code left. Thanks for responding!=20 >>>=20 >>> On Wednesday, February 11, 2015 3:50 PM, Peter West = wrote: >>>=20 >>>=20 >>>> I see sshexec finish with a successful status, then it gets back to = the calling task and bombs out. >>>=20 >>> What is it that you actually see, when you "see sshexec finish with = a successful status?" Obviously it's no the return value. >>>=20 >>> Where's the javascript happening, and what is it doing that causes a = security violation? >>>=20 >>> Peter West >>> And he marvelled because of their unbelief. >>>=20 >>>> On 12 Feb 2015, at 1:20 am, Eric Fetzer = wrote: >>>>=20 >>>> OK, seems to work one time, fail another, work one time, fail = another... Anyone even have a hint on how to trouble-shoot it? I = already have sshexec set to verbose and that just gives the stack trace. = Makes no sense to me.=20 >>>>=20 >>>> On Tuesday, February 10, 2015 2:36 PM, Eric Fetzer = wrote: >>>>=20 >>>>=20 >>>> I'm running Ant 1.7 and having an issue I don't understand. I see = sshexec finish with a successful status, then it gets back to the = calling task and bombs out. I upped the timeout value and that seemed = to work once, but not after that even though it's WAY over the value = that the ssh command is taking. Here's the ssh task, and then the build = output: >>>> >>> username=3D"myUser" >>>> keyfile=3D"myUser_id_rsa" >>>> passphrase=3D"" >>>> command=3D"/bin/bash -l ant -f /my/folder/BuildMyApp.xml" >>>> trust=3D"true" >>>> timeout=3D"1800000" >>>> verbose=3D"true" >>>> /> >>>> [sshexec] main: >>>> [sshexec] [sshexec] [sshexec] BUILD SUCCESSFUL [sshexec] Total = time: 1 minute 7 seconds >>>> [sshexec] Feb 10, 2015 1:25:02 PM org.apache.bsf.BSFManager exec >>>> SEVERE: Exception : >>>> java.security.PrivilegedActionException: = org.apache.bsf.BSFException: JavaScript Error: Internal Error: The = following error occurred while executing this line: >>>> c:\BuildDeployScripts\build.xml:338: Remote command failed with = exit status -1 >>>> at = java.security.AccessController.doPrivileged(AccessController.java:250) >>>> at org.apache.bsf.BSFManager.exec(BSFManager.java:491) >>>> at = org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner= .java:103) >>>> at = org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at = org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at = org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391= ) >>>> at = net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:259) >>>> at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268) >>>> at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:299) >>>> at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at org.apache.tools.ant.Target.execute(Target.java:357) >>>> at org.apache.tools.ant.Target.performTasks(Target.java:385) >>>> at = org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) >>>> at = org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheck= Executor.java:38) >>>> at org.apache.tools.ant.Project.executeTargets(Project.java:1181) >>>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) >>>> at = org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at = org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) >>>> at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at = sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:= 79) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:134) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at = org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at = sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:= 79) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at = net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207) >>>> at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>>> at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm= pl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:618) >>>> at = org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105= ) >>>> at org.apache.tools.ant.Task.perform(Task.java:348) >>>> at org.apache.tools.ant.Target.execute(Target.java:357) >>>> at org.apache.tools.ant.Target.performTasks(Target.java:385) >>>> at = org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) >>>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298) >>>> at = org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor= .java:41) >>>> at org.apache.tools.ant.Project.executeTargets(Project.java:1181) >>>> at org.apache.tools.ant.Main.runBuild(Main.java:698) >>>> at org.apache.tools.ant.Main.startAnt(Main.java:199) >>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) >>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) >>>> Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal = Error: The following error occurred while executing this line: >>>> c:\BuildDeployScripts\build.xml:338: Remote command failed with = exit status -1 >>>> at = org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScriptE= ngine.java:195) >>>> at = org.apache.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine.j= ava:147) >>>> at org.apache.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:141) >>>> at org.apache.bsf.BSFManager$6.run(BSFManager.java:493) >>>> at = java.security.AccessController.doPrivileged(AccessController.java:246) >>>> ... 78 more >>>> Anyone have a clue? >>>> Thanks,Eric >>>=20 >>>=20 >>> = --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: user-help@ant.apache.org >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org