dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

how to disable qos

Open 89333367 opened this issue 8 years ago • 10 comments

When use dubbo in spark, it is possible to start multiple processes on the same machine which lead to port conflict.

18/04/03 18:25:06 ERROR server.Server:  [DUBBO] qos-server can not bind localhost:22222, dubbo version: 2.6.1, current host: 192.168.12.27
java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
	at java.lang.Thread.run(Thread.java:745)

89333367 avatar Apr 03 '18 10:04 89333367

@89333367 dubbo.application.qos.enable=false

tangdu avatar Apr 08 '18 06:04 tangdu

Hi, welcome!

Would you please update the title and description using English? Dubbo is a global community and we would like the issue to be seen by people all over the world.

Questions like this are expected to be asked in the mailing list, you can subscribe and ask there.

ralf0131 avatar Apr 08 '18 07:04 ralf0131

@tangdu is there any way use java config?there nothing about qos, did i miss something? image

VanXD avatar Apr 09 '18 08:04 VanXD

@VanXD https://github.com/apache/incubator-dubbo/blob/dubbo-2.6.1/dubbo-plugin/dubbo-qos/src/main/java/com/alibaba/dubbo/qos/protocol/QosProtocolWrapper.java#L79

hengyunabc avatar Apr 09 '18 09:04 hengyunabc

@VanXD https://github.com/apache/incubator-dubbo/blob/dubbo-2.6.1/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ApplicationConfig.java#L224

beiwei30 avatar Apr 10 '18 03:04 beiwei30

how to config with xml ?

  xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
  
 <dubbo:application name="xxx" qosEnable="false"/>

exception

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: 元素 'dubbo:application' 中不允许出现属性 'qosEnable'。

YoKv avatar Apr 23 '18 05:04 YoKv

Hi, please try using the latest schema: http://dubbo.apache.org/schema/dubbo.

Examples can be found here: https://github.com/apache/incubator-dubbo/blob/master/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml

ralf0131 avatar Apr 23 '18 06:04 ralf0131

@ralf0131

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns="http://www.springframework.org/schema/beans"
	   xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
	   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">

but i cannot start spring boot application ,and how disable qos with xml maybe DubboNamespaceHandler not release 2.6.1 version?

Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]

YoKv avatar Apr 23 '18 10:04 YoKv

The new namespace will be available from 2.6.2 onwards.

If you want to try out this new namespace in some version below 2.6.2, you can manually register the NamespaceHandler by adding META-INF/spring.handlers with the following content:

http\://dubbo.apache.org/schema/dubbo=com.alibaba.dubbo.config.spring.schema.DubboNamespaceHandler

[1] https://docs.spring.io/spring/docs/3.0.0.M3/reference/html/apbs05.html

ralf0131 avatar Apr 23 '18 15:04 ralf0131

i use dubbo2.6.2, and xml user below:

<dubbo:application name="" organization="" owner="liaomengge" version="1.0">
    <dubbo:parameter key="qos.enable" value="false"/>
</dubbo:application>

liaomengge avatar Jun 08 '18 06:06 liaomengge