Git Product home page Git Product logo

apache / dubbo Goto Github PK

View Code? Open in Web Editor NEW
40.0K 3.1K 26.3K 53.45 MB

The java implementation of Apache Dubbo. An RPC and microservice framework.

Home Page: https://dubbo.apache.org/

License: Apache License 2.0

Java 99.45% Shell 0.10% Batchfile 0.01% Lex 0.01% Mustache 0.40% JavaScript 0.02% Dockerfile 0.01%
dubbo distributed-systems framework java microservices restful rpc grpc http service-mesh

dubbo's Introduction

Apache Dubbo Project

Build and Test For PR Codecov Maven License Average time to resolve an issue Percentage of issues still open

Apache Dubbo is a high-performance, Java-based open-source RPC framework. Please visit the official site for the quick start guide and documentation, as well as the wiki for news, FAQ, and release notes.

We are now collecting Dubbo user info to help us to improve Dubbo further. Kindly support us by providing your usage information on Wanted: who's using dubbo, thanks :)

Architecture

Architecture

Features

  • Transparent interface based RPC
  • Intelligent load balancing
  • Automatic service registration and discovery
  • High extensibility
  • Runtime traffic routing
  • Visualized service governance

Getting started

The following code snippet comes from Dubbo Samples. You may clone the sample project and step into the dubbo-samples-api subdirectory before proceeding.

git clone https://github.com/apache/dubbo-samples.git
cd dubbo-samples/1-basic/dubbo-samples-api

There's a README file under dubbo-samples-api directory. We recommend referencing the samples in that directory by following the below-mentioned instructions:

Maven dependency

