devstack报错generate-subunit fail 5C

各位朋友好:我在centos7环境下安装liberty版本的devstack环境时,执行./stack.sh后
报错如下:
2017-05-08 06:38:40.129 | You are using pip version 7.1.2, however version 9.0.1 is available.
2017-05-08 06:38:40.130 | You should consider upgrading via the 'pip install --upgrade pip' command.
2017-05-08 06:38:40.151 | + exit_trap
2017-05-08 06:38:40.151 | + local r=1
2017-05-08 06:38:40.152 | ++ jobs -p
2017-05-08 06:38:40.152 | + jobs=
2017-05-08 06:38:40.152 | + [[ -n '' ]]
2017-05-08 06:38:40.152 | + kill_spinner
2017-05-08 06:38:40.152 | + '[' '!' -z '' ']'
2017-05-08 06:38:40.152 | + [[ 1 -ne 0 ]]
2017-05-08 06:38:40.152 | + echo 'Error on exit'
2017-05-08 06:38:40.152 | Error on exit
2017-05-08 06:38:40.152 | + generate-subunit 1494225476 44 fail
2017-05-08 06:38:40.203 | Traceback (most recent call last):
2017-05-08 06:38:40.203 | File "/usr/bin/generate-subunit", line 7, in
2017-05-08 06:38:40.203 | from os_testr.generate_subunit import main
2017-05-08 06:38:40.203 | File "/usr/lib/python2.7/site-packages/os_testr/__init__.py", line 19, in
2017-05-08 06:38:40.203 | 'os_testr').version_string()
2017-05-08 06:38:40.203 | File "/usr/lib/python2.7/site-packages/pbr/version.py", line 466, in version_string
2017-05-08 06:38:40.203 | return self.semantic_version().brief_string()
2017-05-08 06:38:40.203 | File "/usr/lib/python2.7/site-packages/pbr/version.py", line 461, in semantic_version
2017-05-08 06:38:40.203 | self._semantic = self._get_version_from_pkg_resources()
2017-05-08 06:38:40.203 | File "/usr/lib/python2.7/site-packages/pbr/version.py", line 438, in get_version_from_pkg_resources
2017-05-08 06:38:40.203 | import pkg_resources
2017-05-08 06:38:40.203 | File "/usr/lib/python2.7/site-packages/pkg_resources/
_init__.py", line 72, in
2017-05-08 06:38:40.203 | import packaging.requirements
2017-05-08 06:38:40.203 | ImportError: No module named requirements

下面是我的local.conf配置文件
[[local|localrc]]

Define images to be automatically downloaded during the DevStack built process.

IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"

Credentials

DATABASE_PASSWORD=123456
ADMIN_PASSWORD=123456
SERVICE_PASSWORD=123456
SERVICE_TOKEN=pass
RABBIT_PASSWORD=123456
#FLAT_INTERFACE=eth0

HOST_IP=192.168.192.130
SERVICE_HOST=192.168.192.130
MYSQL_HOST=192.168.192.130
RABBIT_HOST=192.168.192.130
GLANCE_HOSTPORT=192.168.192.130:9292

Neutron options

Q_USE_SECGROUP=True
FLOATING_RANGE=192.168.192.0/24
FIXED_RANGE=10.0.0.0/24
Q_FLOATING_ALLOCATION_POOL=start=192.168.192.202,end=192.168.192.210
PUBLIC_NETWORK_GATEWAY=192.168.192.2
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth0
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

Work offline

#OFFLINE=True

Reclone each time

RECLONE=False

Logging

-------

By default stack.sh output only goes to the terminal where it runs. It can

be configured to additionally log to a file by setting LOGFILE to the full

path of the destination log file. A timestamp will be appended to the given name.

LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

the number of days by setting LOGDAYS.

LOGDAYS=1

Database Backend MySQL

enable_service mysql

RPC Backend RabbitMQ

enable_service rabbit

Enable Keystone - OpenStack Identity Service

enable_service key

Horizon - OpenStack Dashboard Service

enable_service horizon

Enable Swift - Object Storage Service without replication.

