Dubbo: how to disable qos

Created on 3 Apr 2018  ·  10Comments  ·  Source: apache/dubbo

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)

Most helpful comment

i use dubbo2.6.2, and xml user below:

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

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

All 10 comments

@89333367 dubbo.application.qos.enable=false

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.

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

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'。

@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]

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

i use dubbo2.6.2, and xml user below:

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

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

Was this page helpful?
0 / 5 - 0 ratings