<properties>
    <dubbo.version>3.2.13-SNAPSHOT</dubbo.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo</artifactId>
        <version>${dubbo.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-dependencies-zookeeper</artifactId>
        <version>${dubbo.version}</version>
        <type>pom</type>
    </dependency>
</dependencies>

Define service interfaces

package org.apache.dubbo.samples.api;

public interface GreetingsService {
    String sayHi(String name);
}

See api/GreetingsService.java on GitHub.

Implement service interface for the provider

package org.apache.dubbo.samples.provider;

import org.apache.dubbo.samples.api.GreetingsService;

public class GreetingsServiceImpl implements GreetingsService {
    @Override
    public String sayHi(String name) {
        return "hi, " + name;
    }
}

See provider/GreetingsServiceImpl.java on GitHub.

Start service provider

package org.apache.dubbo.samples.provider;


import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.ServiceConfig;
import org.apache.dubbo.samples.api.GreetingsService;

import java.util.concurrent.CountDownLatch;

public class Application {
    private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");

    public static void main(String[] args) throws Exception {
        ServiceConfig<GreetingsService> service = new ServiceConfig<>();
        service.setApplication(new ApplicationConfig("first-dubbo-provider"));
        service.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
        service.setInterface(GreetingsService.class);
        service.setRef(new GreetingsServiceImpl());
        service.export();

        System.out.println("dubbo service started");
        new CountDownLatch(1).await();
    }
}

See provider/Application.java on GitHub.

Build and run the provider

mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.provider.Application exec:java

Call remote service in the consumer

package org.apache.dubbo.samples.client;


import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.samples.api.GreetingsService;

public class Application {
    private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");

    public static void main(String[] args) {
        ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
        reference.setApplication(new ApplicationConfig("first-dubbo-consumer"));
        reference.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
        reference.setInterface(GreetingsService.class);
        GreetingsService service = reference.get();
        String message = service.sayHi("dubbo");
        System.out.println(message);
    }
}

See client/Application.java on GitHub.

Build and run the consumer

mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.client.Application exec:java

The consumer will print out hi, dubbo on the screen.

Next steps

Building

If you want to try out the cutting-edge features, you can build with the following commands. (Java 1.8 is needed to build the master branch)

  mvn clean install

Recommended Test Environment

To avoid intermittent test failures (i.e., flaky tests), it is recommended to have a machine or virtual machine with the following specifications:

  • Minimum of 2CPUs.
  • Minimum of 2Gb of RAM.

How does the Dubbo Community collaborate?

The Dubbo Community primarily communicates on GitHub through issues, discussions, and pull requests.

  • Issues: We use issues to track bugs and tasks. Any work-related item is associated with an issue.
  • Discussions: We use discussions for questions, early proposals, and announcements. Any idea-related item is associated with a discussion.
  • Pull Requests: We use pull requests to merge a set of changes from contributors into Dubbo.

We have also implemented a project board to monitor all the items.

Any essential changes should be discussed on the mailing list before they happen.

Seeking for help

If you have questions such as:

  • What is Dubbo?
  • How do I use Dubbo?
  • Why did an unexpected result occur?

Please start a discussion at https://github.com/apache/dubbo/discussions.

However, if you encounter the following situations:

  • You're certain there's a bug that Dubbo needs to fix,
  • You believe a feature could be enhanced,
  • You have a detailed proposal for improving Dubbo,

Please open an issue at https://github.com/apache/dubbo/issues.

To ask effective questions, we recommend reading How To Ask Questions The Smart Way first.

Contribution

  • Browse the "help wanted" tasks in the Dubbo project board.
  • Participate in discussions on the mailing list. See the subscription guide.
  • Respond to queries in the discussions.
  • Resolve bugs reported in issues and send us a pull request.
  • Review existing pull requests.
  • Enhance the website. We typically need:
    • Blog posts
    • Translations for documentation
    • Use cases showcasing Dubbo integration in enterprise systems.
  • Improve the dubbo-admin.
  • Contribute to the projects listed in the ecosystem.
  • Any other forms of contribution not listed above are also welcome.
  • If you're interested in contributing, please send an email to [email protected] to let us know!

For further details, please refer our guide about how to contribute Dubbo.

Reporting bugs

Please follow the template for reporting any issues.

Reporting a security vulnerability

Please report security vulnerabilities to us privately.

Contact

Dubbo ecosystem

Language

License

Apache Dubbo software is licensed under the Apache License Version 2.0. See the LICENSE file for details.

dubbo's People

Contributors

albumenj avatar beiwei30 avatar burningcn avatar carryxyh avatar chickenlj avatar conghuhu avatar crazyhzm avatar cvictory avatar dependabot[bot] avatar earthchen avatar guohao avatar hengyunabc avatar htynkn avatar icodening avatar jerrick-zhu avatar kylixs avatar liangfei0201 avatar lovepoem avatar mercyblitz avatar oldratlee avatar pinxiong avatar qinliujie avatar ralf0131 avatar songxiaosheng avatar suncairong163 avatar tswstarplanet avatar wangchengming666 avatar win120a avatar wxbty avatar zrlw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dubbo's Issues

build failed, code.alibabatech.com problem?

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.alibaba:dubbo-parent:2.5.4-SNAPSHOT (E:\workspace\dubb
o\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact com.alibaba:o
pensesame:pom:2.0 from/to opensesame.releases (http://code.alibabatech.com/mvn/r
eleases): Connection to http://code.alibabatech.com refused and 'parent.relative
Path' points at wrong local POM @ line 19, column 10: Connection refused: connec
t -> [Help 2]

支持zookeeper3.4

zookeeper3.3.3是很早之前的版本了,昨天测试了一下,发现使用3.4.6版本的注册中心无法正常工作。

而且 zookeeper的客户端zkclient和curator都升级了,curator还进入了apache,希望能做一下支持。

浮点型精度变化bug

dubbo远程调用带HashMap参数时,如果HashMap中的值是float类型,那么在provider方接受到的对应参数值将发生变化。
例如,rpc请求发送参数:
HashMap<String, Object> contentMap = new HashMap<String, Object>();
contentMap.put("price", Float.valueOf(21.32f));
那么在provider方接受到的对应的“price”值为:21.31999969482422。
我们对这个问题的修改方案是在BasicSerializer类的writeObject方法的FLOAT和DOUBLE分别处理。
我的联系邮箱:[email protected]

code.alibabatech 下仍有依赖获取不到

按照wiki本地下了opensesame并安装,仍然在后续dubbo-common编译失败,还会获取另外的依赖。

[ERROR] Failed to execute goal on project dubbo-common: Could not resolve depend
encies for project com.alibaba:dubbo-common:jar:2.5.4-SNAPSHOT: Failed to collec
t dependencies at com.alibaba:hessian-lite:jar:3.2.1-fixed-2: Failed to read art
ifact descriptor for com.alibaba:hessian-lite:jar:3.2.1-fixed-2: Could not trans
fer artifact com.alibaba:hessian-lite:pom:3.2.1-fixed-2 from/to opensesame.relea
ses (http://code.alibabatech.com/mvn/releases): Connection to http://code.alibab
atech.com refused: Connection refused: connect -> [Help 1]

本地存根和本地伪装无法使用

文档上写的本地存根和本地伪装在调用失败的时候会进行一些处理,但是我在测试环境使用的时候把全部服务端关掉之后,就无法使用了,再次调用会抛出异常,信息如下:

com.alibaba.dubbo.rpc.RpcException: Forbid consumer 10.0.0.182 access service com.common.service.LogService from registry zookeeper1:2181 use dubbo version 2.4.10, Please check registry access list (whitelist/blacklist).
    at com.alibaba.dubbo.registry.integration.RegistryDirectory.doList(RegistryDirectory.java:586)
    at com.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory.list(AbstractDirectory.java:73)
    at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.list(AbstractClusterInvoker.java:259)
    at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:218)
    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.proxy0.addScheduleLog(proxy0.java)

看源码发现RegistryDirectory类中forbidden属性已经变成true了,原因在于没有服务端的时候,会接收到通知,RegistryDirectory类会调用refreshInvoker方法,如下:

private void refreshInvoker(List<URL> invokerUrls){
        if (invokerUrls != null && invokerUrls.size() == 1 && invokerUrls.get(0) != null
                && Constants.EMPTY_PROTOCOL.equals(invokerUrls.get(0).getProtocol())) {
            this.forbidden = true; // 禁止访问
            this.methodInvokerMap = null; // 置空列表
            destroyAllInvokers(); // 关闭所有Invoker

这个时候在去调用stub和mock都会抛出异常。所以我怀疑这个特性根本无法使用,但是文档上写的可以在生产中使用,有使用过这特特性的同学吗

tomcat作为客户端时出现WARN警告

使用tomcat作为客户端,zookeeper作为注册中心,昨天下午日志出现了一些警告,先是连接zookeeper超时,之后连接状态变为断开,之后又连上了,但是之后就一直报NoClassDefFoundError,具体日志如下:

 2014-08-10 16:42:55,030 [pool-2-thread-1-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Client session timed out, have not heard from server in 58334ms for sessionid 0x146ccb73e1301a3, closing socket connection and attempting reconnect
 2014-08-10 16:42:55,030 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Client session timed out, have not heard from server in 58335ms for sessionid 0x146ccb73e1301a7, closing socket connection and attempting reconnect


 2014-08-10 16:42:55,130 [pool-2-thread-1-EventThread] INFO  org.I0Itec.zkclient.ZkClient- zookeeper state changed (Disconnected)
 2014-08-10 16:42:55,131 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-EventThread] INFO  org.I0Itec.zkclient.ZkClient- zookeeper state changed (Disconnected)

 2014-08-10 16:42:56,624 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Opening socket connection to server zookeeper1/10.143.80.78:2181
 2014-08-10 16:42:56,624 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Socket connection established to zookeeper1/10.143.80.78:2181, initiating session
 2014-08-10 16:42:56,641 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Session establishment complete on server zookeeper1/10.143.80.78:2181, sessionid = 0x146ccb73e1301a7, negotiated timeout = 30000
 2014-08-10 16:42:56,641 [ContainerBackgroundProcessor[StandardEngine[Catalina]]-EventThread] INFO  org.I0Itec.zkclient.ZkClient- zookeeper state changed (SyncConnected)


 2014-08-10 16:42:56,651 [pool-2-thread-1-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Opening socket connection to server zookeeper1/10.143.80.78:2181
 2014-08-10 16:42:56,652 [pool-2-thread-1-SendThread(zookeeper1:2181)] INFO  org.apache.zookeeper.ClientCnxn- Socket connection established to zookeeper1/10.143.80.78:2181, initiating session
 2014-08-10 16:42:56,652 [pool-2-thread-1-SendThread(zookeeper1:2181)] INFO  org.apache.catalina.loader.WebappClassLoader- Illegal access: this web application instance has been stopped already.  Could not load org.apache.zookeeper.proto.SetWatches.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
 java.lang.IllegalStateException
     at org.apache.catalina.loader.WimeConneebappClassLoader.loadClass(WebappClassLoader.java:1574)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
     at org.apache.zookeeper.ClientCnxn$SendThread.prction(ClientCnxn.java:971)
     at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
 2014-08-10 16:42:56,653 [pool-2-thread-1-SendThread(zookeeper1:2181)] WARN  org.apache.zookeeper.ClientCnxn- Session 0x146ccb73e1301a3 for server zookeeper1/10.143.80.78:2181, unexpected error, closing socket connection and attempting reconnect
 java.lang.NoClassDefFoundError: org/apache/zookeeper/proto/SetWatches
     at org.apache.zookeeper.ClientCnxn$SendThread.primeConnection(ClientCnxn.java:971)
     at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
 Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.proto.SetWatches
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
     ... 2 more

看起来和tomcat的classloader机制有关系,虽然重启后就可以了,而且也一直运行了很长时间,但是怎么会无缘无故的发生这样的错误呢?

AbstractConfig内存泄露

AbstractConfig中使用addShutdownHook函数造成AbstractConfig对象无法被回收.造成ClassLoader对象也无法被回收.

Dubbo2.5.3在windows下不能使用公网IP注册服务

近日新增了一个服务,必须在Windows Server2003的环境下运行,因此需要在Windows下注册dubbo服务,服务器为单网卡连接路由器,分配内网IP:192.168.1.3,路由器有公网IP假设为8.8.8.8,注册到另一IDC的Zookeeper下(4.4.4.4),自动使用内网IP 192.168.1.3注册成功,但consumer肯定无法在4.4.4.4的内网下调用到8.8.8.8下的内网的服务,因此需要将服务注册成公网ip。

看了使用者指南的“主机绑定”部分,指出
方法1:可以通过修改 /etc/host 文件(经测试在8.8.8.8下开了一个linux主机用修改hosts文件的办法成功注册为公网ip),但我试着修改了c:\windows\system32\drivers\etc\hosts 文件,仍然是注册为内网ip
方法2:老实说,没看懂示例中的地址为何要那样写(
<dubbo:protocol host="http://10.20.160.198/wiki/display/dubbo/205.182.23.201">),我把host写成ip,会抛出bindException,canot assign requested address:bind
方法3:在classpath中添加dubbo.properties文件,结局和方法2一样

求教如何在windows下成功用公网ip注册服务。。。

[provider side]support returning implicit results

This is a ticket to extend DUBBO's implicit parameter mechanism described in current DUBBO documentation:
http://alibaba.github.io/dubbo-doc-static/User+Guide-zh.htm#UserGuide-zh-%E9%9A%90%E5%BC%8F%E4%BC%A0%E5%8F%82

In-short, the pattern of the above document is:
[consumer side] set attachments ----> [provider side] get attachments

this ticket is intended to extend this mechanism to:
[provider side(before return)] set attachments --> [consumer side] get attachments

provider side

public class XxxServiceImpl implements XxxService {

    public void xxx() { // 服务方法实现(service implementation)
        // ....
        // 返回之前 (before return)
        RpcContext.getContext().setAttachment("userToken", "0001"); 
    }
}

consumer side

xxxService.xxx();
String userToken = RpcContext.getContext().getAttachment("userToken"); 

当pojo中存在orm注解时,会导致序列化失败

Pojo中存在orm注解时,如@entity@table,@GenericGenerato,@id,@GeneratedValue,@column等,会导致deserialization失败,后台堆栈:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.service.test.Consumer#0' defined in class path resource [dubbo-consumer.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.service.test.bo.TestBO
[01/08/14 01:13:12:012 CST] DubboSharedHandler-thread-1  INFO dubbo.DubboProtocol:  [DUBBO] disconected from /10.1.4.130:20880,url:dubbo://10.1.4.130:20880/com.service.test.service.TestService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.4.9&heartbeat=60000&interface=com.service.test.service.TestService&methods=addValue,findAllTest,delTest,addTest&pid=1740&serialization=hessian2&side=consumer&timestamp=1406869991616, dubbo version: 2.4.9, current host: 10.1.4.130
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
    at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)
    at com.alibaba.dubbo.container.Main.main(Main.java:80)
    at ConsumerLaunch.main(ConsumerLaunch.java:23)
Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.service.test.bo.TestBO
    at com.service.test.Consumer.start(Consumer.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
    ... 14 more

Hessian protocol can not pass RpcContext attachments transparently.

在客户端使用隐式传参:
RpcContext.getContext().setAttachment("index", "1");
在服务端中的RpcConext的getAttachments() 为空map.

粗略扫过了一遍源码,貌似所有基于http协议的都无法实现隐式传参。

请问是是bug?还是设计如此?还是说有一类协议无法实现?

dubbo超时时间设置10s,而实际出现了几十秒?

这是我们线上的日志,下方日志的server elapsed: 53250 ms 太吓人了,50多 s,请问这是什么原因?
282411047 [/atg/dynamo/service/Scheduler-poller] WARN com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker - [DUBBO] Although retry the method hgetAll in the service com.gome.service.CacheService was successful by the provider 10.58.50.150:20990, but there have been failed providers 10.58.50.147:20990 from the registry 10.58.22.191:2181 on the consumer 10.58.50.36 using the dubbo version 2.5.3. Last error is: Invoke remote method timeout. method: hgetAll, provider: dubbo://10.58.50.147:20990/com.gome.service.CacheService?anyhost=true&application=gome-cache-redis-client-app-atg&check=false&delay=10000&dubbo=2.5.3&interface=com.gome.service.CacheService&loadbalance=random&methods=lpush,hexists,hmset,decr,set,hsetnx,lpop,type,hlen,rpush,hincrBy,hgetAll,setex,ltrim,smembers,del,substr,incrBy,decrBy,expire,append,srem,hmget,llen,hget,lindex,get,hdel,keys,ttl,expireAt,sadd,mutliExecute,hset,rpop,exists,dbSize,scard,incr,hkeys,testDubboRequest,lrange&pid=25176&revision=_Gome.EStore_slib_scacheClient&side=consumer&timeout=10000&timestamp=1395684487928, cause: Waiting server-side response timeout. start time: 2014-03-28 08:30:22.157, end time: 2014-03-28 08:31:15.407, client elapsed: 0 ms, server elapsed: 53250 ms, timeout: 10000 ms, request: Request [id=1332943, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=hgetAll, parameterTypes=[class java.lang.String, class java.lang.String], arguments=[BUDGET, 186800033_case], attachments={path=com.gome.service.CacheService, interface=com.gome.service.CacheService, timeout=10000, version=0.0.0}]], channel: /10.58.50.36:51071 -> /10.58.50.147:20990, dubbo version: 2.5.3, current host: 10.58.50.36
com.alibaba.dubbo.rpc.RpcException: Invoke remote method timeout. method: hgetAll, provider: dubbo://10.58.50.147:20990/com.gome.service.CacheService?anyhost=true&application=gome-cache-redis-client-app-atg&check=false&delay=10000&dubbo=2.5.3&interface=com.gome.service.CacheService&loadbalance=random&methods=lpush,hexists,hmset,decr,set,hsetnx,lpop,type,hlen,rpush,hincrBy,hgetAll,setex,ltrim,smembers,del,substr,incrBy,decrBy,expire,append,srem,hmget,llen,hget,lindex,get,hdel,keys,ttl,expireAt,sadd,mutliExecute,hset,rpop,exists,dbSize,scard,incr,hkeys,testDubboRequest,lrange&pid=25176&revision=_Gome.EStore_slib_scacheClient&side=consumer&timeout=10000&timestamp=1395684487928, cause: Waiting server-side response timeout. start time: 2014-03-28 08:30:22.157, end time: 2014-03-28 08:31:15.407, client elapsed: 0 ms, server elapsed: 53250 ms, timeout: 10000 ms, request: Request [id=1332943, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=hgetAll, parameterTypes=[class java.lang.String, class java.lang.String], arguments=[BUDGET, 186800033_case], attachments={path=com.gome.service.CacheService, interface=com.gome.service.CacheService, timeout=10000, version=0.0.0}]], channel: /10.58.50.36:51071 -> /10.58.50.147:20990
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:99)
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)
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.proxy0.hgetAll(proxy0.java)
at com.gome.cache.impl.RemoteCacheToolImpl.hgetAll(RemoteCacheToolImpl.java:105)
at com.gome.cache.impl.CacheRedisToolImpl.hgetAll(CacheRedisToolImpl.java:70)
at com.gome.commerce.order.submitordervalidator.basetools.BudgetManageService.allValidCases(BudgetManageService.java:383)
at com.gome.commerce.order.submitordervalidator.basetools.BudgetManageService.cacheValidCase(BudgetManageService.java:370)
at com.gome.commerce.promotion.LoadGomeBudgetCaseSchedule.performSchedule(LoadGomeBudgetCaseSchedule.java:19)
at com.gome.commerce.estore.GomeBaseSchedule.performScheduledTask(GomeBaseSchedule.java:93)
at atg.service.scheduler.Scheduler.handleNextScheduledJob(Scheduler.java:481)
at atg.service.scheduler.Scheduler.handleScheduledJobs(Scheduler.java:663)
at atg.service.scheduler.Scheduler$Poller.run(Scheduler.java:83)
Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2014-03-28 08:30:22.157, end time: 2014-03-28 08:31:15.407, client elapsed: 0 ms, server elapsed: 53250 ms, timeout: 10000 ms, request: Request [id=1332943, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=hgetAll, parameterTypes=[class java.lang.String, class java.lang.String], arguments=[BUDGET, 186800033_case], attachments={path=com.gome.service.CacheService, interface=com.gome.service.CacheService, timeout=10000, version=0.0.0}]], channel: /10.58.50.36:51071 -> /10.58.50.147:20990
at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:107)
at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:84)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)
... 23 more

