Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring cloud gateway webflux集成问题 #476

Open
taotao365s opened this issue May 3, 2022 · 1 comment
Open

spring cloud gateway webflux集成问题 #476

taotao365s opened this issue May 3, 2022 · 1 comment
Labels
waiting for feedback waiting for feedback

Comments

@taotao365s
Copy link

taotao365s commented May 3, 2022

Describe the bug

spring cloud gateway: 3.0.6

  • 问题1

当后端xx-service没有启动时,traceId不在变换(线程复用了?),spanId就会自动后延,初步怀疑spanId没有清空
访问一个不存在的url,现象同上
正常启动且url存在,traceId和spanId正常。

  • 问题2

spanId 从网关进来就直接是0.1.2?不应该是0么,还是reactor切换了多个上下文?

16:32:18.608  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2] - request path=/xx-service/api/test 
16:32:18.609  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2] - mock token... 
16:32:18.615  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:20.548  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1] - request path=/xx-service/api/test 
16:32:20.548  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1] - mock token... 
16:32:20.550  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:23.347  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1] - request path=/xx-service/api/test 
16:32:23.349  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1] - mock token... 
16:32:23.351  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:25.642  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1] - request path=/xx-service/api/test 
16:32:25.643  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1] - mock token... 
16:32:25.644  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:30.044  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1] - request path=/xx-service/api/test 
16:32:30.044  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1] - mock token... 
16:32:30.047  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:30.783  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:30.784  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1] - mock token... 
16:32:30.786  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:31.254  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:31.255  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1] - mock token... 
16:32:31.257  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:31.550  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:31.551  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1] - mock token... 
16:32:31.557  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:31.742  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:31.742  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1] - mock token... 
16:32:31.744  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:31.957  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:31.958  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:31.960  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:32.105  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:32.106  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:32.108  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:32.294  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:32.295  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:32.300  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:32.523  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:32.524  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:32.525  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:32.673  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:32.674  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:32.676  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:32.860  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:32.861  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:32.863  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:33.109  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:33.109  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:33.111  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 
16:32:33.392  INFO [reactor-http-nio-2] [filter.GlobalAuthFilter:45][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - request path=/xx-service/api/test 
16:32:33.393  WARN [reactor-http-nio-2] [filter.GlobalAuthFilter:61][c0a8a8861651566738608100342235, 0.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1] - mock token... 
16:32:33.394  WARN [boundedElastic-1] [o.s.c.l.core.RoundRobinLoadBalancer:97][, ] - No servers available for service: xx-service 

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFATracer version: 3.12.1
  • JVM version (e.g. java -version): 8
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:
@glmapper
Copy link
Contributor

glmapper commented May 6, 2022

@taotao365s 从现象看是线程复用导致,可以提供一个简单的复现 demo 吗?

@glmapper glmapper added the waiting for feedback waiting for feedback label May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback waiting for feedback
Projects
None yet
Development

No branches or pull requests

2 participants