트러블 슈팅
설치시 “ImportError: No module named simplejson” 오류 발생
khan-provisioning>action --package JBossEWS --command setup --user root --component all
SSH password:
PLAY [all] ****************************************************************************************************************
GATHERING FACTS *********************************************************************************************************
failed: [192.168.0.28] => \{"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-1376139324.12-204669473616/setup", line 86, in ?
import simplejson as json
ImportError: No module named simplejson
대상 시스템에 필요한 python-simplejson 패키지가 설치되어야 한다.
sudo yum install python-simplejson
mod_cluster로 JBoss EAP가 연결되지 않습니다.
mod_cluster_manager 페이지에서 JBoss EAP 인스턴스 정보가 출력되지 않는다.
먼저 각 서버의 /etc/hosts 파일을 살펴보자. JBoss EAP가 설치된 머신과 JBoss EWS가 설치된 머신의 호스트의 호스트명, IP가 모두 /etc/hosts 파일에 있 어야 한다.
만약 없다면, SystemHosts 패키지를 설치하여 모든 대상 머신의 /etc/hosts 파일을 Update 할 수 있다.
action --package SystemHosts --command setup --user root --component all
pem파일을 사용하여 호스트에 접근할 때 설정방법
pem 파일을 사용하여 호스트에 접근할 때, ssh-agent와 ssh-add 명령으로 OPENMARU Installer을 실행하기 전에 pem 파일을 설정해 놓을 수 있다. 아래와 같은 명령을 이용하면 된다.
ssh-agent bash
ssh-add ~/.ssh/id_rsa
또 다른 방법으로는 hosts-jboss나 hosts-apache 설정파일에 호스트에 접근할 때 사용하는 pem 파일을 설정해 놓을 수 있다. ansible_ssh_private_key_file에 key.pem 파일의 경로를 지정하면 된다. pem 파일을 이용하여 접근하는 호스트는 모두 지정하여야 한다.
/opt/khan/provisioning/cli/hosts-jboss파일의 예
[jboss-eap]
# ========================================================
# 첫번째 서버에 is_eap_first_server=true 를 적어줍니다.
# ========================================================
# pem 파일을 이용하여 서버에 접근할 때의 Example
192.168.0.21 machine_id=1 is_eap_first_server=true ansible_ssh_private_key_file=/dir/of/keyfile.pem
192.168.0.22 machine_id=2 ansible_ssh_private_key_file=/dir/of/keyfile.pem
192.168.0.23 machine_id=3 ansible_ssh_private_key_file=/dir/of/keyfile.pem
… 생략 …
[jboss-ews]
# ========================================================
# EWS가 설치될 서버 IP 목록
# 첫번째 서버에 is_ews_first_server=true 를 적어줍니다.
# --------------------------------------------------------
# pem 파일을 이용하여 서버에 접근할 때의 Example
192.168.0.11 machine_id=1 is_ews_first_server=true ansible_ssh_private_key_file=/dir/of/keyfile.pem
192.168.0.12 machine_id=2 **ansible_ssh_private_key_file=/dir/of/keyfile.pem**
192.168.0.13 machine_id=3 **ansible_ssh_private_key_file=/dir/of/keyfile.pem**