有几个pom少依赖

dubbo-remoting-http

        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

dubbo-container-jetty

        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>

dubbo作为消费者在tomcat中,关闭tomcat时ERROR日志

有一个应用部署在tomcat中,使用dubbo作为消费端去调用单独部署的服务者,关闭tomcat的时候打印出一大堆ERROR级别的信息,google上搜索很多人说是tomcat6.24之后的问题,但是看着好闹心呀,信息如下:

2014-06-26 16:11:56,622 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [[Pool-Cleaner]:Tomcat Connection Pool[1-18895884]] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,622 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [[Pool-Cleaner]:Tomcat Connection Pool[2-18895884]] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,622 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [[Pool-Cleaner]:Tomcat Connection Pool[3-18895884]] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,622 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [ZkClient-EventThread-19-zookeeper1:2181] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [pool-2-thread-1-SendThread(zookeeper1:2181)] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [pool-2-thread-1-EventThread] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSaveRegistryCache-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboClientReconnectTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,623 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [New I/O client worker #1-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [dubbo-remoting-client-heartbeat-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboClientReconnectTimer-thread-2] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [New I/O client worker #1-2] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [dubbo-remoting-client-heartbeat-thread-2] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboResponseTimeoutScanTimer] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSharedHandler-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,624 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSharedHandler-thread-2] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,625 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSharedHandler-thread-3] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,625 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSharedHandler-thread-4] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,625 [pool-2-thread-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [] appears to have started a thread named [DubboSharedHandler-thread-5] but has failed to stop it. This is very likely to create a memory leak.
2014-06-26 16:11:56,631 [main] INFO  org.apache.coyote.http11.Http11Protocol- Stopping ProtocolHandler ["http-bio-2201"]
2014-06-26 16:11:56,632

还有一些异常的信息:

2014-06-26 16:11:56,637 [DubboShutdownHook] INFO  com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry-  [DUBBO] Unregister: consumer://10.0.0.71/com.rili.mail.MailService?application=when-web&category=consumers&check=false&dubbo=2.5.3&interface=com.rili.mail.MailService&methods=sendMailByVMContent,sendHtmlMail,sendMailByVMLocation&pid=19784&revision=1.0-SNAPSHOT&sendHtmlMail.async=true&sendHtmlMail.return=false&sendMailByVMContent.async=true&sendMailByVMContent.return=false&sendMailByVMLocation.async=true&sendMailByVMLocation.return=false&side=consumer&timestamp=1403770178045, dubbo version: 2.5.3, current host: 10.0.0.71
2014-06-26 16:11:56,638 [DubboShutdownHook] INFO  org.apache.catalina.loader.WebappClassLoader- Illegal access: this web application instance has been stopped already.  Could not load org.I0Itec.zkclient.ZkClient$9.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1574)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at org.I0Itec.zkclient.ZkClient.delete(ZkClient.java:731)
    at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.delete(ZkclientZookeeperClient.java:57)
    at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doUnregister(ZookeeperRegistry.java:108)
    at com.alibaba.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:160)
    at com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:492)
    at com.alibaba.dubbo.registry.support.FailbackRegistry.destroy(FailbackRegistry.java:436)
    at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.destroy(ZookeeperRegistry.java:90)
    at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.destroyAll(AbstractRegistryFactory.java:70)
    at com.alibaba.dubbo.config.ProtocolConfig.destroyAll(ProtocolConfig.java:429)
    at com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:452)
    at java.lang.Thread.run(Thread.java:662)
