首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >FreeIPA服务器由于编码失败而无法安装

FreeIPA服务器由于编码失败而无法安装
EN

Server Fault用户
提问于 2019-07-25 19:36:41
回答 1查看 513关注 0票数 0

我试图在FreeIPA 7节点上安装CentOS服务器。从干净的图像开始,我运行以下代码(不包括一些不相关的部分):

代码语言:javascript
运行
复制
        echo 'LANG=en_US.utf-8' >> /etc/environment
        echo 'LC_ALL=en_US.utf-8' >> /etc/environment

        yum -y install epel-release npm wget net-tools patch sbt python36u python36u-devel krb5-devel
        yum -y install python36u-pip

        yum install -y ipa-server

        systemctl start named
        systemctl enable named

        ln -s /bin/pip3.6 /bin/pip
        pip install --upgrade pip
        pip install kdcproxy ipaplatform gssapi ipalib

        ipa-server-install -p directoryManagerAdmin -a kerberosAdmin --ip-address=$ipaddress -n test.hadoop.com -r TEST.HADOOP.COM --mkhomedir -U

ipa服务器安装工作正常,直到它开始尝试使用web的部分。此时,由于内部服务器错误,它失败了。查看/var/log/httpd/ error _log上的日志,我发现以下错误多次被复制。

代码语言:javascript
运行
复制
[Thu Jul 25 19:26:30.952879 2019] [wsgi:error] [pid 2934] mod_wsgi (pid=2934): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Thu Jul 25 19:26:30.952929 2019] [wsgi:error] [pid 2934] mod_wsgi (pid=2934): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Thu Jul 25 19:26:30.953372 2019] [wsgi:error] [pid 2934] Traceback (most recent call last):
[Thu Jul 25 19:26:30.953402 2019] [wsgi:error] [pid 2934]   File "/usr/share/ipa/wsgi.py", line 48, in <module>
[Thu Jul 25 19:26:30.953406 2019] [wsgi:error] [pid 2934]     api.bootstrap(context='server', confdir=paths.ETC_IPA, log=None)
[Thu Jul 25 19:26:30.953414 2019] [wsgi:error] [pid 2934]   File "/lib/python3.6/site-packages/ipalib/plugable.py", line 494, in bootstrap
[Thu Jul 25 19:26:30.953417 2019] [wsgi:error] [pid 2934]     raise errors.SystemEncodingError(encoding=fse)
[Thu Jul 25 19:26:30.953432 2019] [wsgi:error] [pid 2934] ipalib.errors.SystemEncodingError: System encoding must be UTF-8, 'ascii' is not supported. Set LC_ALL="C.UTF-8", or LC_ALL="" and LC_CTYPE="C.UTF-8".

我尝试过设置LC_ALL和LANG (如脚本中所示),但它仍然出现。为了使服务器的web能够正常工作,我需要做些什么来修复这个问题?

编辑:根据@abbra @michael-hampton的建议,我重新修复了Python问题。有关我正在运行的新命令集,请参阅下面的内容,以及我在httpd/error_log中看到的错误之一。请注意,我看到其他包也丢失了,但它们都是相似的。

代码语言:javascript
运行
复制
        yum -y install epel-release npm wget net-tools patch sbt krb5-devel

        yum install -y ipa-server

        systemctl start named
        systemctl enable named

输出在/var/log/httpd/error_log中:

代码语言:javascript
运行
复制
[Fri Jul 26 14:20:03.334411 2019] [wsgi:error] [pid 2894] mod_wsgi (pid=2894): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Fri Jul 26 14:20:03.334456 2019] [wsgi:error] [pid 2894] mod_wsgi (pid=2894): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Fri Jul 26 14:20:03.334675 2019] [wsgi:error] [pid 2894] Traceback (most recent call last):
[Fri Jul 26 14:20:03.334697 2019] [wsgi:error] [pid 2894]   File "/usr/share/ipa/wsgi.py", line 43, in <module>
[Fri Jul 26 14:20:03.334701 2019] [wsgi:error] [pid 2894]     from ipaplatform.paths import paths
[Fri Jul 26 14:20:03.334716 2019] [wsgi:error] [pid 2894] ModuleNotFoundError: No module named 'ipaplatform'
EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-07-30 15:33:19

您可能启用了IUS存储库。它们提供了覆盖和扩展标准CentOS构建的包。因此,它们使您的系统(在这种情况下)与IPA服务器包的要求不兼容。如果您要删除python36u-mod_wsgi,将找到一个原始的(基于python2 2的)。

我不保证这个配置(CentOS + IUS包)将完全适用于FreeIPA,因为没有人对它进行测试。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/976741

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档