You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "StringKe (via GitHub)" <gi...@apache.org> on 2025/05/02 16:15:08 UTC
[I] [Bug] Link tracing conflicts with Webflux context switching, causing all requests to fail [dubbo]
StringKe opened a new issue, #15349:
URL: https://github.com/apache/dubbo/issues/15349
### Pre-check
- [x] I am sure that all the content I provide is in English.
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Dubbo Version
org.apache.dubbo:dubbo:3.3.4
org.apache.dubbo:dubbo-spring-boot:3.3.4
javac 21.0.6
### Steps to reproduce this issue
The same problem occurs when configuring Zipkin tracing, mainly in the context switching of webflux.
org.apache.dubbo.spring.boot.autoconfigure.observability.DubboMicrometerTracingAutoConfiguration#dubboServerTracingObservationHandler
As long as the above bean is registered, the Webflux context switching will fail.
No need to configure any link tracking, just turn on the tracking switch.
### What you expected to happen
2025-05-02T15:58:59.842Z DEBUG 28890 --- [io-42010-exec-1] [ ] o.s.w.s.a.HttpWebHandlerAdapter : [7a06cd92] HTTP POST "/graphql"
2025-05-02T15:58:59.861Z TRACE 28890 --- [io-42010-exec-1] [b3e0cb9fb1d6e22ac63ef6ce27a5e30a-1ca5e0e0cdfadcc1] o.s.h.s.r.ServletHttpHandlerAdapter : [7a06cd92] onError: java.lang.ClassCastException: class org.springframework.http.server.reactive.observation.ServerRequestObservationContext cannot be cast to class org.apache.dubbo.tracing.context.DubboServerContext (org.springframework.http.server.reactive.observation.ServerRequestObservationContext and org.apache.dubbo.tracing.context.DubboServerContext are in unnamed module of loader 'app')
2025-05-02T15:58:59.861Z TRACE 28890 --- [io-42010-exec-1] [b3e0cb9fb1d6e22ac63ef6ce27a5e30a-1ca5e0e0cdfadcc1] o.s.h.s.r.ServletHttpHandlerAdapter : [7a06cd92] Setting ServletResponse status to 500 Server Error
### Anything else
application.yaml
```yaml
spring:
application:
name: gateway-admin
main:
web-application-type: reactive
config:
import:
- 'optional:classpath:application-base.yml'
- 'optional:classpath:application-common.yml'
- 'optional:classpath:application-self.yml'
- 'optional:classpath:application-${spring.profiles.active}-common.yml'
- 'optional:classpath:application-${spring.profiles.active}.yml'
- 'optional:zookeeper:'
profiles:
active: ${APP_PROFILE:local}
```
application-base.yaml
```yaml
spring:
main:
banner-mode: off
reactor:
context-propagation: auto
cloud:
zookeeper:
connect-string: ${APP_ZOOKEEPER_CONNECT_STRING:localhost:2181}
graphql:
graphiql:
enabled: true
websocket:
path: /graphql
redis:
redisson:
config: |
clusterServersConfig:
nodeAddresses:
- "valkey://127.0.0.1:7000"
checkSlotsCoverage: true
connectTimeout: 30000
subscriptionsPerConnection: 5
threads: 16
nettyThreads: 32
transportMode: "NIO"
dgs:
graphql:
dgs-response-headers:
enabled: false
dubbo:
application:
name: dubbo-${spring.application.name}
logger: slf4j
enable-empty-protection: true
enable-file-cache: false
qos-enable: false
register-mode: instance
preferred-protocol: tri
auto-trust-serialize-class: true
trust-serialize-class-level: 10
serialize-check-status: DISABLE
check-serializable: false
protocol:
name: tri
port: -1
timeout: 20000
serialization: fastjson2
triple:
rest:
json-framework: fastjson2
consumer:
check: false
timeout: 20000
serialization: fastjson2
provider:
check: false
timeout: 20000
serialization: fastjson2
registry:
address: zookeeper://${spring.cloud.zookeeper.connect-string}
config-center:
address: ${dubbo.registry.address}
metadata-report:
address: ${dubbo.registry.address}
metrics:
aggregation:
enabled: true
histogram:
enabled: true
tracing:
propagation:
type: W3C
tracing-exporter:
zipkin-config:
connect-timeout: 1s
read-timeout: 10s
endpoint: http://127.0.0.1:9411/api/v2/spans
sampling:
probability: 1
enabled: true
management:
tracing:
sampling:
probability: 1.0
zipkin:
tracing:
export:
enabled: true
endpoint: http://127.0.0.1:9411/api/v2/spans
server:
port: 0
shutdown: graceful
lifecycle:
timeout-per-shutdown-phase: 20s
logging:
include-application-name: false
level:
root: INFO
org.springframework.boot.context.config: DEBUG
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
org.apache.dubbo.spring.boot.context.event.WelcomeLogoApplicationListener: INFO
org.springframework.http.server.reactive: TRACE
sa-token:
is-print: false
check-same-token: true
log-level: DEBUG
is-log: true
debug: true
```
### Are you willing to submit a pull request to fix on your own?
- [ ] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Link tracing conflicts with Webflux context switching, causing all requests to fail [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw closed issue #15349: [Bug] Link tracing conflicts with Webflux context switching, causing all requests to fail
URL: https://github.com/apache/dubbo/issues/15349
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Link tracing conflicts with Webflux context switching, causing all requests to fail [dubbo]
Posted by "heliang666s (via GitHub)" <gi...@apache.org>.
heliang666s commented on issue #15349:
URL: https://github.com/apache/dubbo/issues/15349#issuecomment-2861905872
I will solve this problem~
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] Link tracing conflicts with Webflux context switching, causing all requests to fail [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #15349:
URL: https://github.com/apache/dubbo/issues/15349#issuecomment-2856779956
@oxsean PTAL
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org