Code Monkey home page Code Monkey logo

dubbo-rce's Introduction

dubbo-rce's People

Contributors

x1r0z 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

Watchers

 avatar  avatar

dubbo-rce's Issues

你好CVE-2023-23638仓库代码运行请教

X1r0z,您好:
我使用仓库代码存在一些报错无法解决,希望您能够指导一下

运行环境

  • jdk 17
    • vm options :--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Ddubbo.hessian.allowNonSerializable=true
  • zookeeper-3.7.0
  • <dubbo.version>3.1.5</dubbo.version>

如果不加--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
会提示:module java.base does not "opens java.math/lang" to unnamed module @16d04d3d

现象

  • src/main/java/org/apache/dubbo/samples/DemoConsumer.java报错:
···
cause: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
  • src/main/java/org/apache/dubbo/samples/DemoProvider.java日志:
[31/03/23 11:19:56:056 CST] DubboServerHandler-192.168.3.199:20880-thread-6  WARN dubbo.DecodeableRpcInvocation:  [DUBBO] Decode rpc invocation failed: Cannot invoke "Object.hashCode()" because "key" is null, dubbo version: 3.1.5, current host: 192.168.3.199, error code: 4-20. This may be caused by , go to https://dubbo.apache.org/faq/4/20 to find instructions. 
java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
	at org.apache.dubbo.rpc.support.GroupServiceKeyCache.getServiceKey(GroupServiceKeyCache.java:37)
	at org.apache.dubbo.rpc.support.ProtocolUtils.serviceKey(ProtocolUtils.java:51)
	at org.apache.dubbo.rpc.protocol.AbstractProtocol.serviceKey(AbstractProtocol.java:83)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:282)
	at org.apache.dubbo.rpc.protocol.dubbo.CallbackServiceCodec.decodeInvocationArgument(CallbackServiceCodec.java:330)
	at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:225)
	at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:93)
	at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:62)
	at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:46)
	at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:61)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41)
	at java.base/java.lang.Thread.run(Thread.java:833)

尝试

  • zkServer status
$ bin/zkServer status
/usr/local/Cellar/openjdk@17/17.0.3/libexec/openjdk.jdk/Contents/Home/bin/java
ZooKeeper JMX enabled by default
Using config: /usr/local/etc/zookeeper/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
  • 我访问提示faq/4/20提示可能的原因是服务方和调用方的版本不匹配,我到这里就无法继续了,烦请指导~

报错截图

DemoConsumer.java

截屏2023-03-31 11 27 01

DemoProvider.java

截屏2023-03-31 11 25 59

以上,此致。

1.8.0_121 pom.xml

org.springframework.boot 需要指版本

`


4.0.0

<artifactId>dubbo-samples-test</artifactId>
<groupId>org.apache.dubbo.samples</groupId>
<version>1.0-SNAPSHOT</version>

<properties>
    <source.level>1.8</source.level>
    <target.level>1.8</target.level>
    <dubbo.version>3.1.5</dubbo.version>
    <!--        <dubbo.version>2.7.21</dubbo.version>-->
    <!--        <dubbo.version>3.0.13</dubbo.version>-->
    <spring.version>4.3.3.RELEASE</spring.version>
    <junit.version>4.13.1</junit.version>
    <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>${spring.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-bom</artifactId>
            <version>${dubbo.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-dependencies-zookeeper</artifactId>
            <version>${dubbo.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo</artifactId>
    </dependency>

    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-dependencies-zookeeper</artifactId>
        <type>pom</type>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
                <source>${source.level}</source>
                <target>${target.level}</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.7.3</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                    <configuration>
                        <classifier>spring-boot</classifier>
                        <mainClass>
                            org.apache.dubbo.samples.DemoConsumer
                        </mainClass>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

`

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.