alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.07k stars 12.81k forks source link

Nacos server1.0 client 1.0 occasionally null pointer exception when starting, there is no problem with debug mode #1316

Closed LoveMyPyj closed 5 years ago

LoveMyPyj commented 5 years ago

Issue Description

nacos server1.0 client 1.0 启动时偶发空指针异常,debug模式没有问题 nacos server 1.0.0 版本,client 是1.0.0版本,maven pom依赖: `

com.alibaba.boot
        <artifactId>dubbo-spring-boot-starter</artifactId>
        <version>0.2.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>2.6.5</version>
    </dependency>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.1.31.Final</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo-registry-nacos</artifactId>
        <version>0.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba.nacos</groupId>
        <artifactId>nacos-client</artifactId>
        <version>1.0.0</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba.boot</groupId>
        <artifactId>nacos-config-spring-boot-starter</artifactId>
        <version>0.2.1</version>
        <exclusions>
            <exclusion>
                <artifactId>spring-context-support</artifactId>
                <groupId>com.alibaba.spring</groupId>
            </exclusion>
            <exclusion>
                <artifactId>nacos-client</artifactId>
                <groupId>com.alibaba.nacos</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-context</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-core</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>slf4j-api</artifactId>
                <groupId>org.slf4j</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.alibaba.boot</groupId>
        <artifactId>nacos-config-spring-boot-actuator</artifactId>
        <version>0.2.1</version>
    </dependency>`

springboot版本2.1.1.RELEASE Type: bug report or feature request

Describe what happened (or what feature you want)

在dubbo服务启动的时候,在未知的情况下回出现空指针错误,此错误是偶发的,不是经常性出现,在run模式下启动dubbo服务,很久才能出现一次,在debug模式不会出现此问题

Describe what you expected to happen

错误信息下面传图片

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

nacos-bot commented 5 years ago

Hi @LoveMyPyj, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.

Nacos server1.0 client 1.0 occasionally null pointer exception when starting, there is no problem with debug mode

Issue Description

Nacos server1.0 client 1.0 occasionally null pointer exception when starting, there is no problem with debug mode Nacos server 1.0.0 version, client is version 1.0.0, maven pom depends on: `

com.alibaba.boot
        <artifactId>dubbo-spring-boot-starter</artifactId>
        <version>0.2.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>2.6.5</version>
    </dependency>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.1.31.Final</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo-registry-nacos</artifactId>
        <version>0.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba.nacos</groupId>
        <artifactId>nacos-client</artifactId>
        <version>1.0.0</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba.boot</groupId>
        <artifactId>nacos-config-spring-boot-starter</artifactId>
        <version>0.2.1</version>
        <exclusions>
            <exclusion>
                <artifactId>spring-context-support</artifactId>
                <groupId>com.alibaba.spring</groupId>
            </exclusion>
            <exclusion>
                <artifactId>nacos-client</artifactId>
                <groupId>com.alibaba.nacos</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-context</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-core</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>slf4j-api</artifactId>
                <groupId>org.slf4j</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.alibaba.boot</groupId>
        <artifactId>nacos-config-spring-boot-actuator</artifactId>
        <version>0.2.1</version>
    </dependency>`

Springboot version 2.1.1.RELEASE Type: bug report or feature request

Describe what happened (or what feature you want)

When the dubbo service starts, it will return a null pointer error in an unknown situation. This error is sporadic, not recurring. Starting the dubbo service in run mode will take a long time to appear. This problem does not occur in debug mode.

Describe what you expected to happen

Error message below picture

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

LoveMyPyj commented 5 years ago

61358624-C5D5-4400-9D4A-13BC5D1A5B57

chuntaojun commented 5 years ago

该问题已解决,请等待spring-context-nacos新版本发布

nkorange commented 5 years ago

会在nacos-spring#85进行跟踪,下个版本发布