请求服务无响应Dispatcher has no subscribers
异常说明
请求某服务,该请求一直处于等待状态(页面按钮转圈圈),查看服务能看到,服务已经接收到请求,并进行处理,但是服务在将响应结果返回的时候,报异常Dispatcher has no subscribers
报错信息
Exception in thread "GlobalTaskExecutor-341" java.lang.IllegalStateException: Dispatcher has no subscribers.
at com.primeton.tip.org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:98)
at com.primeton.tip.org.springframework.integration.dispatcher.UnicastingDispatcher.access$000(UnicastingDispatcher.java:47)
at com.primeton.tip.org.springframework.integration.dispatcher.UnicastingDispatcher$1.run(UnicastingDispatcher.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
原因分析
该服务端口已被其他服务或请求占用,启动时并不会报错,热交换时会报错Address in use 。
对于这种问题,如果是测试环境,处理办法包括
1.更换端口
2.重启服务