You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/08/12 08:55:10 UTC

[GitHub] [incubator-linkis] super3one opened a new issue, #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

super3one opened a new issue, #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733

   ### Before asking
   
   - [X] I have read the [How to ask for help](https://linkis.apache.org/community/how-to-ask-for-help) (我已阅读[如何寻求帮助](https://linkis.apache.org/zh-CN/community/how-to-ask-for-help)指引文档).
   
   
   ### Your environment
   
   <!-- Please describe the linkis version you are using and basic environment information -->
   <!-- 请描述您使用的linkis版本和基本环境信息 -->
   - Linkis version used: 1.1.1
   - Environment name and version
       - hdp-3.1.1
       - hive-3.1.1
       - spark-3.2.1
       - scala-2.12.2
       - jdk 1.8.0_121
   
   
   
   ### Describe your questions
   
   <!-- Please describe your questions -->
   <!-- 请描述您的问题 -->
   
   When I use qualitis to connection linkis with linkis_host : linkis_gateway_port to get the data source information, I got an error reported in qualitis.log like:
   
   `ERROR [qtp592858578-612] handler.RestErrorHandler handleError: Client Error! response: status code: 401, status text: Unauthorized, header: {transfer-encoding=[chunked], Access-Control-Allow-Origin=[*], Access-Control-Allow-Credentials=[true], Access-Control-Allow-Headers=[authorization,Content-Type], Access-Control-Allow-Methods=[POST, GET, OPTIONS, PUT, HEAD, DELETE], Date=[Friday, August 12, 2022 4:19:27 PM CST], Content-Type=[application/json;charset=UTF-8]}, body: {"method":"/api/rest_j/v1/data-source-manager/info","status":-1,"message":"Token Authentication Failed, token: QUALITIS-AUTH,tokenUser: hadoop, reason: errCode: 15200 ,desc: Failed to load token from DB into cache! ,ip: node1 ,port: 9002 ,serviceKind: linkis-mg-gateway","data":{}}, charset: UTF-8`
   
   But I've already configured in the token.properties file in linkis like:
   `QUALITIS-AUTH=*`
   
   what does the error code 15200 means? and how can I fix this problem?
   
   ### Eureka service list
   
   <!-- You can directly copy and paste the screenshot of the list of registered service instances displayed on the Eureka page here -->
   <!--  可以将Eureka页面显示的注册服务实例列表的的截图 直接复制并粘贴到这里。 粘贴后,会自动生成如下格式的url-->
   
   Instances currently registered with Eureka
   Application	AMIs	Availability Zones	Status
   LINKIS-CG-ENTRANCE	n/a (1)	(1)	UP (1) - node1:linkis-cg-entrance:9104
   LINKIS-CG-LINKISMANAGER	n/a (1)	(1)	UP (1) - node1:linkis-cg-linkismanager:9101
   LINKIS-MG-EUREKA	n/a (1)	(1)	UP (1) - node1:linkis-mg-eureka:20303
   LINKIS-MG-GATEWAY	n/a (1)	(1)	UP (1) - node1:linkis-mg-gateway:9002
   LINKIS-PS-DATA-SOURCE-MANAGER	n/a (1)	(1)	UP (1) - node1:linkis-ps-data-source-manager:9109
   LINKIS-PS-METADATAMANAGER	n/a (1)	(1)	UP (1) - node1:linkis-ps-metadatamanager:9110
   LINKIS-PS-PUBLICSERVICE	n/a (1)	(1)	UP (1) - node1:linkis-ps-publicservice:9105
   
   
   ### Some logs info or acctch file
   
   <!-- Please add the log in the following format, the key error log must be pasted in the code style, and the text as much as possible, the detailed log or other files can be dragged and uploaded as an attachment -->
   <!-- 请按如下格式 添加日志,关键错误日志请贴到[````log][````]之间,尽可能贴文字,详细日志或则其它文件,可以拖拽上传作为附件 -->
   
   qualitis.log:
   ````log
   
   2022-08-12 16:19:33,697 ERROR [qtp592858578-612] handler.RestErrorHandler handleError: Client Error! response: status code: 401, status text: Unauthorized, header: {transfer-encoding=[chunked], Access-Control-Allow-Origin=[*], Access-Control-Allow-Credentials=[true], Access-Control-Allow-Headers=[authorization,Content-Type], Access-Control-Allow-Methods=[POST, GET, OPTIONS, PUT, HEAD, DELETE], Date=[Friday, August 12, 2022 4:19:27 PM CST], Content-Type=[application/json;charset=UTF-8]}, body: {"method":"/api/rest_j/v1/data-source-manager/info","status":-1,"message":"Token Authentication Failed, token: QUALITIS-AUTH,tokenUser: hadoop, reason: errCode: 15200 ,desc: Failed to load token from DB into cache! ,ip: node1 ,port: 9002 ,serviceKind: linkis-mg-gateway","data":{}}, charset: UTF-8
   2022-08-12 16:19:33,697 ERROR [qtp592858578-612] controller.MetaDataController getDataSourceInfoPage: I/O error on GET request for "http://10.58.14.105:9002/api/rest_j/v1/data-source-manager/info": 401 Unauthorized; nested exception is com.webank.wedatasphere.qualitis.exception.HttpRestTemplateException: 401 Unauthorized
   org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://10.58.14.105:9002/api/rest_j/v1/data-source-manager/info": 401 Unauthorized; nested exception is com.webank.wedatasphere.qualitis.exception.HttpRestTemplateException: 401 Unauthorized
           at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:742) ~[spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE]
           at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:668) ~[spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE]
           at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:577) ~[spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE]
           at com.webank.wedatasphere.qualitis.client.impl.MetaDataClientImpl.getDataSourceInfoPage(MetaDataClientImpl.java:642) ~[core_meta_data-0.9.0.jar:?]
           at com.webank.wedatasphere.qualitis.service.impl.MetaDataServiceImpl.getDataSourceInfoPage(MetaDataServiceImpl.java:374) ~[web_meta_data-0.9.0.jar:?]
           at com.webank.wedatasphere.qualitis.service.impl.MetaDataServiceImpl$$FastClassBySpringCGLIB$$f1a47669.invoke(<generated>) ~[web_meta_data-0.9.0.jar:?]
           at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.18.RELEASE.jar:5.1.18.RELEASE]
           at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687) ~[spring-aop-5.1.18.RELEASE.jar:5.1.18.RELEASE]
           at com.webank.wedatasphere.qualitis.service.impl.MetaDataServiceImpl$$EnhancerBySpringCGLIB$$9e7ba7ca.getDataSourceInfoPage(<generated>) ~[web_meta_data-0.9.0.jar:?]
           at com.webank.wedatasphere.qualitis.controller.MetaDataController.getDataSourceInfoPage(MetaDataController.java:244) ~[web_meta_data-0.9.0.jar:?]
           at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source) ~[?:?]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282]
           at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282]
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] super3one commented on issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
super3one commented on issue #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733#issuecomment-1212930135

   > please make sure you have init you token table https://linkis.apache.org/zh-CN/docs/1.1.3/upgrade/upgrade-guide#41-token-%E9%85%8D%E7%BD%AE the token sql file can be found in https://github.com/apache/incubator-linkis/tree/master/linkis-dist/package/db
   
   Yes. I can see the record with token_name=QUALITIS-AUTH has been added to table **linkis_mg_gateway_auth_token**.
   ```
   id	token_name	legal_users	legal_hosts	business_owner	create_time	update_time	elapse_day	update_by
   5	QUALITIS-AUTH	*	*	BDP	2022-08-12	2022-08-12	-1	LINKIS
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] github-actions[bot] commented on issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733#issuecomment-1212885050

   :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](https://linkis.apache.org/community/how-to-contribute).
    
   WeChat  Group:
   
   ![image](https://user-images.githubusercontent.com/7869972/176336986-d6b9be8f-d1d3-45f1-aa45-8e6adf5dd244.png)
   Mailing Lists:
   |name|description|Subscribe|Unsubscribe|archive|
   |:-----|:--------|:------|:-------|:-----|
   | [dev@linkis.apache.org](mailto:dev@linkis.apache.org) | community activity information | [subscribe](mailto:dev-subscribe@linkis.apache.org) | [unsubscribe](mailto:dev-unsubscribe@linkis.apache.org) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] casionone commented on issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
casionone commented on issue #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733#issuecomment-1212944336

   > > please make sure you have init you token table https://linkis.apache.org/zh-CN/docs/1.1.3/upgrade/upgrade-guide#41-token-%E9%85%8D%E7%BD%AE the token sql file can be found in https://github.com/apache/incubator-linkis/tree/master/linkis-dist/package/db
   > 
   > Yes. I can see the record with token_name=QUALITIS-AUTH has been added to table **linkis_mg_gateway_auth_token**.
   > 
   > ```
   > id	token_name	legal_users	legal_hosts	business_owner	create_time	update_time	elapse_day	update_by
   > 5	QUALITIS-AUTH	*	*	BDP	2022-08-12	2022-08-12	-1	LINKIS
   > ```
   > 
   > But it doesn't help... the error still exists.
   
   try to restart linkis-mg-gateway service  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] casionone commented on issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
casionone commented on issue #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733#issuecomment-1212924611

   please make sure you have init you token table 
   https://linkis.apache.org/zh-CN/docs/1.1.3/upgrade/upgrade-guide#41-token-%E9%85%8D%E7%BD%AE 
   the token sql file can be found in   https://github.com/apache/incubator-linkis/tree/master/linkis-dist/package/db
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] super3one commented on issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
super3one commented on issue #2733:
URL: https://github.com/apache/incubator-linkis/issues/2733#issuecomment-1214380816

   > > > please make sure you have init you token table https://linkis.apache.org/zh-CN/docs/1.1.3/upgrade/upgrade-guide#41-token-%E9%85%8D%E7%BD%AE the token sql file can be found in https://github.com/apache/incubator-linkis/tree/master/linkis-dist/package/db
   > > 
   > > 
   > > Yes. I can see the record with token_name=QUALITIS-AUTH has been added to table **linkis_mg_gateway_auth_token**.
   > > ```
   > > id	token_name	legal_users	legal_hosts	business_owner	create_time	update_time	elapse_day	update_by
   > > 5	QUALITIS-AUTH	*	*	BDP	2022-08-12	2022-08-12	-1	LINKIS
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > But it doesn't help... the error still exists.
   > 
   > try to restart linkis-mg-gateway service
   
   I tried several times, but still got the same error
   Is that the error of "Fail to load token from DB into cache" resulted from wrong setting of database?
   I got an error of initing db when the first time I installed Linkis, then I passes this through source every sql file manually. Is this matters?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] super3one closed issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error

Posted by GitBox <gi...@apache.org>.
super3one closed issue #2733: [Question] api/rest_j/v1/data-source-manager/ report an authentication error
URL: https://github.com/apache/incubator-linkis/issues/2733


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org