AccessToken expired after an hour even though refresh token is in place – BigQuery Connector 1.0.9 in WSO2 EI 6.5.0

huangapple go评论107阅读模式
英文:

AccessToken expired after an hour even though refresh token is in place - BigQuery Connector 1.0.9 in WSO2 EI 6.5.0

问题

我正在使用BigQuery Connector V1.0.9来处理WSO2 EI 6.5.0中的DataSet、TableData等。

  • 生成了OAuth凭据,如ClientID,ClientSec,AccessToken,RefreshToken等。
  • 在WSO2 EI服务器中添加了连接器并启用了它。
  • 将所有上述提到的OAuth参数传递给bigquery.init操作以建立连接。
  • 在此init操作之后,在registry下创建了一些文件以存储AccessToken值。

bigquery.init - 代码:

  1. <!-- 读取BigQuery凭据 -->
  2. <sequence description="加载配置" key="Get_BigQuery_Credentials"/>
  3. <!-- 建立BigQuery连接 -->
  4. <bigquery.init>
  5. <apiUrl>{$ctx:apiUrl}</apiUrl>
  6. <accessToken>{$ctx:accessToken}</accessToken>
  7. <clientId>{$ctx:clientId}</clientId>
  8. <clientSecret>{$ctx:clientSecret}</clientSecret>
  9. <refreshToken>{$ctx:refreshToken}</refreshToken>
  10. <registryPath>{$ctx:registryPath}</registryPath>
  11. </bigquery.init>
  12. <log level="full"/>

WireLog:

  1. [2023-03-09 17:11:57,785] [] INFO - LogMediator *********BigQueryAPI - OAuth = is called **********
  2. [2023-03-09 17:11:57,788] [] INFO - DependencyTracker Local entry : Connector/BigQIntegwso2/ was added to the Synapse configuration successfully
  3. [2023-03-09 17:11:58,248] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "GET /oauth2/v1/tokeninfo?access_token=ya29.XXXXXX HTTP/1.1[\r][\n]"
  4. [2023-03-09 17:11:58,249] [] DEBUG - ...
  5. ...
  6. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Host: bigquery.googleapis.com[\r][\n]"
  7. [2023-03-09 17:11:58,740] [] DEBUG - ...
  8. ...
  9. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "HTTP/1.1 404 Not Found[\r][\n]"
  10. [2023-03-09 17:11:58,899] [] DEBUG - ...
  11. ...

以上是您提供的代码片段的翻译。

英文:

I am using BigQuery Connector V1.0.9 to work with DataSet,TableData etc in WSO2 EI 6.5.0.

  • Generated OAuth Credentials like ClientID,ClientSec,AccessToken,RefreshToken etc
  • Added Connector in WSO2 EI Server and enabled it
  • passed all above mentioned OAuth param to bigquery.init Operation to establish the connectivity.
  • After this init operation there is some file created under registry to store AccessToken Value

bigquery.init - Code:

  1. &lt;!-- Reading BigQuery Credentials --&gt;
  2. &lt;sequence description=&quot;Load Configurations&quot; key=&quot;Get_BigQuery_Credentials&quot;/&gt;
  3. &lt;!-- Establish BigQuery Connectivity --&gt;
  4. &lt;bigquery.init&gt;
  5. &lt;apiUrl&gt;{$ctx:apiUrl}&lt;/apiUrl&gt;
  6. &lt;accessToken&gt;{$ctx:accessToken}&lt;/accessToken&gt;
  7. &lt;clientId&gt;{$ctx:clientId}&lt;/clientId&gt;
  8. &lt;clientSecret&gt;{$ctx:clientSecret}&lt;/clientSecret&gt;
  9. &lt;refreshToken&gt;{$ctx:refreshToken}&lt;/refreshToken&gt;
  10. &lt;registryPath&gt;{$ctx:registryPath}&lt;/registryPath&gt;
  11. &lt;/bigquery.init&gt;
  12. &lt;log level=&quot;full&quot;/&gt;

