dubbo调用提供者接口报错
 HTTP Status 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.soecode.dubbo.service.HelloService. Tried 3 times of the providers [192.168.63.47:20880] (1/1) from the registry 192.168.63.47:2181 on the consumer 192.168.63.47 using the dubbo version 2.4.10. Last error is: Failed to invoke remote method: sayHello, provider: dubbo://192.168.63.47:20880/com.soecode.dubbo.service.HelloService?anyhost=true&application=demo-consumer&check=false&default.accepts=1&dubbo=2.4.10&executes=1&interface=com.soecode.dubbo.service.HelloService&methods=sayHello&pid=1348&revision=dubbo.provider&sayHello.actives=1&side=consumer&timestamp=1510110717473, cause: com.alibaba.dubbo.rpc.RpcException: Failed to invoke method sayHello in provider dubbo://192.168.63.47:20880/com.soecode.dubbo.service.HelloService?anyhost=true&application=demo-provider&default.accepts=1&dubbo=2.4.10&executes=1&interface=com.soecode.dubbo.service.HelloService&methods=sayHello&pid=9668&side=provider&timestamp=1510110709853, cause: The service using threads greater than <dubbo:service executes="1" /> limited.

初学dubbo,写了一个下载文件的接口,消费者调用提供者的时候就报这个错,文件也下载下来了,但是一直报这个错!
求大神指教!

4个回答

你那几个类实现序列化接口

fuweihua123
fuweihua123 回复嗨疯子: 好的
2 年多之前 回复
slw710793113
嗨疯子 确实是没有实现序列化,添加后就可以了
2 年多之前 回复

消费者和提供者都注入成功了?

slw710793113
嗨疯子 是的,都注入成功了,文件已经下载下来了。就是报这个错误
2 年多之前 回复

service的executes设置大些

slw710793113
嗨疯子 现在就是想测试一下并发和连接数,但是只请求了一次啊。
2 年多之前 回复

你那几个类实现序列化接口

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
调用任何dubbo提供者服务都报错

com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method getMap in the service com.mama.cloud.date.api.service.ApiSerivce. Tried 3 times of the providers [101.5.61.2:30063] (1/1) from the registry 101.5.230.85:2181 on the consumer 101.5.61.3 using the dubbo version 2.5.5-SNAPSHOT. Last error is: null 在本地调用都能成功,但部署到测试服务器就一直报错,困扰两天了,有人知道怎么解决吗,dubbo-admin上都是正常的

dubbo服务已启动,作为消费者的我调用服务端的接口,一直报错