2014-06-26 16:11:56,639 [DubboShutdownHook] INFO  org.apache.catalina.loader.WebappClassLoader- Illegal access: this web application instance has been stopped already.  Could not load com.alibaba.dubbo.registry.support.SkipFailbackWrapperException.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1574)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at com.alibaba.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:168)
    at com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:492)
    at com.alibaba.dubbo.registry.support.FailbackRegistry.destroy(FailbackRegistry.java:436)
    at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.destroy(ZookeeperRegistry.java:90)
    at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.destroyAll(AbstractRegistryFactory.java:70)
    at com.alibaba.dubbo.config.ProtocolConfig.destroyAll(ProtocolConfig.java:429)
    at com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:452)
    at java.lang.Thread.run(Thread.java:662)
2014-06-26 16:11:56,640 [DubboShutdownHook] WARN  com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry-  [DUBBO] Failed to unregister url consumer://10.0.0.71/com.rili.mail.MailService?application=when-web&category=consumers&check=false&dubbo=2.5.3&interface=com.rili.mail.MailService&methods=sendMailByVMContent,sendHtmlMail,sendMailByVMLocation&pid=19784&revision=1.0-SNAPSHOT&sendHtmlMail.async=true&sendHtmlMail.return=false&sendMailByVMContent.async=true&sendMailByVMContent.return=false&sendMailByVMLocation.async=true&sendMailByVMLocation.return=false&side=consumer&timestamp=1403770178045 to registry zookeeper://zookeeper1:2181/com.alibaba.dubbo.registry.RegistryService?application=when-web&dubbo=2.5.3&interface=com.alibaba.dubbo.registry.RegistryService&pid=19784&timestamp=1403770178089 on destroy, cause: com/alibaba/dubbo/registry/support/SkipFailbackWrapperException, dubbo version: 2.5.3, current host: 10.0.0.71
java.lang.NoClassDefFoundError: com/alibaba/dubbo/registry/support/SkipFailbackWrapperException
    at com.alibaba.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:168)
    at com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:492)
    at com.alibaba.dubbo.registry.support.FailbackRegistry.destroy(FailbackRegistry.java:436)
    at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.destroy(ZookeeperRegistry.java:90)
    at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.destroyAll(AbstractRegistryFactory.java:70)
    at com.alibaba.dubbo.config.ProtocolConfig.destroyAll(ProtocolConfig.java:429)
    at com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:452)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.registry.support.SkipFailbackWrapperException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    ... 8 more
