1

I am attempting to bootstrap a private OpenStack cloud using Cloudify 2.7.1. It boots up the Linux instance correctly but fails "Uploading files to 192.168.10.XXX." due to an SFTP problem : "Could not determine the type of file "sftp://root:***@192.168.10.xxx/root/gs-files".".

I can access to the Instance using ssh (there is no probleme in the connection). I tried with other images (CentOS, Ubuntu, Cerros, ...) but always the same error !!

can anyone help me please ?

I attached a screenshot of the network topology created by Cloudify, and the stack trace.

Full stack trace:

2015-04-30 10:26:27,470  INFO [org.cloudifysource.shell.commands.AbstractGSCommand] - Setting security profile to "nonsecure".
2015-04-30
 10:26:27,589  INFO
[org.cloudifysource.shell.commands.AbstractGSCommand] - Bootstrapping
cloud openstack-havana. This may take a few minutes.
2015-04-30
10:26:27,677  INFO
[org.cloudifysource.esc.driver.provisioning.BaseProvisioningDriver] -
Setup network configuration for managers
2015-04-30 10:26:27,677  
INFO [org.cloudifysource.esc.driver.provisioning.BaseProvisioningDriver]
 - Using management network : Cloudify-Management-Network
2015-04-30
10:26:51,536  INFO
[org.cloudifysource.esc.shell.listener.CliAgentlessInstallerListener] -
Attempting to access Management VM 192.168.10.241.
2015-04-30
10:27:10,551  INFO
[org.cloudifysource.esc.shell.listener.CliAgentlessInstallerListener] -
Uploading files to 192.168.10.241.
2015-04-30 10:27:15,708  WARNING [com.jcraft.jsch] - Permanently added '192.168.10.241' (RSA) to the list of known hosts.
2015-04-30
 10:27:25,998  INFO
[org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper] -
Failed accessing management VM 192.168.10.241 Reason: Failed to set up
file transfer: Unknown message with code "Could not determine the type
of file "sftp://cirros@192.168.10.241/cirros/gs-files".".; Caused by:
org.cloudifysource.esc.installer.InstallerException: Failed to set up
file transfer: Unknown message with code "Could not determine the type
of file "sftp://cirros@192.168.10.241/cirros/gs-files".".
2015-04-30
10:27:26,210  INFO
[org.cloudifysource.esc.driver.provisioning.openstack.OpenStackCloudifyDriver]
 - Deleting Floating ip:
FloatingIp[floatingNetworkId=15578898-5e6b-44d9-a73a-1328ca6ea140,floatingIpAddress=192.168.10.241,portId=4b8dc211-12e8-4383-8799-f783d2786e98,id=593d8424-cfec-41ed-8204-ed8609366416]
2015-04-30
 10:27:29,607  SEVERE
[org.cloudifysource.shell.commands.AbstractGSCommand] - Failed to set up
 file transfer: Unknown message with code "Could not determine the type
of file "sftp://cirros@192.168.10.241/cirros/gs-files".". :
org.cloudifysource.esc.installer.InstallerException: Failed to set up
file transfer: Unknown message with code "Could not determine the type
of file "sftp://cirros@192.168.10.241/cirros/gs-files".".
    at org.cloudifysource.esc.installer.filetransfer.VfsFileTransfer.initialize(VfsFileTransfer.java:206)
    at org.cloudifysource.esc.installer.AgentlessInstaller.uploadFilesToServer(AgentlessInstaller.java:306)
    at org.cloudifysource.esc.installer.AgentlessInstaller.installOnMachineWithIP(AgentlessInstaller.java:210)
    at org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper$1.call(CloudGridAgentBootstrapper.java:865)
    at org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper$1.call(CloudGridAgentBootstrapper.java:860)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused
 by: org.apache.commons.vfs2.FileSystemException: Unknown message with
