
CentOS 7 노드에 FreeIPA 서버를 설치하려고 합니다. 깨끗한 이미지로 시작하여 다음 코드를 실행합니다(관련되지 않은 일부 부분은 포함되지 않음).
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-server-install은 웹 API를 사용하려고 시도하는 부분까지 제대로 작동합니다. 이때 내부 서버 오류로 인해 실패하게 됩니다. /var/log/httpd/error_log의 로그를 살펴보면 다음 오류가 여러 번 복제된 것을 발견했습니다.
[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 API가 제대로 작동하려면 이 문제를 해결하려면 어떻게 해야 합니까?
편집: @abbra @michael-hampton의 제안에 따라 Python 문제에 대한 수정 사항을 되돌렸습니다. 내가 실행 중인 새로운 명령 세트와 httpd/error_log에 표시되는 오류 중 하나를 보려면 아래를 참조하세요. 다른 패키지도 누락된 것으로 보이지만 모두 비슷합니다.
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의 출력:
[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'
답변1
아마도 IUS 저장소가 활성화되어 있을 것입니다. 표준 CentOS 빌드를 재정의하고 확장하는 패키지를 제공합니다. 결과적으로 (이 특별한 경우) 시스템이 IPA 서버 패키지 요구 사항과 호환되지 않게 됩니다. python36u-mod_wsgi를 제거하면 원본(python2 기반)이 선택됩니다.
아무도 테스트하지 않았기 때문에 이 구성(CentOS + IUS 패키지)이 FreeIPA에서 전혀 작동할 것이라고 보장하지 않습니다.