2014-06-26 16:11:56,640 [ZkClient-EventThread-19-zookeeper1:2181] INFO  org.I0Itec.zkclient.ZkEventThread- Terminate ZkClient event thread.
2014-06-26 16:11:56,646 [pool-2-thread-1-EventThread] INFO  org.apache.zookeeper.ClientCnxn- EventThread shut down
2014-06-26 16:11:56,646 [DubboShutdownHook] INFO  org.apache.zookeeper.ZooKeeper- Session: 0x146cd52e2970aa7 closed

貌似是关闭tomcat的时候,dubbo没有接到关闭信号导致的,虽然最终tomcat能正常关闭,但是这些日志看的好恶心呀,有遇到这种情况的吗

Maven依赖找不到

RT,opensesame的包无法下载,[Maven][http://repo1.maven.org/maven2/com/alibaba/] 中也无法找到对应的包,下的dubbo项目无法编译。

    <parent>
        <groupId>com.alibaba</groupId>
        <artifactId>opensesame</artifactId>
        <version>2.0</version>
    </parent>

按照Demo写的代码运行Cunsummer时 Failed to check the status of the service com.alibaba.dubbo.demo.DemoService

按照例子配置:
provider.xml
image
consummer.xml
image

telnet可以看到服务:

image

但是运行Cunsummer时,getBean报错,:
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.alibaba.dubbo.demo.DemoService. No provider available for the service com.alibaba.dubbo.demo.DemoService from the url multicast://225.0.0.0:1234/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-helloworld-app&check=false&connected=true&dubbo=2.4.9&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=12256&revision=service&side=consumer&timestamp=1402064250263 to the consumer 192.168.1.6 use dubbo version 2.4.9
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at Consumer.main(Consumer.java:11)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.alibaba.dubbo.demo.DemoService. No provider available for the service com.alibaba.dubbo.demo.DemoService from the url multicast://225.0.0.0:1234/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-helloworld-app&check=false&connected=true&dubbo=2.4.9&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=12256&revision=service&side=consumer&timestamp=1402064250263 to the consumer 192.168.1.6 use dubbo version 2.4.9
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422)
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:303)
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$1.run(FactoryBeanRegistrySupport.java:121)
... 9 more

