Java. Lang. An IllegalStateException: Failed to check the status of the service. Com MAO. Demo. Service. No provider available for service com. MAO. Demo. Service: 1.0.0 from the zookeeper url://192.168.25.128:2181/com. Alibaba. Dubbo. Registry. RegistryService? Anyhost=true& Application=dubboxWeb& Check=false& Dubbo=2.8.4 & amp; Generic=false& Interface=com. MAO. Demo. Service& The methods=getName& Pid=1892 & amp; Revision=1.0.0 & amp; Side=consumer& Timestamp=1594360866262 & amp; Version=1.0.0 to the consumer 192.168.74.1 use dubbo version 2.8.4
Com. Alibaba. Dubbo. Config. ReferenceConfig. CreateProxy (ReferenceConfig. Java: 420)
And oddly mistyped the url, but as long as literally write a encounter url - the pattern matching url (such as & lt; Url - pattern> . Action
CodePudding user response:
If you want to match with. The url at the end of the action, should be configured & lt; Url - pattern> *. ActionCodePudding user response:
This is the consumer web. XMLContextConfigLocation
The classpath: for springmvc. Xml
CodePudding user response:
This is the web service. The XMLContextConfigLocation
The classpath: applicationContext *. Xml
CodePudding user response:
This is the service party applicationContext. XMLThis is the consumer, the springMvc. XML
The service side and consumer port conflicts
CodePudding user response:
Check service whether the use of dubbo service annotationsCodePudding user response:
The service sidePackage com. MAO. Demo. Impl;
The import com. MAO. Demo. Service;
@ com. Alibaba. Dubbo. Config. The annotation. Service (version="1.0.0")
Public class ServiceImpl implements Service {
Public String getName () {
//TODO Auto - generated method stub
Return "itheima";
}
}
Consumer code
Package com. MAO. Demo. The controller;
The import org. Springframework. Stereotype. The Controller;
import org.springframework.web.bind.annotation.RequestMapping;
The import org. Springframework. Web. Bind. The annotation. ResponseBody;
import com.alibaba.dubbo.config.annotation.Reference;
The import com. MAO. Demo. Service;
@ Controller
@ RequestMapping ("/user ")
Public class UserController {
@ the Reference (version="1.0.0")
Private Service Service;
@ RequestMapping ("/showName ")
@ ResponseBody
Public String showName () {
String name=service. The getName ();
return name;
}
}
The project to ensure that two have the same interface
CodePudding user response:
Your consumer and service port to the agreement of not the same, try to restart againCodePudding user response:
Changed or not, will is what effect will the environment, I use mavenCodePudding user response:
And I casually input (as long as there is. The action suffix) url, the background will explode the errorCodePudding user response:
Configuration specified registered client, need to pay attention to the zk version and the registered client version compatibilitySee the official explanation:
Dubbo support zkclient and curator Zookeeper client implementation:
Note: in 2.7 x version has removed zkclient implementation, if you want to use zkclient client, need to expand the
Dubbo. Registry. Client=curator
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull