zookeeper,dubbo服务注册,消费者调用为null

启动dubbo服务注册是zkdebug异常显示,node null
图片说明
下面是我的dubbo配置,应该是没问题的,其他模块多事没有问题的图片说明图片说明麻烦各路大神帮忙看看

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
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服务端有返回,客户端接收到null的问题【紧急】

### 现象 服务端日志已经显示返回结果,结果为自定义对象 格式如下: ``` AcctQueryFacadeImpl.acctBalanceQuery00, resp=AcctBalanceQuery00Resp[uid=1355739,acctStatus=N,createTime=Fri Mar 04 21:36:31 CST 2016,updateTime=Wed Apr 20 19:52:24 CST 2016,acctId=4985191,balance=0,frozenBalance=0,withdrawBalance=0,respDesc=成功,respCode=000000], time=2ms ``` 客户端接收到的对象为null 该现象并不是必现, - 现象1:调用acctBalanceQuery00方法一天有几十万次,目前出现问题的仅3例 - 现象2:有2条失败数据,重试之后,1条成功,1条仍然失败 - 现象3:很多业务调用acctBalanceQuery00方法,但目前只有1个业务出问题,这些业务入参基本一样,(此现象也许是巧合) - 现象4:用dubbo telnet invoke acctBalanceQuery00方法,有结果返回,用出问题的数据invoke,也有结果返回,所有机器都试过 ### 环境 jdk1.8 dubbo版本 2.5.3 服务端4台,客户端10台左右 dubbo服务端配置如下: ``` <dubbo:application name="xxx" owner="yy"/> <dubbo:registry protocol="zookeeper" client="zkclient" address="${dubbo.zk.servers}" group="${dubbo.zk.group}"></dubbo:registry> <dubbo:protocol name="dubbo" port="20909"></dubbo:protocol> <dubbo:provider retries="0" timeout="6000"></dubbo:provider> <dubbo:service interface="xxxx" ref="xxx"></dubbo:service> ``` dubbo消费端配置: ``` <dubbo:application name="${application.name}" owner="${dubbo.application.owner}"/> <dubbo:registry protocol="zookeeper" client="zkclient" address="${dubbo.zk.servers}" group="${dubbo.zk.group}"></dubbo:registry> <dubbo:protocol name="dubbo" port="${dubbo.protocol.port}"></dubbo:protocol> <dubbo:monitor address="${dubbo.monitor.address}"></dubbo:monitor> <dubbo:consumer retries="0" timeout="6000" check="false"></dubbo:consumer> ```

dubbo webservice 调用

**项目原来用的是cxf 的webservice接口,需要集成dubbo系统。根据配置浏览器可以访问,但是原程序中,spring mvc的注入对象为null,详细问题如下: web.xml 主要代码** <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath*:/applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!--dubbo 服务根路径--> <servlet> <servlet-name>dubbo</servlet-name> <servlet-class> com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dubbo</servlet-name> <url-pattern>/webservice/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>SearchEngine</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <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> <servlet-name>SearchEngine</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener </listener-class> </listener> **provider.xml** <dubbo:application name="dubbo-webservice-provider" /> <!-- registry address, used for service to register itself --> <dubbo:registry address="zookeeper://127.0.0.1:2181" /> <!-- 用webservice协议在8181端口暴露服务 --> <dubbo:protocol name="webservice" port="8181" server="servlet" /> <dubbo:service interface="com.chinasofti.searchengine.webservice.server.searchService.SearchService" ref="demoWSService" /> <bean id="demoWSService" class="com.chinasofti.searchengine.webservice.server.searchService.impl.SearchServiceImpl" /> **consumer.xml** <dubbo:application name="consumer" /> <!-- registry address, used for consumer to discover services --> <dubbo:registry address="zookeeper://127.0.0.1:2181" /> <dubbo:consumer timeout="5000"/> <!-- which service to consume? --> <dubbo:reference id="demoWSService" interface="com.chinasofti.searchengine.webservice.server.searchService.SearchService" url="webservice://192.168.1.25:8181/SearchEngine/webservice/com.chinasofti.searchengine.webservice.server.searchService.SearchService"/> **通过上边的配置,可以在浏览器中访问“http://localhost:8181/SearchEngine/webservice/com.chinasofti.searchengine.webservice.server.searchService.SearchService?wsdl”,可以访问。** **在客户端访问服务主要代码:** URL url = null; try { url = new URL("http://localhost:8181/SearchEngine/webservice/com.chinasofti.searchengine.webservice.server.searchService.SearchService?wsdl"); } catch (MalformedURLException e) { } Service service = new SearchService(url); SearchServicePortType port = ((SearchService) service).getSearchServicePort(); { com.chinasofti.searchengine.webservice.client.ws.SearchModel _searchAll_arg0 = null; com.chinasofti.searchengine.webservice.client.ws.MultConditionsVO _searchAll_arg1 = null; java.lang.String _searchAll__return = port.searchAll(searchModel,vo); } **通过调试,可以调用到服务端代码,但是服务端的spring mvc @Resource标签注入的对象为null。** @Resource(name = "conClassDaoImpl") private ConClassDao conClassDao; **调试时,上边的conClassDao为null。** **项目中调用其他功能spring 标签是可以注入的,也没有问题。 我是在原有的工程中集成dubbo配置的,哪个地方可能导致调用接口是spring 标签注入失败啊?跪求各位大神,谢谢啦!**

