分享

keystone-manage.py带来的问题,求解

aboutkeystone 发表于 2016-6-2 15:23:40 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 9244
我在ubuntu操作系统下安装了pycharm,有一个keystone K版的完整代码,(没有在操作系统中安装openstack的组件,只是源码)本来在pycharm里直接运行代码目录下的keystone-all.py脚本就可以把代码跑起来,跟安装了keystone模块的服务一样,但是今天手误执行了keystone-manage.py脚本,再执行keystone-all.py时便出现了如下错误:
/usr/bin/python2.7 /home/PycharmProjects/keystone-stable-kilo/bin/keystone-all
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 166, in format
    record.msg = six.text_type(record.msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 18: ordinal not in range(128)
Logged from file log.py, line 172
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/log.py", line 172, in logging_excepthook
    **extra)
  File "/usr/lib/python2.7/logging/__init__.py", line 1466, in critical
    self.logger.critical(msg, *args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1197, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1271, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1281, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1321, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 749, in handle
    self.emit(record)
  File "/usr/lib/python2.7/logging/handlers.py", line 842, in emit
    msg = self.format(record) + '\000'
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 50, in format
    msg = logging.handlers.SysLogHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 166, in format
    record.msg = six.text_type(record.msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 18: ordinal not in range(128)

Original exception was:
Traceback (most recent call last):
  File "/home/PycharmProjects/keystone-stable-kilo/bin/keystone-all", line 36, in <module>
    eventlet_server.run(possible_topdir)
  File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 156, in run
    serve(*servers)
  File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 88, in serve
    server.launch_with(launcher)
  File "/home/PycharmProjects/keystone-stable-kilo/keystone/server/eventlet.py", line 54, in launch_with
    self.server.listen()
  File "/home/PycharmProjects/keystone-stable-kilo/keystone/common/environment/eventlet_server.py", line 109, in listen
    backlog=backlog)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/convenience.py", line 43, in listen
    sock.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] 无法指定被请求的地址


很是费解,不知道该怎么解决

已有(4)人评论

跳转到指定楼层
easthome001 发表于 2016-6-2 16:44:18

是不是启动了服务,在启动就报错了。
可以终止这个服务,或则重启下,应该就可以了
回复

使用道具 举报

aboutkeystone 发表于 2016-6-2 17:15:35
easthome001 发表于 2016-6-2 16:44
是不是启动了服务,在启动就报错了。
可以终止这个服务,或则重启下,应该就可以了

应该没有,首先可以肯定没有重复执行代码,如果执行代码会开启服务的话,我用ps命令也没找到名字为keystone的进程

回复

使用道具 举报

easthome001 发表于 2016-6-2 17:57:47
aboutkeystone 发表于 2016-6-2 17:15
应该没有,首先可以肯定没有重复执行代码,如果执行代码会开启服务的话,我用ps命令也没找到名字为keysto ...

如果因为执行,而造成程序不可用,Python应该不会出现这种情况。
不一定都是keystone进程。
如果找不出就重启下电脑。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条