본문 바로가기

Monitoring Tools/Pinpoint

7. [pinpoint 설치] collector 설치

반응형

1. 압축 해제

## 설치
[root@localhost webapps]# mkdir pinpoint-collector
[root@localhost webapps]# cd pinpoint-collector/
[root@localhost pinpoint-collector]# cp -arf /usr/local/src/pinpoint-collector-2.0.2.war .
[root@localhost pinpoint-collector]# jar xvf pinpoint-collector-2.0.2.war
 
[root@localhost pinpoint-collector]# rm -rf pinpoint-collector-2.0.2.war

 

2. 설정

# 설정 디렉토리 이동
[root@localhost pinpoint-collector]# cd WEB-INF/classes
 
# hbase 주소 및 포트 수정(필요시)
[root@localhost classes]# vi hbase.properties
# hbase.client.host=localhost
# hbase.client.port=2181

 
# pinpoint web 설정 수정(필요시)
[root@localhost classes]# vi pinpoint-collector.properties
# collector.receiver.base.ip=0.0.0.0
## agent가 바로보는 collector port
# collector.receiver.base.port=9994
# collector.receiver.stat.udp.ip=0.0.0.0
# collector.receiver.stat.udp.port=9995
# collector.receiver.span.udp.ip=0.0.0.0
# collector.receiver.span.udp.port=9996

 
 
## web 설치때와 같이 다음과 같이 수정 
[root@localhost release]# pwd
/usr/local/pinpoint/tomcat9/webapps/pinpoint-collector/WEB-INF/classes/profiles/release
[root@localhost release]# vim pinpoint-collector-env.properties
 
#pinpoint.zookeeper.address={YOUR_RELEASE_ZOOKEEPER_ADDRESS}
pinpoint.zookeeper.address=127.0.0.1

 

3. tomcat 재기동

# tomcat 재기동
[root@localhost bin]# ./shutdown.sh
[root@localhost bin]# ./startup.sh

 

4. 오류 수정


## exception 발생
[root@localhost logs]# pwd
/usr/local/pinpoint/tomcat9/logs
[root@localhost logs]# vim localhost.2020-06-17.log
17-Jun-2020 15:02:51.710 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.util.Log4jConfigListener]
        java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.ROOT' = [/usr/local/pinpoint/tomcat9/webapps/ROOT/] instead of [/usr/local/pinpoint/tomcat9/webapps/pinpoint-collector/] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
                at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:163)
                at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:119)
                at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:49)
                at org.apache.catalina.core.StandardContext
-- 중략 --
 
 
## 다음과 같이 수정 or 추가
## pinpoint-collector 대신 유니크한 이름을 정해도 됨. webapps/ROOT 와 겹치지만 않으면 됨 deault webapp.root
[root@localhost WEB-INF]# pwd
/usr/local/pinpoint/tomcat9/webapps/pinpoint-collector/WEB-INF
[root@localhost WEB-INF]# vim web.xml
-- 중략 --
    <context-param>
        <param-name>webAppRootKey</param-name>
        <param-value>pinpoint-collector.root</param-value>
    </context-param>

 

반응형