配置dubbo-monitor无charts下相关服务统计图

说明:最近搭建dubbo rest技术整合,选用版本zookeeper3.4.6; dubbox-2.8.4a.jar ; dubbo-admin-2.8.4; dubbo-monitor-2.8.4; 环境介绍完毕。 前期zookeeper集群,dubbo-admin控制台,以及demo一切顺利;但是后来需求决定,要增加对服务端监控,于是搭建dubbo-monitor监控中心系统。搭建后服务一切正常,但是唯独,没有monitor下服务监控统计数据,通过日志,发现后台每次调用monitorService获取数据是会出现错误。网上找了好多资料,也没有找到正确答案,现寻求哪位大神指点,万分感激! 注:我的dubbo-monitor下的相关charts路径都已建好,就是没数据。 错误日志如下: 016-10-28 18:17:05,327 INFO [DubboMonitor.java:80] : [DUBBO] Send statistics to monitor zookeeper://25.0.88.53:2181/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=simple-monitor&check=false&delay=-1&dubbo=2.8.4&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=3164&revision=2.8.4&side=provider&timestamp=1477648050407, dubbo version: 2.8.4, current host: 25.0.86.130 2016-10-28 18:17:05,343 ERROR [DubboMonitor.java:72] : [DUBBO] Unexpected error occur at send statistic, cause: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. Tried 3 times of the providers [25.0.86.130:7070] (1/1) from the registry 25.0.88.53:2181 on the consumer 25.0.86.130 using the dubbo version 2.8.4. Last error is: Failed to invoke remote method: collect, provider: dubbo://25.0.86.130:7070/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=simple-monitor&check=false&delay=-1&dubbo=2.8.4&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=3164&revision=2.8.4&side=provider&timestamp=1477648050407, cause: Fail to decode request due to: RpcInvocation [methodName=collect, parameterTypes=[], arguments=null, attachments={path=com.alibaba.dubbo.monitor.MonitorService, input=682, dubbo=2.8.4, version=0.0.0}], dubbo version: 2.8.4, current host: 25.0.86.130 com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. Tried 3 times of the providers [25.0.86.130:7070] (1/1) from the registry 25.0.88.53:2181 on the consumer 25.0.86.130 using the dubbo version 2.8.4. Last error is: Failed to invoke remote method: collect, provider: dubbo://25.0.86.130:7070/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=simple-monitor&check=false&delay=-1&dubbo=2.8.4&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=3164&revision=2.8.4&side=provider&timestamp=1477648050407, cause: Fail to decode request due to: RpcInvocation [methodName=collect, parameterTypes=[], arguments=null, attachments={path=com.alibaba.dubbo.monitor.MonitorService, input=682, dubbo=2.8.4, version=0.0.0}] at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:108) at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227) at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72) at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) at com.alibaba.dubbo.common.bytecode.proxy2.collect(proxy2.java) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor.send(DubboMonitor.java:113) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$1.run(DubboMonitor.java:70) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.alibaba.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=collect, parameterTypes=[], arguments=null, attachments={path=com.alibaba.dubbo.monitor.MonitorService, input=682, dubbo=2.8.4, version=0.0.0}] at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:190) at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:110) at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:84) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96) at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144) at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74) at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53) at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77) ... 13 more

