brooklyncentral / brooklyn

This project has moved and is now part of the ASF
https://github.com/apache/incubator-brooklyn
72 stars 27 forks source link

jboss standalone.xml can't be `put` when deploying from windows #1403

Open ahgittin opened 10 years ago

ahgittin commented 10 years ago

deploying jboss from windows to a remote byon linux server, we get the following:

Failed after 50.8s: (root@173.193.162.6:22) (root@173.193.162.6:22) error acquiring Put(path=[/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/standalone/configuration/standalone-brooklyn.xml 15449]) (attempt 4/4, in time 6.89s/2m); out of retries: No such file

at the bottom of the stack trace we have

Caused by: brooklyn.util.internal.ssh.SshException: (root@173.193.162.6:22) (root@173.193.162.6:22) error acquiring Put(path=[/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/standalone/configuration/standalone-brooklyn.xml 15449]) (attempt 4/4, in time 6.89s/2m); out of retries: No such file
at brooklyn.util.internal.ssh.SshAbstractTool.propagate(SshAbstractTool.java:151)
at brooklyn.util.internal.ssh.sshj.SshjTool.acquire(SshjTool.java:396)
at brooklyn.util.internal.ssh.sshj.SshjTool.copyToServer(SshjTool.java:243)
at brooklyn.util.internal.ssh.sshj.SshjTool.copyToServer(SshjTool.java:239)
at brooklyn.util.internal.ssh.sshj.SshjTool.copyToServer(SshjTool.java:230)
at brooklyn.location.basic.SshMachineLocation$14.apply(SshMachineLocation.java:633)
at brooklyn.location.basic.SshMachineLocation$14.apply(SshMachineLocation.java:1)
at brooklyn.util.pool.BasicPool.exec(BasicPool.java:129)
at brooklyn.location.basic.SshMachineLocation.execSsh(SshMachineLocation.java:419)
at brooklyn.location.basic.SshMachineLocation.copyTo(SshMachineLocation.java:631)
at brooklyn.location.basic.SshMachineLocation.copyTo(SshMachineLocation.java:609)
at brooklyn.location.basic.SshMachineLocation.copyTo(SshMachineLocation.java:606)
at brooklyn.entity.basic.AbstractSoftwareProcessSshDriver.copyTemplate(AbstractSoftwareProcessSshDriver.java:305)
at brooklyn.entity.basic.AbstractSoftwareProcessSshDriver.copyTemplate(AbstractSoftwareProcessSshDriver.java:286)
at brooklyn.entity.webapp.jboss.JBoss7SshDriver.customize(JBoss7SshDriver.java:172)
sjcorbett commented 10 years ago

The path Brooklyn is trying to copy standalone-brooklyn.xml to is:

/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/standalone/configuration/standalone-brooklyn.xml

Which is obviously wrong.

The code that does this is:

String destinationConfigFile = Os.mergePathsUnix(getRunDir(), SERVER_TYPE, "configuration", CONFIG_FILE);
copyTemplate(getTemplateConfigurationUrl(), destinationConfigFile);

So it would appear that getRunDir() is returning "/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/". Is SoftwareProcess.RUN_DIR being set to something unusual in the blueprint?

ahgittin commented 10 years ago

Don't think there's any special setting but it could be a relative v absolute path check failing deploying from Windows.

Best Alex On 22 May 2014 09:37, "Sam Corbett" notifications@github.com wrote:

The path Brooklyn is trying to copy standalone-brooklyn.xml to is:

/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/standalone/configuration/standalone-brooklyn.xml

Which is obviously wrong.

The code that does this is:

String destinationConfigFile = Os.mergePathsUnix(getRunDir(), SERVER_TYPE, "configuration", CONFIG_FILE);copyTemplate(getTemplateConfigurationUrl(), destinationConfigFile);

So it would appear that getRunDir() is returning "/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/root/brooklyn-managed-processes/apps/D2JE4t7S/entities/JBoss7Server_kafcWTaO/". Is SoftwareProcess.RUN_DIR being set to something unusual in the blueprint?

— Reply to this email directly or view it on GitHubhttps://github.com/brooklyncentral/brooklyn/issues/1403#issuecomment-43904862 .