Dubbo 简单环境搭建

本文旨在搭建dubbo 基础演示示例,并使用dubbo Admin进行管理。

一、dubbo-admin:

下载地址:https://github.com/apache/incubator-dubbo-ops

执行命令:

cd incubator-dubbo-ops && mvn package

打包成功:

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dubbo-registry-simple ---
[INFO] Building jar: D:\code\incubator-dubbo-ops-master\dubbo-registry-simple\target\dubbo-registry-simple-2.0.0.jar
[INFO]
[INFO] --- maven-dependency-plugin:2.10:unpack (unpack) @ dubbo-registry-simple ---
[INFO] Configured Artifact: com.alibaba:dubbo:2.6.0:jar
[INFO] Unpacking C:\Users\root\.m2\repository\com\alibaba\dubbo\2.6.0\dubbo-2.6.0.jar to D:\code\incubator-dubbo-ops-master\dubbo-registry-simple\target\dubbo with includes "META-INF/assembly/**" and excludes ""
[INFO]
[INFO] --- maven-assembly-plugin:2.6:single (make-assembly) @ dubbo-registry-simple ---
[INFO] Building tar: D:\code\incubator-dubbo-ops-master\dubbo-registry-simple\target\dubbo-registry-simple-2.0.0-assembly.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] dubbo-ops .......................................... SUCCESS [  0.008 s]
[INFO] dubbo-admin ........................................ SUCCESS [03:27 min]
[INFO] dubbo-monitor-simple ............................... SUCCESS [01:33 min]
[INFO] dubbo-registry-simple .............................. SUCCESS [  3.709 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:07 min
[INFO] Finished at: 2018-05-31T13:31:48+08:00
[INFO] Final Memory: 21M/251M
[INFO] ------------------------------------------------------------------------

得到WAR包,放置到Tomcat工程中。

http://localhost:8080/dubbo-admin-2.0.0/  用户名密码都是root

二、zookeeper:

下载地址:http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.12/

新建zoo.cfg文件,内容如下:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=D:\soft\\zookeeper-3.4.12\# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

在conf目录下,新增data目录,并创建myid文件,内容为1

启动zookeeper

zkServer.cmd

查看启动情况:

PS D:\soft\zookeeper-3.4.12\bin> jps -l -v
14388 org.apache.catalina.startup.Bootstrap -Djava.util.logging.config.file=D:\soft\apache-tomcat-9.0.8\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dignore.endorsed.dirs= -Dcatalina.base=D:\soft\apache-tomcat-9.0.8 -Dcatalina.home=D:\soft\apache-tomcat-9.0.8 -Djava.io.tmpdir=D:\soft\apache-tomcat-9.0.8\temp
17428 org.apache.zookeeper.server.quorum.QuorumPeerMain -Dzookeeper.log.dir=D:\soft\zookeeper-3.4.12\bin\.. -Dzookeeper.root.logger=INFO,CONSOLE
12328 sun.tools.jps.Jps -Denv.class.path=.;C:\Program Files\Java\jdk1.8.0_121\lib\dt.jar;C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar; -Dapplication.home=C:\Program Files\Java\jdk1.8.0_121 -Xms8m
PS D:\soft\zookeeper-3.4.12\bin> .\zkCli.cmd 127.0.0.1:2181
Connecting to localhost:2181
[myid:] - INFO  [main:[email protected]] - Client environment:zookeeper.version=3.4.12-e5259e437540f349646870ea94dc2658c4e44b3b, built on 03/27/2018 03:55 GMT
[myid:] - INFO  [main:[email protected]] - Client environment:host.name=DESKTOP-FL8DUN9
[myid:] - INFO  [main:[email protected]] - Client environment:java.version=1.8.0_121
[myid:] - INFO  [main:[email protected]] - Client environment:java.vendor=Oracle Corporation
[myid:] - INFO  [main:[email protected]] - Client environment:java.home=C:\Program Files\Java\jdk1.8.0_121\jre
[myid:] - INFO  [main:[email protected]] - Client environment:java.class.path=D:\soft\zookeeper-3.4.12\bin\..\build\classes;D:\soft\zookeeper-3.4.12\bin\..\build\lib\*;D:\soft\zookeeper-3.4.12\bin\..\zookeeper-3.4.12.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\audience-annotations-0.5.0.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\jline-0.9.94.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\log4j-1.2.17.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\netty-3.10.6.Final.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\slf4j-api-1.7.25.jar;D:\soft\zookeeper-3.4.12\bin\..\lib\slf4j-log4j12-1.7.25.jar;D:\soft\zookeeper-3.4.12\bin\..\conf
[myid:] - INFO  [main:[email protected]] - Client environment:java.library.path=C:\Program Files\Java\jdk1.8.0_121\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\VanDyke Software\Clients\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\soft\apache-maven-3.3.9\bin;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Program Files\Java\jdk1.8.0_121\jre\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Users\root\AppData\Local\Microsoft\WindowsApps;;.

查看dubbo界面,zookeeper已经正常启动

三、配置Provider和Consumer服务

1.provider

修改dubbo-demo-provider.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">

    <!-- provider‘s application name, used for tracing dependency relationship -->
    <dubbo:application name="demo-provider"/>

    <!-- use multicast registry center to export service -->
    <!--dubbo:registry address="multicast://224.5.6.7:1234"/ -->
    <dubbo:registry address="zookeeper://localhost:2181"/>

    <!-- use dubbo protocol to export service on port 20880 -->
    <dubbo:protocol name="dubbo" port="20881"/>

    <!-- service implementation, as same as regular local bean -->
    <bean id="demoService" class="com.alibaba.dubbo.demo.provider.DemoServiceImpl"/>

    <!-- declare the service interface to be exported -->
    <dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoService"/>

</beans>

直接run application  

2. Consumer

修改dubbo-demo-consumer.xml

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">

    <!-- consumer‘s application name, used for tracing dependency relationship (not a matching criterion),
    don‘t set it same as provider -->
    <dubbo:application name="demo-consumer"/>

    <!-- use multicast registry center to discover service -->
    <dubbo:registry address="zookeeper://localhost:2181"/>

    <!-- generate proxy for the remote service, then demoService can be used in the same way as the
    local regular interface -->
    <dubbo:reference id="demoService" check="false" interface="com.alibaba.dubbo.demo.DemoService"/>

</beans>

同样的方法,启动consumer.

main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Subscribe: consumer://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=providers,configurators,routers&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Notify urls for subscribe url consumer://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=providers,configurators,routers&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394, urls: [dubbo://169.254.115.251:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=demo-provider&dubbo=2.6.2-SNAPSHOT&generic=false&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=19864&side=provider&timestamp=1527754536385, dubbo://169.254.115.251:20881/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=demo-provider&dubbo=2.6.2-SNAPSHOT&generic=false&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=20060&side=provider&timestamp=1527755394676, empty://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=configurators&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394, empty://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=routers&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO transport.AbstractClient:  [DUBBO] Successed connect to server /169.254.115.251:20880 from NettyClient 169.254.115.251 using dubbo version 2.6.2-SNAPSHOT, channel is NettyChannel [channel=[id: 0x56d1d547, /169.254.115.251:64543 => /169.254.115.251:20880]], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO transport.AbstractClient:  [DUBBO] Start NettyClient DESKTOP-FL8DUN9/169.254.115.251 connect to the server /169.254.115.251:20880, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO transport.AbstractClient:  [DUBBO] Successed connect to server /169.254.115.251:20881 from NettyClient 169.254.115.251 using dubbo version 2.6.2-SNAPSHOT, channel is NettyChannel [channel=[id: 0x677eab21, /169.254.115.251:64544 => /169.254.115.251:20881]], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO transport.AbstractClient:  [DUBBO] Start NettyClient DESKTOP-FL8DUN9/169.254.115.251 connect to the server /169.254.115.251:20881, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
main  INFO config.AbstractConfig:  [DUBBO] Refer dubbo service com.alibaba.dubbo.demo.DemoService from url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=demo-consumer&check=false&dubbo=2.6.2-SNAPSHOT&generic=false&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&register.ip=169.254.115.251&remote.timestamp=1527754536385&side=consumer&timestamp=1527755444394, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880Hello world, response from provider: 169.254.115.251:20880

Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20880

 

四、Admin基础操作

禁用服务:20880

[31/05/18 04:37:44:044 CST] main-EventThread  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Notify urls for subscribe url consumer://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=providers,configurators,routers&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394, urls: [override://169.254.115.251:20880/com.alibaba.dubbo.demo.DemoService?category=configurators&disabled=true&dynamic=false&enabled=true, override://169.254.115.251:20880/com.alibaba.dubbo.demo.DemoService?category=configurators&dynamic=false&enabled=true&weight=50], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
[31/05/18 04:37:44:044 CST] main-EventThread  INFO netty.NettyChannel:  [DUBBO] Close netty channel [id: 0x1ddf4070, /169.254.115.251:64661 => /169.254.115.251:20880], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
[31/05/18 04:37:44:044 CST] DubboSharedHandler-thread-2  INFO dubbo.DubboProtocol:  [DUBBO] disconnected from /169.254.115.251:20880,url:dubbo://169.254.115.251:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=demo-consumer&check=false&codec=dubbo&dubbo=2.6.2-SNAPSHOT&generic=false&heartbeat=60000&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&register.ip=169.254.115.251&remote.timestamp=1527754536385&side=consumer&timestamp=1527755444394&weight=50, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881

启动服务:20880

[31/05/18 04:35:47:047 CST] main-EventThread  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Notify urls for subscribe url consumer://169.254.115.251/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=providers,configurators,routers&check=false&dubbo=2.6.2-SNAPSHOT&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=18152&qos.port=33333&side=consumer&timestamp=1527755444394, urls: [override://169.254.115.251:20880/com.alibaba.dubbo.demo.DemoService?category=configurators&dynamic=false&enabled=true&weight=50], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
[31/05/18 04:35:47:047 CST] main-EventThread  INFO transport.AbstractClient:  [DUBBO] Successed connect to server /169.254.115.251:20880 from NettyClient 169.254.115.251 using dubbo version 2.6.2-SNAPSHOT, channel is NettyChannel [channel=[id: 0x1ddf4070, /169.254.115.251:64661 => /169.254.115.251:20880]], dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
[31/05/18 04:35:47:047 CST] main-EventThread  INFO transport.AbstractClient:  [DUBBO] Start NettyClient DESKTOP-FL8DUN9/169.254.115.251 connect to the server /169.254.115.251:20880, dubbo version: 2.6.2-SNAPSHOT, current host: 169.254.115.251
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20880
Hello world, response from provider: 169.254.115.251:20881
Hello world, response from provider: 169.254.115.251:20880

五、可能遇到的问题:

Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /169.254.115.251:20880, cause: Failed to bind to: /0.0.0.0:20880
    at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:69)
    at com.alibaba.dubbo.remoting.transport.netty.NettyServer.<init>(NettyServer.java:61)
    at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:32)
    at com.alibaba.dubbo.remoting.Transporter$Adaptive.bind(Transporter$Adaptive.java)
    at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:56)
    at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:44)
    at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:70)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:285)
    ... 26 more
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:20880
    at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
    at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:94)
    at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:63)
    ... 33 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(Unknown Source)
    at sun.nio.ch.Net.bind(Unknown Source)
    at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
    at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
    at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
<!-- use dubbo protocol to export service on port 20880 -->
<dubbo:protocol name="dubbo" port="20881"/>

 六、参考链接

1. 管理控制台运维:http://dubbo.apache.org/books/dubbo-admin-book/ops/dubbo-ops.html

2. https://github.com/nomico271/DatatablesDemo

七、附录

Dubbo整个工程:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] dubbo-parent ....................................... SUCCESS [  4.811 s]
[INFO] Hessian Lite(Alibaba embed version) ................ SUCCESS [  8.586 s]
[INFO] dubbo-common ....................................... SUCCESS [ 11.352 s]
[INFO] dubbo-container .................................... SUCCESS [  0.146 s]
[INFO] dubbo-container-api ................................ SUCCESS [  1.299 s]
[INFO] dubbo-container-spring ............................. SUCCESS [ 33.207 s]
[INFO] dubbo-container-log4j .............................. SUCCESS [  2.283 s]
[INFO] dubbo-container-logback ............................ SUCCESS [ 13.599 s]
[INFO] dubbo-serialization ................................ SUCCESS [  0.193 s]
[INFO] dubbo-serialization-api ............................ SUCCESS [  2.761 s]
[INFO] dubbo-serialization-hessian2 ....................... SUCCESS [  3.632 s]
[INFO] dubbo-remoting ..................................... SUCCESS [  0.135 s]
[INFO] dubbo-remoting-api ................................. SUCCESS [  5.654 s]
[INFO] dubbo-remoting-netty ............................... SUCCESS [  3.003 s]
[INFO] dubbo-remoting-mina ................................ SUCCESS [  9.026 s]
[INFO] dubbo-remoting-grizzly ............................. SUCCESS [ 22.080 s]
[INFO] dubbo-remoting-p2p ................................. SUCCESS [  2.649 s]
[INFO] dubbo-remoting-http ................................ SUCCESS [01:10 min]
[INFO] dubbo-remoting-zookeeper ........................... SUCCESS [ 47.235 s]
[INFO] dubbo-remoting-netty4 .............................. SUCCESS [ 27.243 s]
[INFO] dubbo-rpc .......................................... SUCCESS [  0.415 s]
[INFO] dubbo-rpc-api ...................................... SUCCESS [  4.839 s]
[INFO] dubbo-rpc-dubbo .................................... SUCCESS [  4.062 s]
[INFO] dubbo-rpc-injvm .................................... SUCCESS [  2.573 s]
[INFO] dubbo-rpc-rmi ...................................... SUCCESS [  2.481 s]
[INFO] dubbo-rpc-hessian .................................. SUCCESS [ 12.637 s]
[INFO] dubbo-rpc-http ..................................... SUCCESS [ 14.609 s]
[INFO] dubbo-rpc-webservice ............................... SUCCESS [ 47.648 s]
[INFO] dubbo-cluster ...................................... SUCCESS [  4.687 s]
[INFO] dubbo-registry ..................................... SUCCESS [  0.115 s]
[INFO] dubbo-registry-api ................................. SUCCESS [  3.163 s]
[INFO] dubbo-monitor ...................................... SUCCESS [  0.090 s]
[INFO] dubbo-monitor-api .................................. SUCCESS [  2.316 s]
[INFO] dubbo-filter ....................................... SUCCESS [  0.092 s]
[INFO] dubbo-filter-validation ............................ SUCCESS [  4.707 s]
[INFO] dubbo-filter-cache ................................. SUCCESS [02:53 min]
[INFO] dubbo-registry-default ............................. SUCCESS [  4.062 s]
[INFO] dubbo-monitor-default .............................. SUCCESS [  3.153 s]
[INFO] dubbo-registry-multicast ........................... SUCCESS [  3.263 s]
[INFO] dubbo-serialization-jdk ............................ SUCCESS [  3.538 s]
[INFO] dubbo-config ....................................... SUCCESS [  0.116 s]
[INFO] dubbo-config-api ................................... SUCCESS [ 24.591 s]
[INFO] dubbo-bootstrap .................................... SUCCESS [  1.403 s]
[INFO] dubbo-config-spring ................................ SUCCESS [ 19.871 s]
[INFO] dubbo-rpc-thrift ................................... SUCCESS [ 15.072 s]
[INFO] dubbo-rpc-memcached ................................ SUCCESS [ 10.928 s]
[INFO] dubbo-rpc-redis .................................... SUCCESS [ 13.896 s]
[INFO] dubbo-rpc-rest ..................................... SUCCESS [ 38.378 s]
[INFO] dubbo-registry-zookeeper ........................... SUCCESS [  2.759 s]
[INFO] dubbo-registry-redis ............................... SUCCESS [ 50.612 s]
[INFO] dubbo-demo ......................................... SUCCESS [  0.081 s]
[INFO] dubbo-demo-api ..................................... SUCCESS [  0.898 s]
[INFO] dubbo-demo-provider ................................ SUCCESS [  1.367 s]
[INFO] dubbo-demo-consumer ................................ SUCCESS [  1.448 s]
[INFO] dubbo-plugin ....................................... SUCCESS [  0.097 s]
[INFO] dubbo-qos .......................................... SUCCESS [ 10.754 s]
[INFO] dubbo-serialization-fastjson ....................... SUCCESS [  2.624 s]
[INFO] dubbo-serialization-kryo ........................... SUCCESS [  3.611 s]
[INFO] dubbo-serialization-fst ............................ SUCCESS [  3.787 s]
[INFO] dubbo-dependencies-bom ............................. SUCCESS [  0.062 s]
[INFO] dubbo-bom .......................................... SUCCESS [  0.018 s]
[INFO] dubbo-all .......................................... SUCCESS [09:06 min]
[INFO] dubbo-test ......................................... SUCCESS [  0.552 s]
[INFO] dubbo-test-benchmark ............................... SUCCESS [01:03 min]
[INFO] dubbo-test-compatibility ........................... SUCCESS [  0.451 s]
[INFO] dubbo-test-spring3 ................................. SUCCESS [ 25.034 s]
[INFO] dubbo-test-integration ............................. SUCCESS [  0.302 s]
[INFO] dubbo-test-examples ................................ SUCCESS [  6.596 s]

  