ssm框架 配合dubbol连接zookeeper 总报错

- (12271 ms) - [INFO] 2017-07-24 02:35:47,439 org.apache.zookeeper.ClientCnxn - Opening socket connection to server 192.168.48.133/192.168.48.133:2181. Will not attempt to authenticate using SASL (unknown error) - (33276 ms) - [WARN] 2017-07-24 02:36:08,444 org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection timed out: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) - (33280 ms) - [DEBUG] 2017-07-24 02:36:08,448 org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown input java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:779) at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:402) at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200) at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170) ``` ``` 总是报这个错误,linux远程连接正常 zookeeper stauts 正常 就是启动提供服务端的时候,报错。。。求大神帮忙解决。。。小弟新手上路。

什么情况会造成dubbo链接中断?

一个手动调用的dubbo服务,调用后,服务端正常执行完了。但是客户端没有接受到任何返回信息。 检查日志后 服务端: 2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Received event: WatchedEvent state:Disconnected type:None path:null 2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] New event: ZkEvent[State changed to Disconnected sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23] 2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Leaving process event 2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #1 ZkEvent[State changed to Disconnected sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23] 2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #1 done 2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Received event: WatchedEvent state:Expired type:None path:null 2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] New event: ZkEvent[State changed to Expired sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23] 2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkConnection]-[DEBUG] Closing ZooKeeper connected to 10.1.10.91:2181,10.1.10.92:2181,10.1.10.93:2181 2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #2 ZkEvent[State changed to Expired sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23] 2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #2 done 2018-12-12 02:51:46 [org.apache.zookeeper.ZooKeeper]-[DEBUG] Close called on already closed client zk日志: 2018-12-12 02:51:46,630 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47124 2018-12-12 02:51:46,637 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47124; will be dropped if server is in r-o mode 2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@935] - Client attempting to renew session 0x365ee3f0f34002c at /10.1.10.47:47124 2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@108] - Revalidating client: 0x365ee3f0f34002c 2018-12-12 02:51:46,639 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@680] - Invalid session 0x365ee3f0f34002c for client /10.1.10.47:47124, probably expired 2018-12-12 02:51:46,640 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1044] - Closed socket connection for client /10.1.10.47:47124 which had sessionid 0x365ee3f0f34002c 2018-12-12 02:52:23,235 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47284 2018-12-12 02:52:23,236 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47284; will be dropped if server is in r-o mode 2018-12-12 02:52:23,238 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@942] - Client attempting to establish new session at /10.1.10.47:47284 2018-12-12 02:52:23,244 [myid:1] - INFO [CommitProcessor:1:ZooKeeperServer@687] - Established session 0x165ee402a7d003d with negotiated timeout 30000 for client /10.1.10.47:47284 ------- 服务端的方法是一个多线程方法,执行期间没有任何报错,想请教大神们一下,什么情况下才会造成dubbo链接的中断?通常这种问题要怎么调整? ------ zkserver端日志 2018-12-12 02:51:46,630 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47124 2018-12-12 02:51:46,637 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47124; will be dropped if server is in r-o mode 2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@935] - Client attempting to renew session 0x365ee3f0f34002c at /10.1.10.47:47124 2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@108] - Revalidating client: 0x365ee3f0f34002c 2018-12-12 02:51:46,639 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@680] - Invalid session 0x365ee3f0f34002c for client /10.1.10.47:47124, probably expired 2018-12-12 02:51:46,640 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1044] - Closed socket connection for client /10.1.10.47:47124 which had sessionid 0x365ee3f0f34002c

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,zookeeper的报错, Failed to invoke the method doLogin

