사용자정의 모니터링 스크립트 (execute.py) 실행실패

1. Environment

MDRM 4.x

2. Symptoms

해당 에이전트 서버에 직접 접속하여, 모니터링 스크립트 실행시 정상 수행 됨.
관제서버에서 모니터링 스크립트 (execute.py)를 통해 실행시 아래 오류 메세지가 출력되며, 실행 실패
sh -x M0027_CJONE_monitor.sh
+ CMD=/gampkgs/data/plugins/command
+ PASS=password
+ HOST=52.3.83.85
+ /gampkgs/data/plugins/command/execute.py -H 52.3.83.85 -p password -c /opt/gam_agent/script/check/001_CheckSM.sh
Traceback (most recent call last):
File “/gampkgs/data/plugins/command/execute.py”, line 36, in <module>
result=execute(param)
File “/gampkgs/data/plugins/command/execute.py”, line 22, in execute
response=urllib2.urlopen(request)
File “/usr/lib/python2.7/urllib2.py”, line 127, in urlopen
return _opener.open(url, data, timeout)
File “/usr/lib/python2.7/urllib2.py”, line 410, in open
response = meth(req, response)
File “/usr/lib/python2.7/urllib2.py”, line 523, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/lib/python2.7/urllib2.py”, line 448, in error
return self._call_chain(*args)
File “/usr/lib/python2.7/urllib2.py”, line 382, in _call_chain
result = func(*args)
File “/usr/lib/python2.7/urllib2.py”, line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 417: Expectation Failed
+ sleep 2
+ /gampkgs/data/plugins/command/result.py -H 52.3.83.85 -p password -c cat /opt/gam_agent/script/check/001_CheckSM.log
Traceback (most recent call last):
File “/gampkgs/data/plugins/command/result.py”, line 36, in <module>
result=execute(param)
File “/gampkgs/data/plugins/command/result.py”, line 22, in execute
response=urllib2.urlopen(request)
File “/usr/lib/python2.7/urllib2.py”, line 127, in urlopen
return _opener.open(url, data, timeout)
File “/usr/lib/python2.7/urllib2.py”, line 410, in open
response = meth(req, response)
File “/usr/lib/python2.7/urllib2.py”, line 523, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/lib/python2.7/urllib2.py”, line 448, in error
return self._call_chain(*args)
File “/usr/lib/python2.7/urllib2.py”, line 382, in _call_chain
result = func(*args)
File “/usr/lib/python2.7/urllib2.py”, line 531, in http_error_default

3. Cause

자동화노드의 application.properties에 debug.mode가 false로 설정되어, password를 통한 접속 불가.

4. Solution

관제서버에서 에이전트로 접속 테스트 (curl -k https://%에이전트주소%:20080/bout/get_about_info) 확인
자동화노드의 application.properties에 debug.mode를 true로 설정