본문 바로가기

카테고리 없음

JDK 1.7 로컬 서비스, Scouter로 모니터링 하기 (진행중)

Scouter

Scouter는 서비스 모니터링 툴이고, 아래 네 가지로 구성되어 있다.

 Scouter Server(Collector) - server

 Scouter Host Agent - agent.host

 Scouter Tomcat(Java) Agent - agnet.java

 Scouter Client - client

 

각각의 역할이 다르고, JDK 최소 요구버전도 다르다. (Scouter 버전마다도 차이가 있다. 뒤에서 설명.)

따라서 내 Scouter 서버, 프로젝트 서버, 클라이언트 서버 모두의 JDK 버전을 잘 파악해, 해당하는 Scouter를 설치해야 한다.

로컬의 경우에는 나뉘어있지 않으니까 JDK를 만족시키는 Scouter를.. 잘.. 설치하면 되겠지?

 

 

설치방법

설치 방법은 기본적으로 아래 블로그를 따라해서 하면 된다.

더 자세히 설명되어 있으니 나는 설명 패스.

https://shallow-learning.tistory.com/entry/Scouter-%EC%98%A4%ED%94%88%EC%86%8C%EC%8A%A4-APM%EC%9C%BC%EB%A1%9C-%EC%9B%B9%EC%96%B4%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98-%EC%84%B1%EB%8A%A5-%EB%AA%A8%EB%8B%88%ED%84%B0%EB%A7%81-%ED%95%98%EA%B8%B0-%EB%AC%B4%EB%A3%8C

 

Scouter 오픈소스 APM으로 웹어플리케이션 성능 모니터링 하기 (무료)

Scouter는 APM (Application Performance Management)프로그램으로 오픈소스 입니다. 간단하게 웹어플리케이션의 성능을 관리하고 실시간 모니터링 할 수 있는 프로그램입니다. 기본적으로 CPU 상태, Heap 메모

shallow-learning.tistory.com

 

설치버전

설치 버전은 정말 정말 중요하다. 각자의 서비스 JDK 사양에 맞춰서 설치하길.. 아니면 삽질하게 된다.

 

- Server : v2.15 https://github.com/scouter-project/scouter/releases/tag/v2.15.0

 

- Client : v2.15 https://github.com/scouter-project/scouter/releases/tag/v2.15.0

 

- Agent.host, Agent.java : v1.7.3.1 https://github.com/scouter-project/scouter/releases/tag/v1.7.3.1

 

 

 

 

트러블슈팅

#1 scouter 버전 별 최소 요구 JDK 이슈

내가 모니터링하고 싶은 서비스는 JDK 1.7이다.

각 에이전트마다 JDK 최소 요구버전이 아래와 같다는 글을 보고 오 괜찮겠네 하고 설치를 했다. (아니었다. 정확한 정보가 아니니 취소선..)

■ Scouter Server(Collector) JDK 버전 : 1.8 이상

■ Scouter Host Agent JDK 버전 : 1.6 이상

■ Scouter Tomcat(Java) Agent JDK 버전 : 1.6이상

■ Scouter Client JDK 버전 : 1.8 이상

 

에러가 났다. 버전 이슈라고 한다.

에러메시지

https://needneo.tistory.com/3

 

Unsupported major.minor version 52.0

Exception in thread "main" java.lang.UnsupportedClassVersionError : xxxxxxxx : Unsupported major.minor version 52.0 위와 같은 에러가 발생하였을 때는 자바 버전이 맞지 않는(낮은 버전에서 높은 버전을 실행할 경우) 경우

needneo.tistory.com

 

 

 

이미 환경변수가 JDK 1.8이지만 startcon.bat에 일부러 JDK 환경변수 설정을 잡아줬는데도 같은 에러가 났다.

그 이유는 위에 언급한 에이전트 별 JDK 최소 요구버전이 옛날 정보였다는 점 .. 이래서 document가 중요한가보다.

나는 가장 최신 scouter 버전인 2.20.0을 다운로드 받았는데, 최신 버전의 JDK 최소 요구버전이 높아졌다.

scouter v2.20.0 agent.java의 최고 요구 JDK가 8로 변경되었다.

 

항상 document를 잘 읽고 버전 이슈를 고려하면서 작업하자.

 

 

#2 sigar-amd64-winnt.dll+0x14ed4 프레임 이슈

Server를 잘 작동시키고, agent.host를 작동시키려고 하는데 아래와 같이 에러가 발생했다.

D:\scouter-all\scouter-1.7.3.1\agent.host>host.bat

D:\scouter-all\scouter-1.7.3.1\agent.host>java -classpath ./scouter.host.jar   scouter.boot.Boot ./lib
  ____                  _
 / ___|  ___ ___  _   _| |_ ___ _ __
 \___ \ / __/   \| | | | __/ _ \ '__|
  ___) | (_| (+) | |_| | ||  __/ |
 |____/ \___\___/ \__,_|\__\___|_|
 Open Source S/W Performance Monitoring
 Scouter version 1.7.3.1

Configure -Dscouter.config=.\conf\scouter.conf
Scouter Host Agent Version 1.7.3.1 2017-08-21 11:58 GMT
System JRE version : 1.8.0_401
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=8940, tid=0x000000000000468c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_401) (build 1.8.0_401-b10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.401-b10 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [sigar-amd64-winnt.dll+0x14ed4]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\scouter-all\scouter-1.7.3.1\agent.host\hs_err_pid8940.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

 

https://github.com/scouter-project/scouter/issues/884

 

agent.host 실행 오류 · Issue #884 · scouter-project/scouter

C:\scouter\agent.host>host.bat C:\scouter\agent.host>java -classpath ./scouter.host.jar scouter.boot.Boot ./lib / | ___ ___ _ | | ___ _ __ _ \ / __/ | | | | / _ \ '| ) | (| (+) | || | || __/ | |/ _...

github.com