com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method doLogin in the service com.jt.service.DubboUserService. Tried 3 times of the providers [192.168.142.1:20880] (1/1) from the registry 192.168.142.128:2181 on the consumer 192.168.142.1 using the dubbo version 2.6.2. Last error is: Invoke remote method timeout. method: doLogin, provider: dubbo://192.168.142.1:20880/com.jt.service.DubboUserService?anyhost=true&application=consumer-web&check=false&dubbo=2.6.2&generic=false&interface=com.jt.service.DubboUserService&methods=doLogin,insertUser&pid=10968&register.ip=192.168.142.1&remote.timestamp=1566114234721&side=consumer&timeout=3000&timestamp=1566114276413, cause: Waiting server-side response timeout. start time: 2019-08-18 16:07:14.269, end time: 2019-08-18 16:07:17.271, client elapsed: 0 ms, server elapsed: 3002 ms, timeout: 3000 ms, request: Request [id=45, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=doLogin, parameterTypes=[class com.jt.pojo.User], arguments=[User(id=null, username=admin123, password=admin123456, phone=null, email=null)], attachments={path=com.jt.service.DubboUserService, interface=com.jt.service.DubboUserService, version=0.0.0, timeout=3000}]], channel: /192.168.142.1:51995 -> /192.168.142.1:20880 Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2019-08-18 16:07:14.269, end time: 2019-08-18 16:07:17.271, client elapsed: 0 ms, server elapsed: 3002 ms, timeout: 3000 ms, request: Request [id=45, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=doLogin, parameterTypes=[class com.jt.pojo.User], arguments=[User(id=null, username=admin123, password=admin123456, phone=null, email=null)], attachments={path=com.jt.service.DubboUserService, interface=com.jt.service.DubboUserService, version=0.0.0, timeout=3000}]], channel: /192.168.142.1:51995 -> /192.168.142.1:20880 试过把20880端口改掉,防火墙也没开着,代码在教室的电脑能够运行,在我自己的笔记本上就报这个错

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

Java InvocationTargetException!!!

debug出来的~ (public class InvocationTargetException extends ReflectiveOperationException)(下面的代码是debug跳到的部分) ``` /** * Constructs a InvocationTargetException with a target exception. * * @param target the target exception */ public InvocationTargetException(Throwable target) { super((Throwable)null); // Disallow initCause this.target = target; } ``` 请问这个异常是什么原因呢?要怎么解决?

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

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

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

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

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

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

和黑客斗争的 6 天!

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

Linux 会成为主流桌面操作系统吗?

整理 |屠敏出品 | CSDN(ID:CSDNnews)2020 年 1 月 14 日,微软正式停止了 Windows 7 系统的扩展支持,这意味着服役十年的 Windows 7,属于...

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

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

学习总结之HTML5剑指前端(建议收藏,图文并茂)

前言学习《HTML5与CSS3权威指南》这本书很不错,学完之后我颇有感触,觉得web的世界开明了许多。这本书是需要有一定基础的web前端开发工程师。这本书主要学习HTML5和css3,看...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

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

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

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

记一次腾讯面试,我挂在了最熟悉不过的队列上……

腾讯后台面试,面试官问:如何自己实现队列?

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

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

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

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

冒泡排序动画(基于python pygame实现)

本项目效果初始截图如下 动画见本人b站投稿:https://www.bilibili.com/video/av95491382 本项目对应github地址:https://github.com/BigShuang python版本:3.6,pygame版本:1.9.3。(python版本一致应该就没什么问题) 样例gif如下 ======================= 大爽歌作,mad

Redis核心原理与应用实践

Redis核心原理与应用实践 在很多场景下都会使用Redis,但是到了深层次的时候就了解的不是那么深刻,以至于在面试的时候经常会遇到卡壳的现象,学习知识要做到系统和深入,不要把Redis想象的过于复杂,和Mysql一样,是个读取数据的软件。 有一个理解是Redis是key value缓存服务器,更多的优点在于对value的操作更加丰富。 安装 yum install redis #yum安装 b...

现代的 “Hello, World”,可不仅仅是几行代码而已

作者 |Charles R. Martin译者 | 弯月,责编 | 夕颜头图 |付费下载自视觉中国出品 | CSDN(ID:CSDNnews)新手...

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

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

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

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

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

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

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

HTTP与HTTPS的区别

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

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

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

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

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

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

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

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

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

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

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

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

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

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

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

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

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

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

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

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

01、Java入门(Getting Started);02、集成开发环境(IDE);03、项目结构(Eclipse JavaProject);04、类和对象(Classes and Objects);05:词法结构(Lexical Structure);06:数据类型和变量(Data Type and Variables);07:运算符(Operators);08:控制流程语句(Control Flow Statements);

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

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

立即提问
相关内容推荐