Log system flaw?

I can not swith log4j to logback.
After exclude log4j dependency and add logback-classic,it reports such warnings;
log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory).

Why not follow the slfj standard , but develop another log module?

使用Http协议方式,如何使用json序列化方式

文档上写的使用http协议时,默认使用json序列化,但是实际上请求头和响应头的content-type都是application/x-java-serialized-object,请求体和响应体也是类似java序列化的方式,想知道怎么才能使用json序列化方式呢

Invoker在返回RpcResult时添加的attachements没有传给consumer的proxy.

主要想法是模仿http cookie实现servlet session的思路,通过attachement来传递session ID,藉此达到支持Session的目的,目前加在RpcInvocation attachement中的sessionID能成功的传递给provider端的Invoker,但是在调用结果封装对象RpcResult attachements的sessionID却不能穿会给consumer端的proxy factory.

所有启动脚本都无法在Mac下工作

版本: 2.4.10

似乎脚本都使用了ps -f,在Mac OS平台 无法工作,类似下面错误

PIDS=ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}'
ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}'
ps: illegal option -- f
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-u]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
echo "PID: $PIDS"
PID:
echo "STDOUT: $STDOUT_FILE"
STDOUT: logs/stdout.log

2.5.4-SNAPSHOT dubbo admin error

ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com.alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exception is org.springframework.beans.fact
ory.BeanCreationException: Error creating bean with name 'server': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType'
is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)