WireLog:

  1. [2023-03-09 17:11:57,785] [] INFO - LogMediator *********BigQueryAPI - OAuth = is called **********
  2. [2023-03-09 17:11:57,788] [] INFO - DependencyTracker Local entry : Connector/BigQIntegwso2/ was added to the Synapse configuration successfully
  3. [2023-03-09 17:11:58,248] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;GET /oauth2/v1/tokeninfo?access_token=ya29.XXXXXX HTTP/1.1[\r][\n]&quot;
  4. [2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;activityid: 3404708f-5eb0-459d-ad1b-b376ddbc4059[\r][\n]&quot;[2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Accept: */*[\r][\n]&quot;
  5. [2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Cache-Control: no-cache[\r][\n]&quot;
  6. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Postman-Token: 238c81f0-ca8d-4577-912e-d30116589a73[\r][\n]&quot;
  7. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Accept-Encoding: gzip, deflate, br[\r][\n]&quot;
  8. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Content-Type: application/json[\r][\n]&quot;
  9. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Host: www.googleapis.com[\r][\n]&quot;
  10. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;Connection: Keep-Alive[\r][\n]&quot;
  11. [2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]&quot;
  12. [2023-03-09 17:11:58,251] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &lt;&lt; &quot;[\r][\n]&quot;
  13. [2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;HTTP/1.1 400 Bad Request[\r][\n]&quot;
  14. [2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Pragma: no-cache[\r][\n]&quot;
  15. [2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Date: Thu, 09 Mar 2023 11:41:57 GMT[\r][\n]&quot;
  16. [2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]&quot;
  17. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]&quot;
  18. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Content-Type: application/json; charset=UTF-8[\r][\n]&quot;
  19. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Vary: Origin[\r][\n]&quot;
  20. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Vary: X-Origin[\r][\n]&quot;
  21. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Vary: Referer[\r][\n]&quot;
  22. [2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Content-Encoding: gzip[\r][\n]&quot;
  23. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Server: ESF[\r][\n]&quot;
  24. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;X-XSS-Protection: 0[\r][\n]&quot;
  25. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;X-Frame-Options: SAMEORIGIN[\r][\n]&quot;
  26. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;X-Content-Type-Options: nosniff[\r][\n]&quot;
  27. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Alt-Svc: h3=&quot;:443&quot;; ma=2592000,h3-29=&quot;:443&quot;; ma=2592000[\r][\n]&quot;
  28. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;Transfer-Encoding: chunked[\r][\n]&quot;
  29. [2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[\r][\n]&quot;
  30. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  31. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x1f][\r][\n]&quot;
  32. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  33. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x8b][\r][\n]&quot;
  34. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  35. [2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x8][\r][\n]&quot;
  36. [2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  37. [2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x0][\r][\n]&quot;
  38. [2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  39. [2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x0][\r][\n]&quot;
  40. [2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  41. [2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x0][\r][\n]&quot;
  42. [2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  43. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x0][\r][\n]&quot;
  44. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  45. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x0][\r][\n]&quot;
  46. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  47. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0x2][\r][\n]&quot;
  48. [2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  49. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0xff][\r][\n]&quot;
  50. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  51. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0xab][\r][\n]&quot;
  52. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  53. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0xe6][\r][\n]&quot;
  54. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  55. [2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;R[\r][\n]&quot;
  56. [2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  57. [2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;P[\r][\n]&quot;
  58. [2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  59. [2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;P[\r][\n]&quot;
  60. [2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  61. [2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;J[\r][\n]&quot;
  62. [2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;00000001[\r][\n]&quot;
  63. [2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;-[\r][\n]&quot;
  64. [2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;0000001[\r][\n]&quot;
  65. [2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;*[\r][\n]&quot;
  66. [2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;3c[\r][\n]&quot;
  67. [2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[0xca]/R[0xb2]RP[0xca][0xcc]+K[0xcc][0xc9]L[0x89]/[0xc9][0xcf]N[0xcd]S[0xd2][0x81][0xcb][0xc5][0xa7][0xa4][0x16]&#39;[0x17]e[0x16][0x94]d[0xe6][0xe7][0x81][0xd4]yB[0xd4])[0x84]%[0xe6][0x94][0xa6]*q[0xd5]r[0x1][0x0][0x92]_[0xb][0xd2]G[0x0][0x0][0x0][\r][\n]&quot;
  68. [2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;0[\r][\n]&quot;
  69. [2023-03-09 17:11:58,366] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 &gt;&gt; &quot;[\r][\n]&quot;
  70. [2023-03-09 17:11:58,737] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;POST /oauth2/v3/token HTTP/1.1[\r][\n]&quot;
  71. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;X-Frame-Options: SAMEORIGIN[\r][\n]&quot;
  72. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Alt-Svc: h3=&quot;:443&quot;; ma=2592000,h3-29=&quot;:443&quot;; ma=2592000[\r][\n]&quot;
  73. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]&quot;
  74. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;X-Content-Type-Options: nosniff[\r][\n]&quot;
  75. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Content-Encoding: gzip[\r][\n]&quot;
  76. [2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Vary: Origin[\r][\n]&quot;
  77. [2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Vary: X-Origin[\r][\n]&quot;
  78. [2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Vary: Referer[\r][\n]&quot;
  79. [2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]&quot;
  80. [2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Pragma: no-cache[\r][\n]&quot;
  81. [2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;X-XSS-Protection: 0[\r][\n]&quot;
  82. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Content-Type: application/x-www-form-urlencoded[\r][\n]&quot;
  83. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Transfer-Encoding: chunked[\r][\n]&quot;
  84. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Host: bigquery.googleapis.com[\r][\n]&quot;
  85. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;Connection: Keep-Alive[\r][\n]&quot;
  86. [2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]&quot;
  87. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;[\r][\n]&quot;
  88. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;ff[\r][\n]&quot;
  89. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0]M[0x8e][0xbb]n[0x83]0[0x0]E[0xbf][0xa6][0xd9]@$`[0x1e][0x3][0x3][0xb8][0x1][0xd2]B qS[0xc1][0x84][0xc0][0x18]b[0xa0][0xd8]1[0x8f][0x88]|}Y*U[0xba][0xdb][0xd1]9[0xba][0x82][0xd4][0x82][0x8c][0xf7]|b[0x1d][0x19][0xec][0xfd][0xdb][0xc1][0xdb][0xa6]TF[0x90][0xbc][0xb7]H[\r][0xca]+[0x82]Mvr[0xae][0x8e][0xe3];[\n]&quot;
  90. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;:?=)[0xb4]Nb[0x8c].[0x91][0xb][0xe1][0xd7][0xfa][0xca]W&#39;E[0xd8][\r][0xc2]g[0xde][0xb9][0x91]0[0x88][0xee]~.C[0x1e]&#39;[0xad][0xc5][0xea]c[0xd1])[0x10][0x9a][0xe0][0xbe]f[0xe1][0x7][0xf7].[0x12][0x2][0xc9]7[0x4][0x98]GY[0xb3]kD1L[0xf9][0xb4]rb[0x8b][0xff]&#39;v[0xb8][0xa7]d##[0xc1][0x82]L[0xb6][0x1f]C[0x94][0xa4][0x92][0x1b][0xd3][0xe5][0xc6]5[0xea][0xd7]^Y=[0x8e]:[0xa2]Io[0xf0][0xdb]9K[0x15][0xfd][0xcf][0xa0][0x95][0xad][0xee][\r][0xd3][0x4][0xaa]u[0x0]@[0x93]*Pj3e[0x1d][0xc0][0x7][0xfe][0xd0]g[0xc1][0x16]R3[0xa0][0xf3]A[0xd1]Z[0xa0][0xea][0x86]\p&gt;[0xca][\r]cMO[0xe6][0x91][0x8][0xcc][0x86]i[0xeb][0xc8][0x98][0xfd][0xfc][0x2][0xc2][0xf9][0xbd][[0x17][0x1][0x0][0x0][\r][\n]&quot;
  91. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;0[\r][\n]&quot;
  92. [2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &lt;&lt; &quot;[\r][\n]&quot;
  93. [2023-03-09 17:11:58,898] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;HTTP/1.1 404 Not Found[\r][\n]&quot;
  94. [2023-03-09 17:11:58,898] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Content-Type: text/html; charset=UTF-8[\r][\n]&quot;
  95. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Referrer-Policy: no-referrer[\r][\n]&quot;
  96. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Content-Length: 1576[\r][\n]&quot;
  97. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Date: Thu, 09 Mar 2023 11:41:58 GMT[\r][\n]&quot;
  98. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Alt-Svc: h3=&quot;:443&quot;; ma=2592000,h3-29=&quot;:443&quot;; ma=2592000[\r][\n]&quot;
  99. [2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;Connection: close[\r][\n]&quot;
  100. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;[\r][\n]&quot;
  101. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;&lt;!DOCTYPE html&gt;[\n]&quot;
  102. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;&lt;html lang=en&gt;[\n]&quot;
  103. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;meta charset=utf-8&gt;[\n]&quot;
  104. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;meta name=viewport content=&quot;initial-scale=1, minimum-scale=1, width=device-width&quot;&gt;[\n]&quot;
  105. [2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;title&gt;Error 404 (Not Found)!!1&lt;/title&gt;[\n]&quot;
  106. [2023-03-09 17:11:58,901] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;style&gt;[\n]&quot;
  107. [2023-03-09 17:11:58,901] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* &gt; body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min&quot;
  108. [2023-03-09 17:11:58,902] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot;-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}[\n]&quot;
  109. [2023-03-09 17:11:58,906] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;/style&gt;[\n]&quot;
  110. [2023-03-09 17:11:58,906] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;a href=//www.google.com/&gt;&lt;span id=logo aria-label=Google&gt;&lt;/span&gt;&lt;/a&gt;[\n]&quot;
  111. [2023-03-09 17:11:58,907] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;p&gt;&lt;b&gt;404.&lt;/b&gt; &lt;ins&gt;That[0xe2][0x80][0x99]s an error.&lt;/ins&gt;[\n]&quot;
  112. [2023-03-09 17:11:58,907] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 &gt;&gt; &quot; &lt;p&gt;The requested URL &lt;code&gt;/oauth2/v3/token&lt;/code&gt; was not found on this server. &lt;ins&gt;That[0xe2][0x80][0x99]s all we know.&lt;/ins&gt;[\n]&quot;
  113. [2023-03-09 17:11:58,908] [] ERROR - RelayUtils Error while building Passthrough stream
  114. org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
  115. at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
  116. at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
  117. at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
  118. at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
  119. at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:165)
  120. at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:168)
  121. at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:121)
  122. at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:146)
  123. at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
  124. at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:171)
  125. at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
  126. at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
  127. at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
  128. at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:179)
  129. at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
  130. at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:805)
  131. at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)
  132. at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:578)
  133. at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:195)
  134. at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
  135. at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:265)
  136. at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
  137. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  138. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  139. at java.lang.Thread.run(Thread.java:748)
  140. Caused by: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
  141. at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:36)
  142. at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
  143. at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
  144. ... 24 more
  145. [2023-03-09 17:11:58,916] [] ERROR - TemplateMediator Error while building message. Error while building Passthrough stream
  146. org.apache.axis2.AxisFault: Error while building Passthrough stream
  • After an hour Oauth Accesstoken Expired and noticed HTTP/1.1 400 Bad Request ERROR in above shared Wirelog.
  • Even though we're passing refreshToken in init Operation, why that accesstoken expired? The main purpose of refresh token is to refresh/regenerate the access token when it expires to make it alive. Correct me if i'm wrong.

I need to manually generate credentials again and update in WSO2 API also. How can we avoid this situation?

PS: Worked with Gmail/Outlook Connector where simlar set of token param are used , this kinda ERROR not happened frequently. But with BigQuery Connector expired every an hour.

Kindly suggest some better way to handle this situation?

答案1

得分: 1

Your token endpoint seems Wrong. Shouldn't it be https://www.googleapis.com/oauth2/v4/token So change your apiUrl to https://www.googleapis.com.

Following is a sample dataset.

  1. {
  2. "accessToken": "ya29.BwKYx40Dith1DFQBDjZOHNqhcxmKs9zbkjAWQa1q8mdMFndp2-q8ifG66fwprOigRwKSNw",
  3. "apiUrl": "https://www.googleapis.com",
  4. "clientId": "504627865627-kdni8r2s10sjddfgXzqb4bvnba.apps.googleusercontent.com",
  5. "clientSecret": "ChlbHI_T7zssXXTRYuqj_-TM",
  6. "refreshToken": "1/uWful-diQNAdk-alDUa6ixxxxxxxx-LpJIikEQ2sqA",
  7. "registryPath": "connectors/bq",
  8. "projectId": "publicdata",
  9. "datasetId": "samples",
  10. "fields": "id",
  11. "callback": "callBackFunction",
  12. "apiKey": "154987fd5h4x6gh4",
  13. "prettyPrint": "true",
  14. "quotaUser": "1hx46f5g4h5ghx6h41x54gh6f4hx",
  15. "userIp": "192.77.88.12",
  16. "ifNoneMatch":"hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8",
  17. "ifMatch":"hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8"
  18. }

Take a look at this document as well.

英文:

Your token endpoint seems Wrong. Shouldn't it be https://www.googleapis.com/oauth2/v4/token So change your apiUrl to https://www.googleapis.com.

Following is a sample dataset.

  1. {
  2. &quot;accessToken&quot;: &quot;ya29.BwKYx40Dith1DFQBDjZOHNqhcxmKs9zbkjAWQa1q8mdMFndp2-q8ifG66fwprOigRwKSNw&quot;,
  3. &quot;apiUrl&quot;: &quot;https://www.googleapis.com&quot;,
  4. &quot;clientId&quot;: &quot;504627865627-kdni8r2s10sjddfgXzqb4bvnba.apps.googleusercontent.com&quot;,
  5. &quot;clientSecret&quot;: &quot;ChlbHI_T7zssXXTRYuqj_-TM&quot;,
  6. &quot;refreshToken&quot;: &quot;1/uWful-diQNAdk-alDUa6ixxxxxxxx-LpJIikEQ2sqA&quot;,
  7. &quot;registryPath&quot;: &quot;connectors/bq&quot;,
  8. &quot;projectId&quot;: &quot;publicdata&quot;,
  9. &quot;datasetId&quot;: &quot;samples&quot;,
  10. &quot;fields&quot;: &quot;id&quot;,
  11. &quot;callback&quot;: &quot;callBackFunction&quot;,
  12. &quot;apiKey&quot;: &quot;154987fd5h4x6gh4&quot;,
  13. &quot;prettyPrint&quot;: &quot;true&quot;,
  14. &quot;quotaUser&quot;: &quot;1hx46f5g4h5ghx6h41x54gh6f4hx&quot;,
  15. &quot;userIp&quot;: &quot;192.77.88.12&quot;,
  16. &quot;ifNoneMatch&quot;:&quot;hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8&quot;,
  17. &quot;ifMatch&quot;:&quot;hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8&quot;
  18. }

Take a look at this document as well.

huangapple
  • 本文由 发表于 2023年3月9日 19:20:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75683900.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定