code "Could not determine the type of file
"sftp://cirros@192.168.10.241/cirros/gs-files".".
    at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:95)
    at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:366)
    at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:317)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:85)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:65)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:693)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:621)
    at org.cloudifysource.esc.installer.filetransfer.VfsFileTransfer.resolveTargetDirectory(VfsFileTransfer.java:218)
    at org.cloudifysource.esc.installer.filetransfer.VfsFileTransfer.initialize(VfsFileTransfer.java:203)
    ... 8 more
Caused
 by: org.apache.commons.vfs2.FileSystemException: Could not determine
the type of file "sftp://cirros@192.168.10.241/cirros/gs-files".
    at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:505)
    at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:91)
    ... 16 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://cirros@192.168.10.241/".
    at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:153)
    at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:151)
    at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:114)
    at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:496)
    ... 17 more
Caused by: com.jcraft.jsch.JSchException: java.io.IOException: Pipe closed
    at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:288)
    at com.jcraft.jsch.Channel.connect(Channel.java:152)
    at com.jcraft.jsch.Channel.connect(Channel.java:145)
    at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:130)
    ... 20 more
Caused by: java.io.IOException: Pipe closed
    at java.io.PipedInputStream.read(PipedInputStream.java:308)
    at java.io.PipedInputStream.read(PipedInputStream.java:378)
    at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2665)
    at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2691)
    at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:257)
    ... 23 more
Siguza
  • 21,155
  • 6
  • 52
  • 89
  • looks similar https://cloudifysource.zendesk.com/entries/22561398-ssh-key-used-by-SFTP-for-bootstrapping-cloudify-on-Openstack try running yours with --verbose and see if that gives more info – Anshu Prateek Apr 30 '15 at 09:29

1 Answers1

1

Looks like you are trying to sftp into a cirros instance - I am not sure cirros even supports sftp. You can try this by using the sftp command line utility.

In general, sftp has to be configured and available on the target machine.

You can try using the SCP file transfer mode by setting this in your compute template:

 fileTransfer org.cloudifysource.domain.cloud.FileTransferModes.SCP

If you are really using cirros, I suspect bootstrapping will fail. Cloudify was never tested on cirros. I think cirros is lacking some very basic utilities (I think it is not running bash. Not sure if it has wget). Cirros was never meant as a generic distribution - it is meant for testing your cloud's basic functionality.

One more thing - Cloudify 2 has reached End-of-Life - it is no longer supported. You should check out Cloudify 3.

Barak
  • 3,066
  • 2
  • 20
  • 33
  • i tried the same thing whith Ubuntu, but i still have the same error. – Yassine Maachi Apr 30 '15 at 12:58
  • here is it : Setting security profile to "nonsecure". . . . [org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper] - Failed accessing management VM 192.168.10.227 Reason: Failed to set up file transfer: Unknown message with code "Could not determine the type of file "sftp://root@192.168.10.227/root/gs-files".".; Caused by: org.cloudifysource.esc.installer.InstallerException: Failed to set up file transfer: Unknown message with code "Could not determine the type of file "sftp://root@192.168.10.227/root/gs-files".". – Yassine Maachi May 04 '15 at 14:02
  • [org.cloudifysource.shell.commands.AbstractGSCommand] - Setting security profile to "nonsecure"................................ [org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper] - Failed accessing management VM 192.168.10.230 Reason: Failed to set up file transfer: Unknown message with code "Could not determine the type of file "sftp://root@192.168.10.230/root/gs-files".".; Caused by: org.cloudifysource.esc.installer.InstallerException: Failed to set up file transfer: Unknown message with code "Could not determine the type of file "sftp://root@192.168.10.230/root/gs-files".". – Yassine Maachi May 04 '15 at 14:14
  • 1
    Did you check that you can log in using the SFTP command line utility? It looks like you are logging in as root - with most ubuntu cloud images, the only user you can log in with is 'ubuntu' – Barak May 31 '15 at 19:42