tomcat lib javassist

部署dubbo的provider在tomcat下,把所有需要的jar包拷到tomcat的lib下,war包的WEB-INF/lib被删除,启动报错,主要是javassist的MemberResolver报出的错,#searchImports,#lookupClass等等。希望能得到帮助,谢谢,可以发我邮箱[email protected]

dubbo支持RESTful吗?

看现在dubbo支持的webservice是SOAP方式的,请问当时规划的时候为何没有考虑RESTful方式?是技术问题还是管理问题?

Dubbo Token验证

按指南上
34959-eed78424ce14cb97e5d6dced34aaabbd

在注册中心控制权限,以决定要不要下发令牌给消费者,测试发现,注册上去的服务不管有没有启用token,调用方都可以调用成功

所以想问下,这点在哪里体现出来?

curator客户端在zookeeper重启后一直抛异常

org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
    at com.netflix.curator.ConnectionState.getZooKeeper(ConnectionState.java:101)
    at com.netflix.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:107)
    at com.netflix.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:448)

dubbo不支持json序列化

使用http协议,序列化采用json,通过抓包,发现客户端发出的http包中Content-Type: application/x-java-serialized-object。2.4.10和2.5.3版本都是这样。客户端的dubbo配置如下:
<dubbo:protocol name="http" serialization="json" />
<dubbo:reference id="helloService" interface="com.dubbo.demo.HelloService" version="1.0.0" protocol="http" url="http://127.0.0.1:9000/http/com.dubbo.demo.HelloService" />

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.