• EC2 이슈 환경
    • Hostname : A-BD-APIGW-WAS1, A-BD-APIGW-WAS2
    • IP : 10.151.142.142, 10.151.142.220
    • OS : Amazon LInux2 또는 Redhat Enterprise Linux 8


  • 이슈 현상 & 확인 방법
    • [webMethods API Gateway] 서버 기동 시 ElasticSearch 를 호출하지 못하고 elasticsearch failed to start at ... in 300 seconds 발생
    • [Developer Portal] ElasticSearch 를 Startup 해도 내부 Index가 생성 되어 있지 않는 현상 발생
      • curl -v http://localhost:9240/_cat/indices -> 정상 호출 (200 OK) 이지만 Response에서 인덱스 리스트가 호출되지 않고, content-length : 0
      • curl -v http://A-BD-APIGW-EC2-WAS1.ap-northeast-2.compute.internal:9240
        • curl :(6) Could not resolve host → 로컬 네임서버 /etc/hosts 파일과 DNS 서버 /etc/resolv.conf 파일이 제대로 설정 되어 있지 않아 호스트 명을 읽지 못함
      • {SAG_HOME}/profile/CTP/configuration/dpo_wrapper.conf 확인
        • wrapper.java.additional.2000 .... elasticsearch.rest.uris=http://A-BD-APIGW-EC2-WAS1.ap-northeast-2.compute.internal:9240


  • 이슈 발생 원인
    • SAG Installer로 설치할 때 Host name or IP Address 에서 입력한 호스트 명이 /etc/hosts (로컬 네임서버)설정 되어있지 않아 발생하는 문제
    • EC2 의 경우 호스트 명과 DNS에 등록 된 이름이 일치하지 않아 발생 (Route 53에 등록 된 도메인 네임이 EC2 로컬에서 호출이 안되서 생기는 문제인거 같은데 왜인지는... resolv.conf에 Route 53 주소가 등록 안되 있는건가..?)
      • [설치 시] Host name or IP Address : [A-BD-APIGW-EC2-WAS01.ap-northeast-2.compute.internal]
      • [설정 된] Hostname > hostname : A-BD-APIGW-WAS1
    • curl 명령을 이용해서 해당 호스트 명이 호출 되는지 확인 필요
      • 호출하는 포트는 방화벽이 모두 오픈 된 상태여야 함.


  • 이슈 해결 방법
    • [webMethods API Gateway] AutoStart (config.properties) 를 False로 변경
      • ({SAG_HOME}/IntegrationServer/instances/default/package/WmAPIGateway/config/resources/elasticsaerch 의 config.properties -> AutoStart : False로 변경 후 서버 재 시작
    • [Developer Portal]
      • 루트 권한이 있을 때 > /etc/hosts/ 로컬 네임서버 파일에 127.0.0.1 부분 끝에 A-BD-APIGW-EC2-WAS1.ap-northeast-2.compute.internal 추가 (해당 도메인 명은 localhost이니 로컬 네임서버에서 처리하도록 설정 -> 도메인 명이 바뀌면 또 다른 문제가 생길 수도)
      • 루트 권한이 없을 때 > 재 설치 -> 호스트 명은 hostname 명령을 쳐서 나온 호스트 명으로 설정




  • 추가 스터디 & 의문점 (AWS)
    • 해당 도메인 명이 어떻게 설정 된 것 인지 확인 필요. Route 53을 사용 한건지..?
    • Route 53 - EC2 연결 시 호스트 존 -> 레코드 세트 정의 -> 리소스 연결, 리소스 연결이 되었을 텐데 왜 해당 도메인 명으로 EC2 로컬에서 호출이 안되는지?
    • EC2에서 Route53 (DNS 서버) 주소를 수동으로 지정해 주어야 하는지?

    • EC2의 /etc/resolv.conf 파일
      • option timeout:2 attempts:5
      • search ap-northeast-2.compute.internal
      • nameserver 10.151.142.2
--> 확인 필요