原文地址:https://www.cnblogs.com/FrankZhou2017/p/9116243.html

时间: 2024-10-10 04:31:55

Dubbo 简单环境搭建的相关文章

dubbo简单环境搭建

简单环境搭建 搭建工具 jdk1.8+idea+maven+spring 构建多模块 dubbo_par 父模块 父模块中pom.xml引入dubbo坐标 <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>2.5.6</version></dependency> dubbo_api 服务公共接口

【2020-03-21】Dubbo本地环境搭建-实现服务注册和消费

前言 本周主题:加班工作.本周内忙于CRUD不能自拔,基本每天都是九点半下班,下周上线,明天还要加班推进进度.今天是休息日,于是重拾起了dubbo,打算近期深入了解一下其使用和原理.之所以说是重拾,是因为去年自学过一次,但那次主要是针对源码的流程,在实战上欠缺,且对其理解未深入到架构层次,只能说是基本理解.现在的我跟去年比起来,对技术的理解上有了一些提升,经验也更丰富,故本次目标是做深入研究,且看能从中吸收多少要义. 今天先记录一下dubbo本地服务的简易搭建流程. 一.环境准备 本次搭建用zo

Dubbo简介-环境搭建

一.简介: 1. 什么是RPC: RPC[Remote Procedure Call]是指远程调用过程,是一种进程间通信方式,它是一种技术的思想,而不是规范.它允许程序调用另一个地址空间(通常在共享网络的另一台服务器上)的过程或函数,而不是程序员显示编码这个远程调用的细节.即程序员无论是调用本地还是远程的函数,本质上编写的调用代码基本相同. RPC有两个核心:通讯.序列化. RPC框架有很多:dubbo.gRPC.Thrift.HSF(High Seep Service Framework) 2

