我正在尝试使用 Ubunutu 15.04 版本安装 OpenStack。我已经在一台 HP ProLiant 服务器上安装了服务器版本,该服务器有 4 个 CPU、2TB 磁盘阵列、20GB 内存,我认为安装起来很容易。
两天来我一直在尝试让 MAAS 工作,但始终无法让任何节点注册。我认为这是因为我的其他机器不支持局域网唤醒,但这可能是另一个问题。
因此,我继续在此服务器上仅安装 OpenStack。软件包安装顺利,但在运行安装脚本时失败并出现以下错误:
root@linux1:~# openstack-install
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 7: ordinal not in range(128)
Call stack:
File "/usr/bin/openstack-install", line 253, in <module>
install.start()
File "/usr/share/openstack/cloudinstall/install.py", line 152, in start
'Create a new Openstack Password', self._save_password)
File "/usr/share/openstack/cloudinstall/gui.py", line 673, in show_password_input
widget = PasswordInput(title, cb)
File "/usr/share/openstack/cloudinstall/ui/__init__.py", line 232, in __init__
self.show()
File "/usr/share/openstack/cloudinstall/ui/dialog.py", line 49, in show
w = self._build_widget()
File "/usr/share/openstack/cloudinstall/ui/dialog.py", line 93, in _build_widget
self.input_lbox))
Message: 'Num items: 2, items: <ListBox selectable box widget>'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 7: ordinal not in range(128)
Call stack:
File "/usr/share/openstack/cloudinstall/utils.py", line 63, in global_exchandler
log.debug("".join(tb_list))
Message: 'Traceback (most recent call last):\n File "/usr/bin/openstack-install", line 253, in <module>\n install.start()\n File "/usr/share/openstack/cloudinstall/install.py", line 154, in start\n self.loop.run()\n File "/usr/share/openstack/cloudinstall/ev.py", line 116, in run\n self.loop.run()\n File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 274, in run\n self.screen.run_wrapper(self._run)\n File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 268, in run_wrapper\n return fn()\n File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 314, in _run\n self.draw_screen()\n File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 566, in draw_screen\n self.screen.draw_screen(self.screen_size, canvas)\n File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 770, in draw_screen\n self._term_output_file.write(l)\nUnicodeEncodeError: \'ascii\' codec can\'t encode character \'\\u250c\' in position 0: ordinal not in range(128)\n'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 7: ordinal not in range(128)
Call stack:
File "/usr/share/openstack/cloudinstall/utils.py", line 91, in cleanup
log.info("Cleanup, saving latest config object.")
Message: 'Cleanup, saving latest config object.'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 7: ordinal not in range(128)
Call stack:
File "/usr/share/openstack/cloudinstall/utils.py", line 97, in cleanup
log.debug('Attempting to reset the terminal')
Message: 'Attempting to reset the terminal'
Arguments: ()
</code>
I thought this problem was cased by a bad locale, but I don't think this is the case:
<code>
root@linux1:~# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
我试图了解问题所在,但找不到任何原因。这是全新安装,所以我认为它不会出现问题。
任何人?
答案1
您设置的区域设置环境变量比实际需要的多。 是在未设置变量LANG
时的后备,并覆盖所有其他变量。LC*
LC_ALL
因此,就您而言,LC_ALL=C
是覆盖LANG=en_US.UTF-8
所有其他变量。安装程序需要 UTF-8。我实际上不确定LC_*
它使用哪些特定变量,可能是其中几个。
你应该可以通过只设置LANG=en_US.UTF-8
并确保所有其他设置都未设置来解决这个问题,或者通过设置LC_ALL=en_US.UTF-8
而其他设置无关紧要。如果你可以取消设置它们,那将有助于避免将来的混乱,但无论哪种方式都应该有效。