enable_service s-proxy s-object s-container s-account
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1

Enable Glance - OpenStack Image service

enable_service g-api g-reg

Enable Cinder - Block Storage service for OpenStack

VOLUME_GROUP="cinder-volumes"
enable_service cinder c-api c-vol c-sch c-bak

Enable Heat (orchestration) Service

enable_service heat h-api h-api-cfn h-api-cw h-eng

Enable Trove (database) Service

enable_service trove tr-api tr-tmgr tr-cond

Enable Sahara (data_processing) Service

enable_service sahara

Enable Tempest - The OpenStack Integration Test Suite

enable_service tempest

Enabling Neutron (network) Service

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron

Neutron - Load Balancing

enable_service q-lbaas

Neutron - Firewall as a Service

enable_service q-fwaas

Neutron - VPN as a Service

enable_service q-vpn

VLAN configuration.

#Q_PLUGIN=ml2
#ENABLE_TENANT_VLANS=True

GRE tunnel configuration

#Q_PLUGIN=ml2
#ENABLE_TENANT_TUNNELS=True

VXLAN tunnel configuration

Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan

Enable Ceilometer - Metering Service (metering + alarming)

enable_service ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-api
enable_service ceilometer-alarm-notify ceilometer-alarm-eval
enable_service ceilometer-anotification

Enable NoVNC

enable_service n-novnc n-cauth

Enable the Ceilometer devstack plugin

enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git

Branches

KEYSTONE_BRANCH=stable/liberty
NOVA_BRANCH=stable/liberty
NEUTRON_BRANCH=stable/liberty
SWIFT_BRANCH=stable/liberty
GLANCE_BRANCH=stable/liberty
CINDER_BRANCH=stable/liberty
HEAT_BRANCH=stable/liberty
TROVE_BRANCH=stable/liberty
HORIZON_BRANCH=stable/liberty
SAHARA_BRANCH=stable/liberty
CEILOMETER_BRANCH=stable/liberty
TROVE_BRANCH=stable/liberty

Select Keystone's token format

Choose from 'UUID', 'PKI', or 'PKIZ'

INSERT THIS LINE...

KEYSTONE_TOKEN_FORMAT=${KEYSTONE_TOKEN_FORMAT:-UUID}
KEYSTONE_TOKEN_FORMAT=$(echo ${KEYSTONE_TOKEN_FORMAT} | tr '[:upper:]' '[:lower:]')

[[post-config|$NOVA_CONF]]
[DEFAULT]

Ceilometer notification driver

instance_usage_audit=True
instance_usage_audit_period=hour
notify_on_state_change=vm_and_task_state
notification_driver=nova.openstack.common.notifier.rpc_notifier
notification_driver=ceilometer.compute.nova_notifier

请教各位朋友,如何解决,十分感谢。

2个回答

