Aled Sage created BROOKLYN-294:
----------------------------------
Summary: "/bin/bash: bad interpreter: Text file busy":
VanillaSoftwareProcess fails to execute commands
Key: BROOKLYN-294
URL: https://issues.apache.org/jira/browse/BROOKLYN-294
Project: Brooklyn
Issue Type: Improvement
Affects Versions: 0.9.0
Reporter: Aled Sage
When deploying an app to an OpenStack environment (behind a VPN), one of the
VanillaSoftwareProcess entities failed to execute "customize" with the error
shown below:
{noformat}
-bash: /tmp/brooklyn-20160608-111535279-hYmg-customizing_VanillaSoftwarePro.sh:
/bin/bash: bad interpreter: Text file busy
{noformat}
This error means that another process is accessing the file (i.e. has some kind
of lock on it), so we can't execute it.
Just before this, the first attempt to upload the script failed after approx
one minute timeout. I'm guessing that the VPN went down temporarily while it
was trying to upload the script.
I'd have expected that the failed upload would not have kept a lock on the
file, but that seems to be the most likely cause based on the log snippets
below:
{noformat}
2016-06-08 11:15:35,279 DEBUG brooklyn.SSH [brooklyn-execmanager-yA1Lh5GF-56]:
customizing VanillaSoftwareProcessImpl{id=r6cqhabne2}, initiating ssh on
machine
SshMachineLocation[10.104.0.66:[email protected]/10.104.0.66:22(id=r05vsyvw5b)]
(env {<snip>}): <snip>
2016-06-08 11:16:37,774 DEBUG o.a.b.u.c.i.ssh.sshj.SshjTool
[brooklyn-execmanager-yA1Lh5GF-56]: << ([email protected]:22) error acquiring
Put(path=[/tmp/brooklyn-20160608-111535279-hYmg-customizing_VanillaSoftwarePro.sh
3334]) (attempt 1/4, in time 1m 2s/2m): Timeout expired
2016-06-08 11:16:37,774 DEBUG o.a.b.u.c.i.s.BackoffLimitedRetryHandler
[brooklyn-execmanager-yA1Lh5GF-56]: Retry 1/4: delaying for 50 ms:
([email protected]:22) error acquiring
Put(path=[/tmp/brooklyn-20160608-111535279-hYmg-customizing_VanillaSoftwarePro.sh
3334]): Timeout expired
2016-06-08 11:16:46,246 DEBUG brooklyn.SSH [Thread-263]:
[[email protected]:stderr] -bash:
/tmp/brooklyn-20160608-111535279-hYmg-customizing_VanillaSoftwarePro.sh:
/bin/bash: bad interpreter: Text file busy
2016-06-08 11:16:46,246 DEBUG brooklyn.SSH [Thread-262]:
[[email protected]:stdout] Executed
/tmp/brooklyn-20160608-111535279-hYmg-customizing_VanillaSoftwarePro.sh, result
126
2016-06-08 11:16:46,246 DEBUG brooklyn.SSH [brooklyn-execmanager-yA1Lh5GF-56]:
customizing VanillaSoftwareProcessImpl{id=r6cqhabne2}, on machine
SshMachineLocation[10.104.0.66:[email protected]/10.104.0.66:22(id=r05vsyvw5b)],
completed: return status 126
2016-06-08 11:16:46,246 WARN o.a.b.e.s.b.l.ScriptHelper
[brooklyn-execmanager-yA1Lh5GF-56]: Execution failed, invalid result 126 for
customizing VanillaSoftwareProcessImpl{id=r6cqhabne2} (throwing)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)