错误如图,有没有大神解释一下这是为啥子@_@![![图片说明](https://img-ask.csdn.net/upload/201802/01/1517414531_602045.png)图片说明](https://img-ask.csdn.net/upload/201802/01/1517414523_949781.png) 附上错误信息:[DUBBO] Decode request failed: com/esotericsoftware/kryo/KryoException, dubbo version: 2.8.4, current host: 169.xxx.xxx.70 java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/KryoException

dubbo消费方调用不到服务方问题

消费方 配置 和代码: web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <servlet> <!-- 配置servlet --> <servlet-name>HelloWeb</servlet-name> <!-- 可以理解为刚给当前servlet起名字,可自定义 --> <!-- springmvc的核心处理器,不可自定义 --> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <!-- 配置Spring mvc下的配置文件的位置和名称 --> <init-param> <!-- 核心处理器的初始化,不可自定义 --> <param-name>contextConfigLocation</param-name> <param-value>classpath:Spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <!-- 可以理解为指定被Mapping的servlet的名称(代码第二行中的名称相同) --> <servlet-name>HelloWeb</servlet-name> <!-- 配置拦截路径,/表示全拦截 --> <url-pattern>*.action</url-pattern> </servlet-mapping> </web-app> ``` ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo = "http://code.alibabatech.com/schema/dubbo" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <context:annotation-config/> <!-- bean definitions go here--> <!-- 配置dubbo的应用名称 --> <dubbo:application name="student_consumer"></dubbo:application> <!-- 配置dubbo的配置中心 <dubbo:registry protocol="zookeeper" address="zookeeper://122.51.144.197:2181" ></dubbo:registry>--> <dubbo:registry protocol="zookeeper" address="zookeeper://192.168.234.118:2181" ></dubbo:registry> <!-- 配置dubbo的扫描包 将@service注解的类放入dubbo扫描包,供dubbo远程调用(RPC)时使用--> <dubbo:annotation package="org.controller"></dubbo:annotation> <!-- 注入到spring的 ioc容器中 --> <context:component-scan base-package="org.controller"></context:component-scan> ``` ----------------------------------------------------代码 ![图片说明](https://img-ask.csdn.net/upload/201912/21/1576939071_98741.jpg) 提供方 配置 ![图片说明](https://img-ask.csdn.net/upload/201912/21/1576939144_800881.jpg) 代码: ``` package com.test.impl; import com.alibaba.dubbo.config.annotation.Service; import com.test.api.StudentServer; @Service //alibaba public class StudentServerImpl implements StudentServer{ public String server(String name) { String hello="你好,很高心遇见你!"; return hello; } } ``` 报错信息: Servlet.service() for servlet [HelloWeb] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPointerException at org.controller.StudentController.rpcServer(StudentController.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ![图片说明](https://img-ask.csdn.net/upload/201912/21/1576939448_968772.png)

dubbo启动报错连接服务超时

dubbo启动会检查所有提供者,有的能调通,有的由于服务器设置不能调通。怎样设置只要有能调通的就不报错,而不是遇到调不通的就报错。求各位大神解答。。。。。。。。。。

容器启动dubbo消费者时总是提示找不到接口类,是什么原因?

这是发布成功的服务,用telnet命令可以调到: ![图片说明](https://img-ask.csdn.net/upload/201609/07/1473259441_617095.png) 这是启动消费者时报的错:接口类找不到 ![图片说明](https://img-ask.csdn.net/upload/201609/07/1473259458_82030.png) 这是消费者配置文件,(因为用main方法启动就是正确的,所以认为此配置文件是正确的) ![图片说明](https://img-ask.csdn.net/upload/201609/07/1473259427_536267.jpg)

dubbo在虚拟机中执行命令启动服务提供者显示成功,查看日志发现报错

在master中执行[root@master bin]# sh start-db.sh后,显示: SERVER_PROTOCOL=dubbo SERVER_PORT=20880 LOGS_FILE=/tmp/dubbo.log STDOUT_FILE=/tmp/stdout.log Starting the dubbo-provider ....OK! PID: 2886 STDOUT: /tmp/stdout.log 到tmp下查看stdout.log后发现报错如下: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:356) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2502) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:148) at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:211) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1360) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1414) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:602) ...... Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.<init>(Socket.java:425) at java.net.Socket.<init>(Socket.java:241) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:306) ... 81 more [ERROR] 2016-09-08 02:19:49 DruidDataSource@(DruidDataSource.java:629):dataSource init error com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 是哪里配置的问题么?

python3.x 实现dubbo接口RPC协议自动化测试运行报错:argument should be integer or bytes-like object, not 'str'

``` #!/usr/bin/env python # -*- coding: utf-8 -*- import json import socket import telnetlib class dubbo: # 定义私有属性 __init = False __encoding = "utf8" __finish = 'dubbo>' __connect_timeout = 10 __read_timeout = 10 # 定义构造方法 def __init__(self, host, port): self.host = host self.port = port if host is not None and port is not None: self.__init = True def set_finish(self, finish): ''' defualt is ``dubbo>`` ''' self.__finish = finish def set_encoding(self, encoding): ''' If ``result retured by dubbo`` is a ``str`` instance and is encoded with an ASCII based encoding other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name must be specified. Encodings that are not ASCII based (such as UCS-2) are not allowed and should be decoded to ``unicode`` first. ''' self.__encoding = encoding def set_connect_timeout(self, timeout): ''' Defines a timeout for establishing a connection with a dubbo server. It should be noted that this timeout cannot usually exceed 75 seconds. defualt is ``10`` ''' self.__connect_timeout = timeout def set_read_timeout(self, timeout): ''' Defines a timeout for reading a response expected from the dubbo server. defualt is ``10`` ''' self.__read_timeout = timeout def do(self, command): # 连接Telnet服务器 try: tn = telnetlib.Telnet(host=self.host, port=self.port, timeout=self.__connect_timeout) except socket.error as err: print("[host:%s port:%s] %s" % (self.host, self.port, err)) return # 触发doubble提示符 tn.write(b'\n') # 执行命令 tn.read_until(self.__finish.encode(), timeout=self.__read_timeout) # tn.write('%s\n' % command) tn.write(command.encode() + b"\n") # 获取结果 data = '' while data.find(self.__finish) == -1: data = tn.read_very_eager() data = data.split("\n") data = json.loads(data[0], encoding=self.__encoding) tn.close() # tn.write('exit\n') return data def invoke(self, interface, method, param): cmd = "%s %s.%s(%s)" % ('invoke', interface, method, param) return self.do(cmd) def connect(host, port): return dubbo(host, port) if __name__ == '__main__': Host = '192.168.0.56' # Doubble服务器IP Port = 20884 # Doubble服务端口 # 初始化dubbo对象 conn = dubbo(Host, Port) # 设置telnet连接超时时间 conn.set_connect_timeout(10) # 设置dubbo服务返回响应的编码 conn.set_encoding('utf-8') interface = 'com.tz.course.stub.service.ICoursePackageFacadeAPI' method = 'checkCourseStatusByCourseIds' param = '{"courseIds": "9765", "userId": "56645"}' print(conn.invoke(interface, method, param)) command = 'invoke com.tz.course.stub.service.ICoursePackageFacadeAPI.checkCourseStatusByCourseIds({"courseIds": "9765", "userId": "56645"})' print(conn.do(command)) ``` ``` #coding=utf8 import sys from kazoo.client import KazooClient import urllib import urllib3 import json import telnetlib import socket import dubbo_telnet Host = '192.168.0.54:2181' # zookeeper的地址 def coondoubble_data(servhost, servport,interface,method,param): try: # 初始化dubbo对象 conn = dubbo_telnet.connect(servhost, servport) # 设置telnet连接超时时间 conn.set_connect_timeout(10) # 设置dubbo服务返回响应的编码 conn.set_encoding('utf-8') # print("interface:" + interface, "method:" + method, "param:" + param) data = conn.invoke(interface, method, param) return data except Exception as e: raise e def get_dubbo_full(): global Host zk = KazooClient(hosts="{}".format(Host)) zk.start() urls = [] list = zk.get_children("dubbo") for i in list: if 'serv' in i: #关键字过滤 # print i try: gg = zk.get_children("/dubbo/{}/providers".format(i)) if gg: for j in gg: url = urllib.parse.unquote(j) if url.startswith('dubbo:'): urls.append(url.split('?')[0].split('dubbo://')[1]) except Exception as e: print(e) print(i) services = {} for i in urls: try: path, service = i.split('/') if not services.get(path): services.update({path: []}) services[path].append(service) except Exception as e: pass print(json.dumps(services, indent=4)) def get_dubbo(servername): global Host zk = KazooClient(hosts="{}".format(Host)) zk.start() urls = [] lists = zk.get_children("dubbo") for i in lists: if servername in i: try: # 获取服务发布方 gg = zk.get_children("/dubbo/{}/providers".format(i)) if gg: for j in gg: url = urllib.parse.unquote(j) if url.startswith('dubbo:'): urls.append(url.split('dubbo://')[1]) except Exception as e: print(e) paths=[] for i in urls: try: path, temp = i.split('/') service_name = temp.split('?')[0] method_name = temp.split('methods=')[1].split('&')[0].split(',') paths.append(path) except Exception as e: print(e) services = {"service_name": service_name, "paths": paths, "method_name": method_name} print(services) return services print(json.dumps(services, indent=4)) if __name__ == '__main__': #使用方法get_dubbo('<服务名>') result = get_dubbo("com.tz.course.stub.service.IAccessFacadeAPI") rs = result["paths"][0] print(rs) servhost, servport = rs.split(':') servport = int(servport) interface = "com.tz.edu.power.stub.ListenAccessCacheFacadeAPI" method = "getListenCourseAccess" param = '{"382","2157306"}' #get_dubbo('com.tz.edu.power.stub.AccessTuneLogAPI') #param='''{"batSubmitId":null, "logonId":"8ybbmd01.c.0200", "len":"20", "groupId":"020090006110982", "start":"0", "logonLevel":"3", "limitSum1":"40000", "limitSum":"90000000000000000", "endTime":"20200101", "beginTime":"20190101", "batFileName":null, "channelFlag":"1"}''' # #使用方法coondoubble_data('服务提供者ip','服务提供者port','服务名','调用方法','发送数据') # #'服务提供者ip','服务提供者port','服务名','调用方法'从get_dubbo()返回结果中获取 resp = coondoubble_data(servhost, servport, interface, method, param) print(resp) ```

为什么dubbo provider和consumer使用相同的暴露端口会出错

dubbo默认不配置protocol的话会使用20880端口,所以我没有配置这句 ``` <dubbo:protocol name="dubbo" port="20880"> ``` 然后我使用的是dubbo的注解@Reference和@Service来获取服务端的接口,但是当dubbo的提供者和消费者在不配置protocol默认使用20880端口时,启动之后会报一个错误 ``` Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:20880 Caused by: java.net.BindException: Address already in use: bind ``` 然后我如果在provider指定暴露端口 ``` <dubbo:protocol name="dubbo" port="20990" /> ``` consumer不指定端口,也就是默认使用20880,启动之后就不会报错了,而且也能获取到提供者的接口,想请问下是什么原因。 补充下,我在网上查了下看到有人说要配置qos-server端口,但是我配置完之后也没有用 ``` <!-- 提供方应用信息,用于计算依赖关系,请勿与提供方相同 --> <dubbo:application name="service-consumer"> <dubbo:parameter key="qos.enable" value="true"/> <dubbo:parameter key="qos.accept.foreign.ip" value="false"/> <!-- 报错java.net.BindException: 地址已在使用 问题出现的原因: consumer启动时qos-server也是使用的默认的22222端口,但是这时候端口已经被provider给占用了,所以才会报错的。 解决:指定新端口号 --> <dubbo:parameter key="qos.port" value="33333"/> </dubbo:application> ``` 这是我的配置文件 provider的配置文件: ``` <dubbo:application name="dubbo_provider"/> <dubbo:registry address="zookeeper://127.0.0.1:2181"/> <dubbo:annotation package="com.dubbo"/> ``` provider的接口: ``` @Service public class IProvideServiceImpl implements IProviderService { public String getString(){ return "hello world"; } } ``` consumer的配置文件(添加了spring-mvc): spring配置文件 ``` <dubbo:application name="dubbo_consumer"> <dubbo:parameter key="qos.enable" value="true"/> <dubbo:parameter key="qos.accept.foreign.ip" value="false"/> <dubbo:parameter key="qos.port" value="33333"/> </dubbo:application> <dubbo:registry address="zookeeper://127.0.0.1:2181"></dubbo:registry> ``` spring-mvc配置文件 ``` <dubbo:annotation package="com.dubbo" /> <context:component-scan base-package="com.dubbo"/> <mvc:annotation-driven/> <mvc:default-servlet-handler/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/view/"/> <property name="suffix" value=".jsp"/> </bean> ``` 控制层调用提供者接口 ``` @Controller @RequestMapping("/dubbo") public class ComsumerController { @Reference private IProviderService iProviderService; @ResponseBody @RequestMapping("/hello") public String hello(){ System.out.println("welcome"); String str = iProviderService.getString(); System.out.println(str); return "dubbo"; } } ```

dubbo无法序列化HttpServletRequest问题

dubbo接口中有这样一个方法public Map<String, String> uploadIdImage(HttpServletRequest request) 启动项目调用该接口后报错 nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: uploadIdImage, java.lang.IllegalStateException: Serialized class org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest must implement java.io.Serializable 能看出来是无法反序列化的问题 ,如何能在接口实现类中得到HttpServletRequest 这个对象,正确调用方法。请教大虾,感激不尽

同一个tomcat下部署的多个war包下的dubbo服务无法访问

同一个tomcat下,部署多个war,每个war有自己的dubbo服务提供者,端口是20880,20881,20882,启动后只有20880可以访问到,其他的访问不到。如果tomcat下单独部署任何一个war,这个war的dubbo端口就可以访问到,这是什么原因?

dubbo注册zookeeper问题

dubbo在zookeeper注册,我配置的zookeeper地址是192.168.1.65(测试环境zookeeper),但是dubbo同时在192.168.1.65和192.168.1.195(开发环境的zookeeper)同时都注册了,而且禁用一个,调用的时候,会调用另外一个,麻烦那个高人解答下。

dubbo服务中在consumer中通过autowired方式注入bean失败

dubbo服务中生产者我已经跑起来了,但在consumer中通过autowired方式注入bean失败,网上找了很久以下三点我确定已经做了 1.在实现类上加入@Service 2.在配置文件中加入scan扫描 下面代码我只要注释掉这个UserService的Autowired就能跑起来,感觉就是这个语句的问题,但是不注入UserService就无法调用getUserAddressList,感觉没搭成功,大神帮忙看看,困扰我好久了,谢谢啊 ``` package com.atguigu.gmall.service.impl; import com.atguigu.gmall.bean.UserAddress; import com.atguigu.gmall.service.UserService; import com.atguigu.gmall.service.OrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class OrderServiceImpl implements OrderService { @Autowired UserService userService; @Override public void initOrder(String id){ //查询用户收货地址 System.out.printf(id); List<UserAddress> addressList = userService.getUserAddressList("1"); System.out.println(addressList); } } ``` 消费者配置文件如下 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> <context:component-scan base-package="com.atguigu.gmall.service.impl"></context:component-scan> <dubbo:application name="user-service-consumer"></dubbo:application> <dubbo:registry address="zookeeper://127.0.0.1:2181"></dubbo:registry> <!-- 声明需要调用远程服务的接口 --> <dubbo:reference interface="com.atguigu.gmall.service.UserService" id="userService"></dubbo:reference> </beans> ``` 生产者配置文件如下: ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://dubbo.apache.org/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <!-- 1、指定当前服务/应用的名字(同样的服务名字相同,不要和别的服务同名) --> <dubbo:application name="user-service-provider"></dubbo:application> <!-- 2、指定注册中心的位置 --> <!-- <dubbo:registry address="zookeeper://127.0.0.1:2181"></dubbo:registry> --> <dubbo:registry protocol="zookeeper" address="127.0.0.1:2181"></dubbo:registry> <!-- 3、指定通信规则(通信协议?通信端口) --> <dubbo:protocol name="dubbo" port="20882"></dubbo:protocol> <!-- 4、暴露服务 ref:指向服务的真正的实现对象 --> <dubbo:service interface="com.atguigu.gmall.service.UserService" ref="userServiceImpl" timeout="1000" version="1.0.0"> <dubbo:method name="getUserAddressList" timeout="1000"></dubbo:method> </dubbo:service> <!--统一设置服务提供方的规则 --> <dubbo:provider timeout="1000"></dubbo:provider> <!-- 服务的实现 --> <bean id="userServiceImpl" class="com.atguigu.gmall.service.impl.UserServiceImpl"></bean> <!-- 连接监控中心 --> <dubbo:monitor protocol="registry"></dubbo:monitor> </beans> ``` 具体报错如下 ``` F:\Java\jdk1.8.0_241\bin\java.exe "-javaagent:F:\Java\IntelliJ IDEA 2019.3.4\lib\idea_rt.jar=6493:F:\Java\IntelliJ IDEA 2019.3.4\bin" -Dfile.encoding=UTF-8 -classpath F:\Java\jdk1.8.0_241\jre\lib\charsets.jar;F:\Java\jdk1.8.0_241\jre\lib\deploy.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\access-bridge-64.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\cldrdata.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\dnsns.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\jaccess.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\jfxrt.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\localedata.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\nashorn.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\sunec.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\sunjce_provider.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\sunmscapi.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\sunpkcs11.jar;F:\Java\jdk1.8.0_241\jre\lib\ext\zipfs.jar;F:\Java\jdk1.8.0_241\jre\lib\javaws.jar;F:\Java\jdk1.8.0_241\jre\lib\jce.jar;F:\Java\jdk1.8.0_241\jre\lib\jfr.jar;F:\Java\jdk1.8.0_241\jre\lib\jfxswt.jar;F:\Java\jdk1.8.0_241\jre\lib\jsse.jar;F:\Java\jdk1.8.0_241\jre\lib\management-agent.jar;F:\Java\jdk1.8.0_241\jre\lib\plugin.jar;F:\Java\jdk1.8.0_241\jre\lib\resources.jar;F:\Java\jdk1.8.0_241\jre\lib\rt.jar;F:\Java\IdeaProjects\LearnDubbo\user-service-consumer\target\classes;F:\Java\IdeaProjects\LearnDubbo\gmall-interface\target\classes;F:\apache-maven-3.6.3\myrepo\com\alibaba\dubbo\2.6.2\dubbo-2.6.2.jar;F:\apache-maven-3.6.3\myrepo\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;F:\apache-maven-3.6.3\myrepo\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;F:\apache-maven-3.6.3\myrepo\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;F:\apache-maven-3.6.3\myrepo\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;F:\apache-maven-3.6.3\myrepo\org\apache\zookeeper\zookeeper\3.4.8\zookeeper-3.4.8.jar;F:\apache-maven-3.6.3\myrepo\log4j\log4j\1.2.16\log4j-1.2.16.jar;F:\apache-maven-3.6.3\myrepo\jline\jline\0.9.94\jline-0.9.94.jar;F:\apache-maven-3.6.3\myrepo\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;F:\apache-maven-3.6.3\myrepo\com\google\guava\guava\16.0.1\guava-16.0.1.jar;F:\apache-maven-3.6.3\myrepo\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar;F:\apache-maven-3.6.3\myrepo\org\springframework\spring-context\4.3.16.RELEASE\spring-context-4.3.16.RELEASE.jar;F:\apache-maven-3.6.3\myrepo\org\springframework\spring-aop\4.3.16.RELEASE\spring-aop-4.3.16.RELEASE.jar;F:\apache-maven-3.6.3\myrepo\org\springframework\spring-beans\4.3.16.RELEASE\spring-beans-4.3.16.RELEASE.jar;F:\apache-maven-3.6.3\myrepo\org\springframework\spring-core\4.3.16.RELEASE\spring-core-4.3.16.RELEASE.jar;F:\apache-maven-3.6.3\myrepo\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;F:\apache-maven-3.6.3\myrepo\org\springframework\spring-expression\4.3.16.RELEASE\spring-expression-4.3.16.RELEASE.jar;F:\Java\IdeaProjects\LearnDubbo\user-service-provider\target\classes com.atguigu.gmall.service.MainApplication log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'OrderService': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.atguigu.gmall.service.UserService. No provider available for the service com.atguigu.gmall.service.UserService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=user-service-consumer&dubbo=2.6.2&interface=com.atguigu.gmall.service.UserService&methods=getUserAddressList&pid=9012&register.ip=192.168.1.4&side=consumer&timestamp=1587052183628 to the consumer 192.168.1.4 use dubbo version 2.6.2 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at com.atguigu.gmall.service.MainApplication.main(MainApplication.java:11) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.atguigu.gmall.service.UserService. No provider available for the service com.atguigu.gmall.service.UserService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=user-service-consumer&dubbo=2.6.2&interface=com.atguigu.gmall.service.UserService&methods=getUserAddressList&pid=9012&register.ip=192.168.1.4&side=consumer&timestamp=1587052183628 to the consumer 192.168.1.4 use dubbo version 2.6.2 at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:177) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ... 15 more Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.atguigu.gmall.service.UserService. No provider available for the service com.atguigu.gmall.service.UserService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=user-service-consumer&dubbo=2.6.2&interface=com.atguigu.gmall.service.UserService&methods=getUserAddressList&pid=9012&register.ip=192.168.1.4&side=consumer&timestamp=1587052183628 to the consumer 192.168.1.4 use dubbo version 2.6.2 at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422) at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170) ... 25 more ```

No provider available for the service

zookeeper注册成功,订阅成功,但是却说服务没有提供者。 Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SayHelloTo': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.huatai.usercenter.api.test.SayHelloToClient. No provider available for the service com.huatai.usercenter.api.test.SayHelloToClient from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=hehe_consumer&dubbo=2.8.4&interface=com.huatai.usercenter.api.test.SayHelloToClient&methods=sayHello&pid=4572&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1490171679141 to the consumer 160.6.70.215 use dubbo version 2.8.4 at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:151) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973) at com.test.Consumer.main(Consumer.java:81) Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.huatai.usercenter.api.test.SayHelloToClient. No provider available for the service com.huatai.usercenter.api.test.SayHelloToClient from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=hehe_consumer&dubbo=2.8.4&interface=com.huatai.usercenter.api.test.SayHelloToClient&methods=sayHello&pid=4572&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1490171679141 to the consumer 160.6.70.215 use dubbo version 2.8.4 at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:420) at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138) at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144) ... 6 more

多个service注册到zookeeper,发生冲突。有没有哪位大神遇到过这种错误啊

注册服务到zookeeper能成功,接着注册另一个也成功,只是,前一个服务就报错了,两个服务注册的先后顺序调换,也出现一样的问题。 就好像二者发生了冲突,但他们的端口号是不同的。 com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.25.1:20885/cn.e3mall.content.service.ContentCategoryService?anyhost=true&application=e3-content-service&channel.readonly.sent=true&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=cn.e3mall.content.service.ContentCategoryService&methods=getContentCategoryList&pid=11044&revision=0.0.1-SNAPSHOT&side=provider&timestamp=1519640033133) Failed to bind NettyServer on /192.168.25.1:20885, cause: Failed to bind to: /0.0.0.0:20885 at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:289) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:266) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:253) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56) at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153) at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:485) at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281) at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242) at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143) at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:336) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:877) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3800) at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1411) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1384) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360) at java.lang.Thread.run(Thread.java:748) Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.25.1:20885, cause: Failed to bind to: /0.0.0.0:20885 at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:72) at com.alibaba.dubbo.remoting.transport.netty.NettyServer.<init>(NettyServer.java:63) at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:33) at com.alibaba.dubbo.remoting.Transporter$Adpative.bind(Transporter$Adpative.java) at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:48) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:41) at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:63) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:287) ... 38 more Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:20885 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:94) 26-Feb-2018 18:13:53.433 严重 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:67) 26-Feb-2018 18:13:53.434 严重 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors ... 45 more Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290) at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

