본문 바로가기

Monitoring Tools/Pinpoint

pinpoint | 11. WEB - User Group 기능 추가

반응형
## Alarm 설정에 필요한 usergroup 은 초기 설치시 지원되지 않으며 추가 설치 및 설정이 필요.
## User Group은 pinpoint web login 권한 구성을 위한 user생성 등의 행위와는 상관이 없음.
## pinpoint에서는 기본적으로 웹 로그인을 위한 권한 구성을 제공하지 않으며 가이드 또한 제공하지 않음.
 
 
## 다음과 같은 에러가 발생
2020-06-18 14:50:57 [ERROR](c.n.p.w.c.UserGroupController      ) Exception occurred while trying to CRUD userGroup information
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure
 
 
 
 
 
## mysql 과의 연동이 필요하며 설치 과정은 생략
 
 
## jdbc default mysql port가 13306이므로 변경.
[root@localhost bin]# vim /etc/my.cnf
 
[mysqld]
port=13306
-- 중략 --
 
## mysql user, grant, database, 스키마 등 작업
[root@localhost bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.1.73 Source distribution
 
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> create database pinpoint;
mysql> GRANT USAGE ON *.* TO 'pinpoint'@'localhost' IDENTIFIED BY 'pinpoint1!';
mysql> flush privileges;
mysql> use pinpoint;
mysql> source /usr/local/pinpoint/tomcat9/webapps/ROOT/WEB-INF/classes/sql/CreateTableStatement-mysql.sql;
mysql> source /usr/local/pinpoint/tomcat9/webapps/ROOT/WEB-INF/classes/sql/SpringBatchJobRepositorySchema-mysql.sql;
mysql> GRANT ALL PRIVILEGES ON `pinpoint`.* TO 'pinpoint'@'localhost';
Query OK, 0 rows affected (0.00 sec)
 
mysql> show grants for pinpoint@localhost;
+-----------------------------------------------------------------------------------------------------------------+
| Grants for pinpoint@localhost                                                                                   |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'pinpoint'@'localhost' IDENTIFIED BY PASSWORD '*D0DAFC3A064D53E737886FB2054A4F9039DEBB8F' |
| GRANT ALL PRIVILEGES ON `pinpoint`.* TO 'pinpoint'@'localhost'                                                  |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
## mysql 재시작
[root@localhost sql]# /etc/init.d/mysqld restart
 
 
## jdbc 연동 설정
[root@localhost classes]# pwd
/usr/local/pinpoint/tomcat9/webapps/ROOT/WEB-INF/classes
[root@localhost classes]# vim jdbc.properties
 
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:13306/pinpoint?characterEncoding=UTF-8
jdbc.username=pinpoint
jdbc.password=pinpoint1!
 
## 톰캣 재시작
반응형