반응형
* agent 설치는 수집하고자 하는 client에 설치 하지만 여기 설명은 pinpoint 가 설치된 서버에 설치를 진행함
1. 압축 해제
## 압축 해제
[root@localhost src]# tar zxvf pinpoint-agent-2.0.2.tar.gz
2. 위치 이동
## 원하는 위치에 이동
## 여기서는 pinpoint/ 로 이동하며 pinpoint가 올라간 tomcat에 적용함.
[root@localhost src]# mv /usr/local/src/pinpoint-agent-2.0.2 /usr/local/pinpoint/pinpoint-agent
3. 로깅 설정
# 로깅 설정
[root@localhost pinpoint-agent]# vi /usr/local/pinpoint/pinpoint-agent/lib/log4j.xml
4. collector ip 수정
## collector 주소 및 각종 설정
## 여기서는 collector이 localhost 이므로 수정 안함.
[root@localhost pinpoint-agent]# vi /usr/local/pinpoint/pinpoint-agent/pinpoint.config
-- 중략 --
###########################################################
# gRPC Configuration #
###########################################################
profiler.transport.grpc.collector.ip=127.0.0.1
-- 중략 --
5. 시작 변수 등록
## pinpoint tomcat에 적용
## APPLICATION_NAME : tomcat의 물리서버 호스트
## AGENT_ID : 호스트 각각의 tomcat
[root@localhost bin]# pwd
/usr/local/pinpoint/tomcat9/bin
[root@localhost bin]# cat setenv.sh
#!/bin/sh
JAVA_HOME=/usr/local/java
AGENT_PATH=/usr/local/pinpoint/pinpoint-agent
AGENT_ID="pinpoint"
APPLICATION_NAME="pinpoint-host"
VERSION="2.0.2"
CATALINA_OPTS="$CATALINA_OPTS -javaagent:${AGENT_PATH}/pinpoint-bootstrap-${VERSION}.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=${AGENT_ID}"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=${APPLICATION_NAME}"
6. tomcat 재기동 및 오류 수정
## 톰캣 재기동
## collector, agrnt, web이 하나의 톰캣에 올라가므로 다음과 같은 오류가 발생할 수 있음.
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.Status.asRuntimeException(Status.java:526)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:420)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9991
## 오류 수정
## 다음과 같은 오류시
2020-06-18 11:54:07 [WARN ](c.n.p.p.i.f.GuardExceptionHandler ) Exception occurred from interceptor
java.lang.LinkageError: loader constraint violation: when resolving interface method "com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder.recordServiceType(Lcom/navercorp/pinpoint/common/trace/ServiceType;)V" the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) of the current class, com/navercorp/pinpoint/plugin/spring/beans/interceptor/BeanMethodInterceptor, and the class loader (instance of <bootloader>) for the method's defining class, com/navercorp/pinpoint/bootstrap/context/SpanEventRecorder, have different Class objects for the type com/navercorp/pinpoint/common/trace/ServiceType used in the signature
## 다음과 같이 수정 후 재기동
$TOMCAT_HOME/conf/context.xml
<Context>
<Loader delegate="true"/>
</Context>
반응형
'Monitoring Tools > Pinpoint' 카테고리의 다른 글
10. [오류 수정] hbase Session expire로 shutdown 되는 현상 (0) | 2021.03.17 |
---|---|
pinpoint | 9. [오류 수정] WEB - Agent Management - Agent 삭제시 (0) | 2021.03.17 |
7. [pinpoint 설치] collector 설치 (0) | 2021.03.17 |
6. [pinpoint 설치] web 설치 (0) | 2021.03.17 |
5. [pinpoint 설치] hbase 스키마 생성 (0) | 2021.03.17 |