华为初面+综合面试(Java技术面)附上面试题

华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

win10暴力查看wifi密码

刚才邻居打了个电话说:喂小灰,你家wifi的密码是多少,我怎么连不上了。 我。。。 我也忘了哎,就找到了一个好办法,分享给大家: 第一种情况:已经连接上的wifi,怎么知道密码? 打开:控制面板\网络和 Internet\网络连接 然后右击wifi连接的无线网卡,选择状态 然后像下图一样: 第二种情况:前提是我不知道啊,但是我以前知道密码。 此时可以利用dos命令了 1、利用netsh wlan...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

!大部分程序员只会写3年代码

如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

Python爬虫,高清美图我全都要(彼岸桌面壁纸)

爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

美团面试,问了ThreadLocal原理,这个回答让我通过了

他想都想不到,ThreadLocal我烂熟于心

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

程序员是做全栈工程师好?还是专注一个领域好?

昨天,有位大一的同学私信我,说他要做全栈工程师。 我一听,这不害了孩子么,必须制止啊。 谁知,讲到最后,更确定了他做全栈程序员的梦想。 但凡做全栈工程师的,要么很惨,要么很牛! 但凡很牛的,绝不是一开始就是做全栈的! 全栈工程师听起来好听,但绝没有你想象的那么简单。 今天听我来给你唠,记得帮我点赞哦。 一、全栈工程师的职责 如果你学习编程的目的只是玩玩,那随意,想怎么学怎么学。...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

立即提问
相关内容推荐