apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.32k stars 1.17k forks source link

[Question] Failed to load token from DB into cache #3220

Closed casionone closed 2 years ago

casionone commented 2 years ago
Scheduler-Thread-1       ] o.a.l.e.s.s.DefaultEngineConnResourceService (91) [apply] - Failed to upload engine conn to bml, now exit! org.apache.linkis.httpclient.exception.HttpClientRetryException: errCode: 10900 ,
desc: The user is not logged in, please log in first, you can set a retry, message: {"method":"/api/rest_j/v1/bml/upload","status":-1,"message":"Token Authentication Failed, token: BML-AUTH,tokenUser: root, reason: errCode: 15200 ,desc: Failed to load token from DB into cache! ,ip: iZbp19q51jbp984yk2jxdZ ,port: 9001 ,serviceKind: linkis-mg-gateway","data":{}} ,ip: iZbp19q51jb8p984yk2jxdZ ,port: 9103 ,serviceKind: linkis-cg-engineplugin

5b4e12e9a8819b99bdaf0e211ac1952

github-actions[bot] commented 2 years ago

:blush: Welcome to the Apache Linkis (incubating) community!! We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.

WeChat Group:

image Mailing Lists: name description Subscribe Unsubscribe archive
dev@linkis.apache.org community activity information subscribe unsubscribe archive
casionone commented 2 years ago

https://linkis.apache.org/zh-CN/docs/1.2.0/upgrade/upgrade-guide#41-token-%E9%85%8D%E7%BD%AE

1.1.1 版本调整将原来的TOKEN配置从${LINKIS_HOME}/conf/token.properties迁移到数据库表linkis_mg_gateway_auth_token, 对于原来在token.properties额外配置的TOKEN,需要手动迁移表中。

请尝试 初始化表 数据 linkis_mg_gateway_auth_token

-- ----------------------------
-- Table structure for linkis_mg_gateway_auth_token
-- ----------------------------
DROP TABLE IF EXISTS `linkis_mg_gateway_auth_token`;
CREATE TABLE `linkis_mg_gateway_auth_token` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `token_name` varchar(128) NOT NULL,
     `legal_users` text,
     `legal_hosts` text,
     `business_owner` varchar(32),
     `create_time` DATE DEFAULT NULL,
     `update_time` DATE DEFAULT NULL,
     `elapse_day` BIGINT DEFAULT NULL,
     `update_by` varchar(32),
PRIMARY KEY (`id`),
UNIQUE KEY `token_name` (`token_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Default Tokens
-- ----------------------------
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('QML-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('BML-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('WS-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('dss-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('QUALITIS-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('VALIDATOR-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('LINKISCLI-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('DSM-AUTH','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
INSERT INTO `linkis_mg_gateway_auth_token`(`token_name`,`legal_users`,`legal_hosts`,`business_owner`,`create_time`,`update_time`,`elapse_day`,`update_by`) VALUES ('LINKIS_CLI_TEST','*','*','BDP',curdate(),curdate(),-1,'LINKIS');
zhangxn8 commented 2 years ago

表格已经初始化新建,还是同样的问题 如下是linkis-cg-engineplugin.properties 配置

image

linkis-mg-gateway.properties

image

casionone commented 2 years ago

表格已经初始化新建,还是同样的问题 如下是linkis-cg-engineplugin.properties 配置

image

linkis-mg-gateway.properties

image

any exception log info in linkis-mg-gateway.log ?

zhangxn8 commented 2 years ago

表格已经初始化新建,还是同样的问题 如下是linkis-cg-engineplugin.properties 配置 image linkis-mg-gateway.properties image

any exception log info in linkis-mg-gateway.log ?

嗯 在其中找到了错误日志 缺少mysql的jar包 已经处理 谢谢

casionone commented 2 years ago

https://linkis.apache.org/zh-CN/docs/latest/deployment/quick-deploy#32-%E6%B7%BB%E5%8A%A0mysql%E9%A9%B1%E5%8A%A8%E5%8C%85

因为mysql-connector-java驱动是GPL2.0协议,不满足Apache开源协议关于license的政策,因此从1.0.3版本开始,
提供的Apache版本官方部署包,默认是没有mysql-connector-java-x.x.x.jar的依赖包
(若是通过集成的全家桶物料包安装,则无需手动添加),安装部署时需要自行添加依赖到对应的lib包中。
 可以在对应的目录下查看是否存在,如果不存在则需要添加