dubbo分布式系统---环境搭建

分布式系统的特点:1.面向接口代理的高性能RPC调用:A服务调用B服务器的接口,直接调用即可.其中使用zookeeper注册中心进行关联)2.智能的负载均衡:服务器与服务器之间实现分流处理,解决并发问题.3.运行期间实现流量调度:灰度发布(例:在生产环境发布时,可先更新一部分服务器的代码,后稳定运行后,再更新另一部分服务器的代码) 下边整理了一下分布式架构的流程图,大致如下图:下边开始搭建dubbo服务:1.首先需要搭建注册中心,dubbo官方推荐使用zookeeper,这里搭建的也是zooke

GitLab+本地Nginx简单环境搭建

最近找工作,闲着逛github就看到gitlab这么个东西,说是比github功能多些.所以果断去官网看了看,然后在自己的虚拟机上简单搭建了一个. gitlab官网:https://about.gitlab.com/ 环境:centos6.9    nginx/1.14.0 我选择的是免费的那个,官网的安装步骤写的很明白,只要按照要求复制粘贴官网的命令就可以了.邮箱和域名可以不用管. 安装好之后服务是会启动.但是如果你的服务器上有进程占用了80端口(我的是因为自己的nginx占用),那么服务是启

dubbo开发环境搭建与tomcat集成、DEMO示例(最完整版本、带管理控制台、监控中心、zookeeper)

