1

我正在尝试使用 Cloudify 2.7.1 引导私有 OpenStack 云。它可以正确启动 Linux 实例,但无法“将文件上传到 192.168.10.XXX”。由于 SFTP 问题:“无法确定文件类型“sftp://root:***@192.168.10.xxx/root/gs-files”。”。

我可以使用 ssh 访问实例(连接没有问题)。我尝试使用其他图像(CentOS、Ubuntu、Cerros...),但总是出现同样的错误!

谁能帮帮我?

我附上了 Cloudify 创建的网络拓扑的屏幕截图和堆栈跟踪。

完整的堆栈跟踪:

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
4

1 回答 1

1

看起来您正在尝试将 sftp 导入 cirros 实例 - 我不确定 cirros 是否支持 sftp。您可以使用 sftp 命令行实用程序来尝试此操作。

通常,sftp 必须在目标机器上配置并可用。

您可以通过在计算模板中进行设置来尝试使用 SCP 文件传输模式:

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

如果你真的在使用 cirros,我怀疑引导会失败。Cloudify 从未在 cirros 上进行过测试。我认为 cirros 缺少一些非常基本的实用程序(我认为它没有运行 bash。不确定它是否有 wget)。Cirros 从来都不是一个通用的发行版——它是用来测试你的云的基本功能的。

还有一件事 - Cloudify 2 已停产 - 它不再受支持。您应该查看 Cloudify 3。

于 2015-04-30T09:35:57.760 回答