You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/26 06:25:12 UTC

[GitHub] [pulsar-manager] lvs071103 opened a new issue #311: pulsar-manager generate token report error: Token generate failed

lvs071103 opened a new issue #311:
URL: https://github.com/apache/pulsar-manager/issues/311


   ![image](https://user-images.githubusercontent.com/5029708/85827345-ab0f6600-b7b8-11ea-9254-a70c186d0634.png)
   
   logs:
   
   ```
   2020-06-26 06:17:37.746 DEBUG 47 --- [http-nio-7750-Acceptor-0] o.apache.tomcat.util.threads.LimitLatch  : Counting up[http-nio-7750-Acceptor-0] latch=1
   2020-06-26 06:17:37.746 DEBUG 47 --- [http-nio-7750-exec-2] o.a.tomcat.util.net.SocketWrapperBase    : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@31e6a7be:org.apache.tomcat.util.net.NioChannel@65bf90c4:java.nio.channels.SocketChannel[connected local=/127.0.0.1:7750 remote=/127.0.0.1:47070]], Read from buffer: [0]
   2020-06-26 06:17:37.746 DEBUG 47 --- [http-nio-7750-exec-2] org.apache.tomcat.util.net.NioEndpoint   : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@31e6a7be:org.apache.tomcat.util.net.NioChannel@65bf90c4:java.nio.channels.SocketChannel[connected local=/127.0.0.1:7750 remote=/127.0.0.1:47070]], Read direct from socket: [1148]
   2020-06-26 06:17:37.747 DEBUG 47 --- [http-nio-7750-exec-2] o.a.coyote.http11.Http11InputBuffer      : Received [PUT /pulsar-manager/tokens/token HTTP/1.0
   Host: localhost:7750
   Connection: close
   Content-Length: 53
   Accept: application/json, text/plain, */*
   environment: pulsar-clusters
   username: pulsar
   token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwdWxzYXJlMDA4MTFiYjUzNjMwZTNiYjY1YTU1MzgwZTdiYjZjNDI3YjhlZjg5NTAxNTkxNWQ3NzExYTlmYjljOTM2NjBhMTU5MzE1MDQwOTAzOCIsImV4cCI6MTU5MTQ0NzQ0MX0.z9-sa2NK0g8PDY0jUx07SxiraJkKkTcJzjeyZmFOzm8
   User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
   tenant: pulsar
   Content-Type: application/json
   Origin: http://10.1.104.130:9527
   Referer: http://10.1.104.130:9527/
   Accept-Encoding: gzip, deflate
   Accept-Language: zh-CN,zh;q=0.9
   Cookie: language=zh; JSESSIONID=89297C71E70241A89CD8E1D03CD9EDB3; Admin-Token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwdWxzYXJlMDA4MTFiYjUzNjMwZTNiYjY1YTU1MzgwZTdiYjZjNDI3YjhlZjg5NTAxNTkxNWQ3NzExYTlmYjljOTM2NjBhMTU5MzE1MDQwOTAzOCIsImV4cCI6MTU5MTQ0NzQ0MX0.z9-sa2NK0g8PDY0jUx07SxiraJkKkTcJzjeyZmFOzm8; username=pulsar; tenant=pulsar; Admin-Environment=pulsar-clusters
   
   {"role":"zhoufurong","token":"","description":"test"}]
   2020-06-26 06:17:37.748 DEBUG 47 --- [http-nio-7750-exec-2] o.a.t.util.http.Rfc6265CookieProcessor   : Cookies: Parsing b[]: language=zh; JSESSIONID=89297C71E70241A89CD8E1D03CD9EDB3; Admin-Token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwdWxzYXJlMDA4MTFiYjUzNjMwZTNiYjY1YTU1MzgwZTdiYjZjNDI3YjhlZjg5NTAxNTkxNWQ3NzExYTlmYjljOTM2NjBhMTU5MzE1MDQwOTAzOCIsImV4cCI6MTU5MTQ0NzQ0MX0.z9-sa2NK0g8PDY0jUx07SxiraJkKkTcJzjeyZmFOzm8; username=pulsar; tenant=pulsar; Admin-Environment=pulsar-clusters
   2020-06-26 06:17:37.748 DEBUG 47 --- [http-nio-7750-exec-2] o.a.catalina.connector.CoyoteAdapter     :  Requested cookie session id is 89297C71E70241A89CD8E1D03CD9EDB3
   2020-06-26 06:17:37.748 DEBUG 47 --- [http-nio-7750-exec-2] o.a.c.authenticator.AuthenticatorBase    : Security checking request PUT /pulsar-manager/tokens/token
   2020-06-26 06:17:37.748 DEBUG 47 --- [http-nio-7750-exec-2] org.apache.catalina.realm.RealmBase      :   No applicable constraints defined
   2020-06-26 06:17:37.748 DEBUG 47 --- [http-nio-7750-exec-2] o.a.c.authenticator.AuthenticatorBase    :  Not subject to any constraint
   2020-06-26 06:17:37.751 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : ==>  Preparing: SELECT access_token AS accessToken, user_id AS userId, name, description, email,phone_number AS phoneNumber, location, company, expire FROM users WHERE access_token = ?
   2020-06-26 06:17:37.751 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : ==> Parameters: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwdWxzYXJlMDA4MTFiYjUzNjMwZTNiYjY1YTU1MzgwZTdiYjZjNDI3YjhlZjg5NTAxNTkxNWQ3NzExYTlmYjljOTM2NjBhMTU5MzE1MDQwOTAzOCIsImV4cCI6MTU5MTQ0NzQ0MX0.z9-sa2NK0g8PDY0jUx07SxiraJkKkTcJzjeyZmFOzm8(String)
   2020-06-26 06:17:37.752 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : <==      Total: 1
   2020-06-26 06:17:37.752 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.EnvironmentsMapper.findByName  : ==>  Preparing: SELECT name,broker FROM environments where name=?
   2020-06-26 06:17:37.752 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.EnvironmentsMapper.findByName  : ==> Parameters: pulsar-clusters(String)
   2020-06-26 06:17:37.753 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.EnvironmentsMapper.findByName  : <==      Total: 1
   2020-06-26 06:17:37.753 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : ==>  Preparing: SELECT access_token AS accessToken, user_id AS userId, name, description, email,phone_number AS phoneNumber, location, company, expire FROM users WHERE access_token = ?
   2020-06-26 06:17:37.753 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : ==> Parameters: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwdWxzYXJlMDA4MTFiYjUzNjMwZTNiYjY1YTU1MzgwZTdiYjZjNDI3YjhlZjg5NTAxNTkxNWQ3NzExYTlmYjljOTM2NjBhMTU5MzE1MDQwOTAzOCIsImV4cCI6MTU5MTQ0NzQ0MX0.z9-sa2NK0g8PDY0jUx07SxiraJkKkTcJzjeyZmFOzm8(String)
   2020-06-26 06:17:37.753 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.UsersMapper.findByAccessToken  : <==      Total: 1
   2020-06-26 06:17:37.754 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.R.findAllByUserId              : ==>  Preparing: SELECT name, role_binding_id as roleBindingId, description, user_id as userId, role_id as roleId FROM role_binding WHERE user_id = ?
   2020-06-26 06:17:37.754 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.R.findAllByUserId              : ==> Parameters: 1(Long)
   2020-06-26 06:17:37.754 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.R.findAllByUserId              : <==      Total: 1
   2020-06-26 06:17:37.755 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.RolesMapper.findAllByMultiId   : ==>  Preparing: SELECT role_name AS roleName, role_id AS roleId, description, resource_type AS resourceType,resource_name AS resourceName, resource_verbs AS resourceVerbs, resource_id as resourceId,role_source AS roleSource, flag FROM roles WHERE role_id IN ( ? )
   2020-06-26 06:17:37.755 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.RolesMapper.findAllByMultiId   : ==> Parameters: 1(Long)
   2020-06-26 06:17:37.756 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.RolesMapper.findAllByMultiId   : <==      Total: 1
   2020-06-26 06:17:37.757 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.B.findTokenByRole              : ==>  Preparing: select token_id as tokenId, role, description, token FROM tokens where role=?
   2020-06-26 06:17:37.757 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.B.findTokenByRole              : ==> Parameters: zhoufurong(String)
   2020-06-26 06:17:37.758 DEBUG 47 --- [http-nio-7750-exec-2] o.a.p.m.m.B.findTokenByRole              : <==      Total: 0
   2020-06-26 06:17:37.758  INFO 47 --- [http-nio-7750-exec-2] o.a.p.m.service.impl.JwtServiceImpl      : Default disable JWT auth, please set jwt.broker.token.mode.
   2020-06-26 06:17:37.759 DEBUG 47 --- [http-nio-7750-exec-2] o.apache.coyote.http11.Http11Processor   : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@31e6a7be:org.apache.tomcat.util.net.NioChannel@65bf90c4:java.nio.channels.SocketChannel[connected local=/127.0.0.1:7750 remote=/127.0.0.1:47070]], Status in: [OPEN_READ], State out: [CLOSED]
   2020-06-26 06:17:37.760 DEBUG 47 --- [http-nio-7750-exec-2] o.apache.tomcat.util.threads.LimitLatch  : Counting down[http-nio-7750-exec-2] latch=1
   2020-06-26 06:17:37.760 DEBUG 47 --- [http-nio-7750-exec-2] org.apache.tomcat.util.net.NioEndpoint   : Socket: [org.apache.tomcat.util.net.NioChannel@65bf90c4:java.nio.channels.SocketChannel[closed]] closed
   ```


----------------------------------------------------------------
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.

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



[GitHub] [pulsar-manager] sijie commented on issue #311: pulsar-manager generate token report error: Token generate failed

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #311:
URL: https://github.com/apache/pulsar-manager/issues/311#issuecomment-650858197


   @lvs071103 did @tuteng already help you on the wechat group?


----------------------------------------------------------------
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.

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



[GitHub] [pulsar-manager] pisceslj commented on issue #311: pulsar-manager generate token report error: Token generate failed

Posted by GitBox <gi...@apache.org>.
pisceslj commented on issue #311:
URL: https://github.com/apache/pulsar-manager/issues/311#issuecomment-902393941


   The token is generated from the broker JWT private key as follows,maybe you  should config these parameters:
   jwt.broker.token.mode=PRIVATE
   jwt.broker.public.key=file:///path/pulsar/broker-public.key
   jwt.broker.private.key=file:///path/broker-private.key
   
   or
   
   jwt.broker.token.mode=SECRET
   jwt.broker.secret.key=file:///path/broker-secret.key


-- 
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: dev-unsubscribe@pulsar.apache.org

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