2017-05-08 06:38:40.129 | You are using pip version 7.1.2, however version 9.0.1 is available.
2017-05-08 06:38:40.130 | You should consider upgrading via the 'pip install --upgrade pip' command.
我没装过这个工具,但是你可能忽视了安装的错误提示

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
【android录屏填坑】录屏报错start fail,stop fail
先写个标题,有时间了填充内容。 时隔N天,终于忙完了。内容填充中…… 前言 为什么要写这么一篇文章。因为我最近做录屏实在是被坑哭了。不是遇到startfail报错,就是遇到stopfail报错,这种报错就只会告诉你在哪一行,根本没有具体的信息指引你是什么原因出错,只能百度,因此浪费了很多时间在处理报错上。录屏功能的需求还是挺大的,因此,为了让做录屏的攻城狮门减少处理这类问题的时间,也为了...
关于ubuntu14.04 安装devstack报错问题
[img=https://img-bbs.csdn.net/upload/201706/29/1498722696_633364.png][/img]rn找不到libsystemd-dev这个个文件,而且查看包也没有这个包。怎么处理,已经在这耗了两三天了。求大神指点!
fail
rnqry1->SQL->Text = "select * from a";rnqry1->Open(); rn rnqry2->SQL->Text = "select * from b";rnqry2->Open(); rnrnqry1->Clone(qry2);rnqry1->Edit(); rnqry1->Post();rnrnrn为什么表a的内容不变?
DevStack环境搭建
闲话如果你和我一样,是一个OpenStack的小白,而且之前没有搭建过任何OpenStack相关的的环境,那么你可以参考一下我搭建DevStack环境的步骤,也许能给你减少很多不必要的麻烦。
devstack环境搭建
准备以及执行安装 ①firewalld关闭 systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 ②使用清华pip源 cd /root mkdir -p ~/.pip vi ~/.pip/pip.conf [global] index-url ...
devstack部署问题记录
缺少libxml-dev,python-dev或版本不对等问题ubuntu下可以使用如下命令: sudo apt-get install aptitude sudo aptitude 组件名 不能通过root用户来运行stack.shcd到devstack/tools目录下执行create-stack-user.sh,脚本执行完后会创建一个stack用户,切换至该用户来运行stack.sh gene
快速搭建OpenStack开发环境(DevStack)
快速搭建OpenStack开发环境(DevStack)
Devstack:OpenStack开发环境快速部署
devstack是一套脚本,可以快速部署OpenStack开发环境。这是实际部署过程的记录,主要关注部署过程中遇到的问题,以及解决办法。
devstack 调试技巧
devstack 开发调试方法
Devstack真实环境搭建OpenStack
文章目录环境介绍环境搭建虚拟机安装Ubuntu环境配置砖治疑难杂症 环境介绍 VMware Workstation Pro + Ubuntu18.04(LTS) + OpenStack Queens 本文采用devstack进行自动化安装。 环境搭建 下载VMware workstation 编辑-虚拟网络编辑器-更改设置 下载Ubuntu镜像 清华大学镜像站ubuntu18.04-s...
mysql_stmt_send_long_data() fail
[code=c]DWORD dwLength = 0;rn MYSQL_BIND bind[1];rn memset(bind, 0, sizeof(bind));rn bind[0].buffer = pBuf;rn bind[0].buffer_type = MYSQL_TYPE_BLOB;rn bind[0].length = &dwLength;rn bind[0].is_null= 0;rnrn //Bind the buffersrn if(mysql_stmt_bind_param(stmt, bind))rn CLog::Instance()->LOG_WriteLine(LOG_INFO_ERROR,rn "%s: mysql_stmt_bind_param() fail, %s",rn __FUNCTION__, mysql_stmt_error(stmt));rn bRtrn = false;rn break;rn rnrn if(mysql_stmt_send_long_data(stmt, 0,rn (const char *)pBuf,rn dwEncodeLen))rn CLog::Instance()->LOG_WriteLine(LOG_INFO_ERROR,rn "%s: mysql_stmt_send_long_data() fail, %s",rn __FUNCTION__, mysql_stmt_error(stmt));rn bRtrn = false;rn break;rn [/code]rn如上面代码,发送数据时出错“mysql_stmt_send_long_data() fail, Can't send long data for non-string/non-binary data types (parameter: 0)”rn我将插入语句放入客户端直接执行是可以执行的。
Devstack — screen 调试工具的使用
目录 目录 为什么要使用 screen 工具 启动 screen screen 的切换常用 退出和重新连接 screen Restart Openstack Services screen 指令选项总览 Openstack 重启指令 glance-api glance-registry nova-api nova-...
Devstack用户指南
本课程主要帮助,想成为一名OpenStack Developer却又不知道从何开始的同学们,掌握使用Devstack搭建OpenStack,以及相应的调试方法、IDE介绍等。
如何加速Devstack安装
本课程主要帮助,想成为一名OpenStack Developer却又不知道从何开始的同学们,掌握使用Devstack搭建OpenStack,以及相应的调试方法、IDE介绍等。
steps to reinstall devstack
steps to reinstall devstackrnrn[url=http://mcheung63.no-ip.org/?p=436][/url]
使用Devstack进行开发
翻译自 devstack 官方文档 Developing with Devstack 检查服务 默认情况下,DevStack 的大多数服务都以 devstack@$servicename.service 的名字作为 system unit 运行。关于 system unit 可以参考Understanding system units a...
安装devstack 问题总结
安装devstack 问题总结
DevStack云计算平台快速搭建
这学期学校开了一门课,叫云计算平台搭建,用的书是OpenStack,这个是现在比较流行的一个云计算平台,官方对这个平台的解释是OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, al
Devstack代码流程图
-
devstack的8个包,真不容易!
python-mox libffi-devel-3.0.5-3.2.el6.x86_64 python-coverage-3.0.1-2.el6.x86_64 dnsmasq-utils-2.48-13.el6.x86_6 unixODBC-2.2.14-12.el6_3.x86_64.rpm tcl-8.5.7-6.el6.x86_64.rpm libtool-ltdl-2.2.6-15.5.el6.x86_64 tk-8.5.7-5.el6.x86_64.rpm
新版devstack查询日志
由于新版devstack使用systemd的方式来管理OpenStack各项服务,所以查询日志的方式也有所不同,现记录:systemd附带的主要功能之一是日志记录,这是一种访问日志的综合方式。这需要管理员通过journalctl来进行访问。journalctl拥有强大的查询功能,我们从一些常见的选项开始。查看特定的服务日志:sudo journalctl -f --unit devstack@n-...
devstack配置文件脚本
openstack自动化部署,完成自动化配置的相关文件可以自由配置相关信息
devstack 书籍 devstack-for-beginners
devstack教程,devstack 书籍 devstack-for-beginners
devstack 问题拾遗
1. devstack安装 ironic问题描述 2018-05-21 02:29:10.338 | Created machine node-0 with UUID 44b4abe8-08b8-4909-96bb-69139c0bc2b6 2018-05-21 02:29:10.341 | ++ /opt/stack/ironic/devstack/tools/ironic/scripts/cr...
devstack安装部署笔记--1
在公司内网搭了一个devstack 环境,用于学习opesnatck,作为菜鸟一枚,将一些概念记录一下。 pip  ---- pip 是一个Python包管理工具,主要是用于安装 PyPI 上的软件包,可以替代 easy_install 工具。      pip 的详细介绍 可见博文  http://blog.csdn.net/olanlanxiari/article/details/
devstack安装初体验(ubuntu)
devstack安装openstack 单节点开发环境
devstack kilo版安装过程
环境准备操作系统采用ubuntu14.04桌面版,操作系统分配2块网卡(均为桥接模式)操作系统安装过程没啥好说的 Ubuntu创建虚拟机的时候不要用admin/admin ,另外不要用小键盘输入密码。 网卡配置:一块上网 一块不配置地址vim /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface
安装devstack遇到的问题
本文是我用虚拟机安装devstack过程中遇到的问题,安装环境是centos7.2, centos是采用最小化安装。
devstack重启服务脚本
devstack重启脚本是rejoin-stack.sh,但是我们在devstack中往往找不到这个文件,在stackoverflow上有人回答是bug,但似乎在每一个稳定版本中都会有这个脚本。也就是说,如果大家需要这个重启的脚本,可以直接 git checkout 切换回之前的稳定的版本去找到这个脚本。这是我从kilo中找到的脚本,放到devstack目录下直接运行即可。#!/usr/bin/en
加速devstack部署过程
devstack运行很慢并容易出错的原因很大程度是因为部署过程中访问国外的git源和pypi仓库慢导致,可以通过以下方式替换为国内源 1.git 添加GIT_BASE、NOVNC_REPO和SPICE_REPO变量到local.conf文件,内容如下: [[local|localrc]] GIT_BASE=http://git.trystack.cn NOVNC_REPO=http://g
devstack在Centos7中安装教程
1.执行命令步骤,共分7步: git clone https://git.openstack.org/openstack-dev/devstack devstack/tools/create-stack-user.sh chown -R stack:stack devstack su stack cd devstack vi local.conf [[local|localrc]] # us...
devstack搭建OpenStack手册
devstack搭建OpenStack手册,是很方便易用的实践方法。
Devstack单节点环境实战配置
本实验是在VMware12下建立虚机的一个测试环境。1 前期准备工作真机环境win10 Linux版本 centos-everything-7.0 VMware版本 VMwareworkstations12 虚机配置如下: 8G内存 2核cpu(开启虚拟化) 网络配置为桥接模式 /boot 500M(一定要分大点不然之后会遇到问题) swap分区4G 其余的空间全部分给/分区配置y
python开发日志1——环境搭建,与报错:fail to load the jni shared library
心血来潮,想要学习一下python的开发,于是着手开始。一、下载工具1、官网下载新版eclipse,http://www.eclipse.org/downloads/官网下载jdk,并安装,http://www.oracle.com/technetwork/java/javase/downloads/index.html需要注意的是eclipse和jdk的版本要保持一致,32位或64位,否则就会报...
调用jsch包的java程序访问SFTP报错:Auth fail
使用的包是:jsch-0.1.50.jarrn访问linux的sftp没有问题,可以正常上传和下载文件,但是访问solaris的sftp的时候报错:Auth fail。rnSUSE 10 SP4,Solaris 10rn代码如下:rn[code=java]package test;rnrnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.io.FileNotFoundException;rnimport java.io.FileOutputStream;rnimport java.io.IOException;rnimport java.util.Iterator;rnimport java.util.Properties;rnimport java.util.Vector;rnrnimport com.jcraft.jsch.Channel;rnimport com.jcraft.jsch.ChannelSftp;rnimport com.jcraft.jsch.JSch;rnimport com.jcraft.jsch.Session;rnimport com.jcraft.jsch.SftpATTRS;rnimport com.jcraft.jsch.SftpException;rnimport com.jcraft.jsch.ChannelSftp.LsEntry;rnrnpublic class SFTPTest rnrn private String host;rn private String username;rn private String password;rn private int port = 22;rn private ChannelSftp sftp = null;rn private Session sshSession = null;rnrn public SFTPTest() rn rnrn public SFTPTest(String host, String username, String password, int port) rn this.host = host;rn this.username = username;rn this.password = password;rn this.port = port;rn rnrn public SFTPTest(String host, String username, String password) rn this.host = host;rn this.username = username;rn this.password = password;rn rnrn /**rn * connect server via sftprn */rn public void connect() rn try rnrn JSch jsch = new JSch();rn jsch.getSession(username, host, port);rn sshSession = jsch.getSession(username, host, port);rn System.out.println("Session created.");rn sshSession.setPassword(password);rn Properties sshConfig = new Properties();rn sshConfig.put("StrictHostKeyChecking", "no");rn sshSession.setConfig(sshConfig);rn sshSession.connect();rn System.out.println("Session connected.");rn System.out.println("Opening Channel.");rn Channel channel = sshSession.openChannel("sftp");rn channel.connect();rn sftp = (ChannelSftp) channel;rn System.out.println("Connected to " + host + ".");rn catch (Exception e) rn e.printStackTrace();rn rn rnrn /**rn * 关闭资源rn */rn public void disconnect() rn if (this.sftp != null) rn if (this.sftp.isConnected()) rn this.sftp.disconnect();rn System.out.println("sftp is closed already");rn rn rnrn if (this.sshSession != null) rn if (this.sshSession.isConnected()) rn this.sshSession.disconnect();rn System.out.println("sshSession is closed already");rn rnrn rnrn rnrn /**rn * 批量下载文件rn * rn * @param remotPathrn * 远程下载目录(以路径符号结束)rn * @param localPathrn * 本地保存目录(以路径符号结束)rn * @param fileFormatrn * 下载文件格式(以特定字符开头,为空不做检验)rn * @param delrn * 下载后是否删除sftp文件rn * @returnrn */rn public boolean batchDownLoadFile(String remotPath, String localPath,rn String fileFormat, boolean del) rn try rn connect();rn Vector v = listFiles(remotPath);rn if (v.size() > 0) rnrn Iterator it = v.iterator();rn while (it.hasNext()) rn LsEntry entry = (LsEntry) it.next();rn String filename = entry.getFilename();rn SftpATTRS attrs = entry.getAttrs();rn if (!attrs.isDir()) rn if (fileFormat != null && !"".equals(fileFormat.trim())) rn if (filename.startsWith(fileFormat)) rn if (this.downloadFile(remotPath, filename,rn localPath, filename)rn && del) rn deleteSFTP(remotPath, filename);rn rn rn else rn if (this.downloadFile(remotPath, filename,rn localPath, filename)rn && del) rn deleteSFTP(remotPath, filename);rn rn rn rn rn rn catch (SftpException e) rn e.printStackTrace();rn finally rn this.disconnect();rn rn return false;rn rnrn /**rn * 下载单个文件rn * rn * @param remotPathrn * 远程下载目录(以路径符号结束)rn * @param remoteFileNamern * 下载文件名rn * @param localPathrn * 本地保存目录(以路径符号结束)rn * @param localFileNamern * 保存文件名rn * @returnrn */rn public boolean downloadFile(String remotePath, String remoteFileName,rn String localPath, String localFileName) rn try rn sftp.cd(remotePath);rn File file = new File(localPath + localFileName);rn mkdirs(localPath + localFileName);rn sftp.get(remoteFileName, new FileOutputStream(file));rn return true;rn catch (FileNotFoundException e) rn e.printStackTrace();rn catch (SftpException e) rn e.printStackTrace();rn rnrn return false;rn rnrn /**rn * 上传单个文件rn * rn * @param remotePathrn * 远程保存目录rn * @param remoteFileNamern * 保存文件名rn * @param localPathrn * 本地上传目录(以路径符号结束)rn * @param localFileNamern * 上传的文件名rn * @returnrn */rn public boolean uploadFile(String remotePath, String remoteFileName,rn String localPath, String localFileName) rn FileInputStream in = null;rn try rn createDir(remotePath);rn File file = new File(localPath + localFileName);rn in = new FileInputStream(file);rn sftp.put(in, remoteFileName);rn return true;rn catch (FileNotFoundException e) rn e.printStackTrace();rn catch (SftpException e) rn e.printStackTrace();rn finally rn if (in != null) rn try rn in.close();rn catch (IOException e) rn e.printStackTrace();rn rn rn rn return false;rn rnrn /**rn * 批量上传文件rn * rn * @param remotePathrn * 远程保存目录rn * @param localPathrn * 本地上传目录(以路径符号结束)rn * @param delrn * 上传后是否删除本地文件rn * @returnrn */rn public boolean bacthUploadFile(String remotePath, String localPath,rn boolean del) rn try rn connect();rn File file = new File(localPath);rn File[] files = file.listFiles();rn for (int i = 0; i < files.length; i++) rn if (files[i].isFile()rn && files[i].getName().indexOf("bak") == -1) rn if (this.uploadFile(remotePath, files[i].getName(),rn localPath, files[i].getName())rn && del) rn deleteFile(localPath + files[i].getName());rnrn rn rn rn return true;rn catch (Exception e) rn e.printStackTrace();rn finally rn this.disconnect();rn rn return false;rnrn rnrn /**rn * 删除本地文件rn * rn * @param filePathrn * @returnrn */rn public boolean deleteFile(String filePath) rn File file = new File(filePath);rn if (!file.exists()) rn return false;rn rnrn if (!file.isFile()) rn return false;rn rnrn return file.delete();rn rnrn /**rn * 创建目录rn * rn * @param createpathrn * @returnrn */rn public boolean createDir(String createpath) rn try rn if (isDirExist(createpath)) rn this.sftp.cd(createpath);rn return true;rn rn String pathArry[] = createpath.split("/");rn StringBuffer filePath = new StringBuffer("/");rn for (String path : pathArry) rn if (path.equals("")) rn continue;rn rn filePath.append(path + "/");rn if (isDirExist(filePath.toString())) rn sftp.cd(filePath.toString());rn else rn // 建立目录rn sftp.mkdir(filePath.toString());rn // 进入并设置为当前目录rn sftp.cd(filePath.toString());rn rnrn rn this.sftp.cd(createpath);rn return true;rn catch (SftpException e) rn e.printStackTrace();rn rn return false;rn rnrn /**rn * 判断目录是否存在rn * rn * @param directoryrn * @returnrn */rn public boolean isDirExist(String directory) rn boolean isDirExistFlag = false;rn try rn SftpATTRS sftpATTRS = sftp.lstat(directory);rn isDirExistFlag = true;rn return sftpATTRS.isDir();rn catch (Exception e) rn if (e.getMessage().toLowerCase().equals("no such file")) rn isDirExistFlag = false;rn rn rn return isDirExistFlag;rn rnrn /**rn * 删除stfp文件rn * rn * @param directoryrn * 要删除文件所在目录rn * @param deleteFilern * 要删除的文件rn * @param sftprn */rn public void deleteSFTP(String directory, String deleteFile) rn try rn sftp.cd(directory);rn sftp.rm(deleteFile);rn catch (Exception e) rn e.printStackTrace();rn rn rnrn /**rn * 如果目录不存在就创建目录rn * rn * @param pathrn */rn public void mkdirs(String path) rn File f = new File(path);rnrn String fs = f.getParent();rnrn f = new File(fs);rnrn if (!f.exists()) rn f.mkdirs();rn rn rnrn /**rn * 列出目录下的文件rn * rn * @param directoryrn * 要列出的目录rn * @param sftprn * @returnrn * @throws SftpExceptionrn */rn public Vector listFiles(String directory) throws SftpException rn return sftp.ls(directory);rn rnrn public String getHost() rn return host;rn rnrn public void setHost(String host) rn this.host = host;rn rnrn public String getUsername() rn return username;rn rnrn public void setUsername(String username) rn this.username = username;rn rnrn public String getPassword() rn return password;rn rnrn public void setPassword(String password) rn this.password = password;rn rnrn public int getPort() rn return port;rn rnrn public void setPort(int port) rn this.port = port;rn rnrn public ChannelSftp getSftp() rn return sftp;rn rnrn public void setSftp(ChannelSftp sftp) rn this.sftp = sftp;rn rnrn public static void main(String[] args) rn SFTPTest ftp = new SFTPTest("127.0.0.1", "admin", "admin");rn String localPath = "D:\\sftp\\";rn String remotePath = "/home/itvsoap/file_interface/bill/lzj/test/";rnrn ftp.connect();rnrn ftp.uploadFile(remotePath, "test.txt", localPath, "test.txt");rn// ftp.bacthUploadFile(remotePath,localPath,true);rn// ftp.downloadFile(remotePath, "test.txt", localPath, "test.txt");rn// ftp.batchDownLoadFile(remotePath, localPath, null, true);rnrn ftp.disconnect();rn System.exit(0);rn rnrnrn[/code]
winform 部署好程序后,水晶报表报错:load report fail
如题
微信小程序 安卓报错 fail ssl hand shake error
在开发完微信小程序正式上线的时候,更改各种地址为线上地址后,android端打开调试工具发现报错fail ssl hand shake error,ios和微信开发者工具都没有问题。经查资料主要是后台服务器的证书问题。后台处理好证书就好了。...
关于Devstack部署问题汇总
一 每次开机,重新执行stack.sh问题关机后整个环境就没有了,所以需要重新去执行stack.sh。需要设置local.conf下面两个选项,这样部署比较快RECLONE=falseOFFLINE=true二 pip安装问题采用豆瓣源mkdir ~/.pip vim ~/.pip/pip.conf [global] Index-url=http://pypi.douban.com/simple如...
使用devstack部署多节点openstack
在使用openstack环境的过程中,时常会根据服务需求调整部署的服务。 这就涉及到添加新的节点到原有的openstack环境中。 大家知道devstack一般用来部署All-In-One的环境,其实devstack也能用来部署多节点环境。 通过local.conf文件的配置就能达到这一目的。 下面给出一个简单例子: [[local|localrc]] DATABASE_PA
使用devstack部署openstack及遇到问题
openfstack
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法