以windows为例,linux基本相同,开发环境一般linux,个人环境一般windows(如果不开额外vm的话). 示例以dubbo官方自带demo为例子,进行整合和稍加修改测试. 0.dubbox是dubbo的当当fork版本,特性上最主要是集成了REST.就核心功能而言,dubbo和大部分其他rpc框架比如spring cloud类似,由客户端.服务端.服务注册与发现中心.监控中心以及管理中心组成.如下: 1.安装zookeeper,从https://zookeeper.apache.o

vue + webpack + gulp 简单环境 搭建

一.物料准备 废话不多说,直接上 package.json { "name": "vwp", "version": "1.0.0", "description": "vue test", "main": "index.js", "dependencies": { "vue": "^1.0.26&qu

JavaEE Maven简单环境搭建

软件152 蒲双 一.下载 1.jdk1.8.zip(1.7以上为最佳): 2.eclipse-jee-mars-2.zip: 3.maven 3.3.9.zip: 4.maven仓库(.m2文件) 二.安装(解压) 1.选择一个工作盘,如 E:盘,建立目录 jee(这里根据自己的意愿建立目录,本人以建立 jee 为例: 2.将压缩包放到jee目录下,并解压,Jdk根目录为 E:\jee\jdk1.8:eclipse根目录为 E:\jee\eclipse,eclipse,工作目录为E:\jee\

Dubbo分布式环境搭建测试(依赖mybatis,spring,druid)

此文档针对初学者. 废话不多说,先上源码: http://git.oschina.net/alexgaoyh/Dubbo-parent http://git.oschina.net/alexgaoyh/Dubbo-parent/attach_files Maven项目,只需要注意下图中红色箭头标注的三个模块即可: Dubbo-api: API接口,被 Dubbo-test-provider(服务提供者),Dubbo-test-consumer(服务消费者)依赖: Dubbo-api 模块没什么多