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.29k stars 12.84k forks source link

Some machines in the Nacos cluster are not available for a while #1636

Closed sunyukun8888 closed 4 years ago

sunyukun8888 commented 5 years ago

问题描述: 集群运行一段时间集群某些机器就显示服务有问题如下截图,集群中其他机器服务正常,将异常的机器nacos server 重新启动下服务又正常,但是运行一段时间问题就会再次出现

image

####### POM 配置

org.springframework.cloud spring-cloud-alibaba 0.9.0.RELEASE pom import org.springframework.cloud spring-cloud-alibaba-dependencies 0.9.0.RELEASE pom import
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
        <exclusions>
            <exclusion>
                <artifactId>spring-boot-starter-logging</artifactId>
                <groupId>org.springframework.boot</groupId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-spring-boot-starter</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.apache.dubbo</groupId>
                <artifactId>dubbo</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Dubbo -->
    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Dubbo Registry Nacos -->
    <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-registry-nacos</artifactId>
        <version>2.7.1</version>
    </dependency>

    <dependency>
        <groupId>com.alibaba.nacos</groupId>
        <artifactId>nacos-client</artifactId>
    </dependency>

nacos.log 日志如下,但是不确定是不是该日志导致不可用

错误代码截取1: 019-07-30 01:12:40,975 ERROR Responding with unauthorized error. Message - Full authentication is required to access this resource

2019-07-30 01:12:41,974 ERROR Responding with unauthorized error. Message - Full authentication is required to access this resource

2019-07-30 01:12:42,974 ERROR Responding with unauthorized error. Message - Full authentication is required to access this resource

2019-07-30 01:13:52,310 INFO Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 2019-07-30 01:14:19,981 INFO Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 2019-07-30 01:20:27,500 WARN clearConfigHistory start

2019-07-30 01:20:28,395 INFO [capacityManagement] start correct usage

错误代码截取2: 2019-08-01 18:20:40,631 INFO [capacityManagement] end correct usage, cost: 0s

2019-08-01 18:28:00,081 INFO Expired JWT token.

2019-08-01 18:28:00,083 ERROR Responding with unauthorized error. Message - Full authentication is required to access this resource

nacos-bot commented 5 years ago

Hi @sunyukun8888, 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.

Some machines in the Nacos cluster are not available for a while

image

No problem with other machines in the cluster

nkorange commented 5 years ago

请更新到1.1.3,修复了这个问题。

stale[bot] commented 4 years ago

Thanks for your feedback and contribution. But the issue/pull request has not had recent activity more than 180 days. This issue/pull request will be closed if no further activity occurs 7 days later. We may solve this issue in new version. So can you upgrade to newest version and retry? If there are still issues or want to contribute again. Please create new issue or pull request again.

lijialin-code commented 4 years ago

1.2.1 好像还是有这个问题 nacos.log 2020-07-17 00:05:08,705 INFO Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:414) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)