spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.96k stars 1.29k forks source link

config client can't receive message from mq #1068

Closed lly835 closed 6 years ago

lly835 commented 6 years ago

SpringBoot 2.0.1.RELEASE SpringCloud Finchley.RELEASE

pom.xml

<dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>

        <dependency>
            <groupId>com.imooc</groupId>
            <artifactId>product-client</artifactId>
        </dependency>

        <dependency>
            <groupId>com.imooc</groupId>
            <artifactId>order-common</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
        </dependency>
    </dependencies>

application console

2018-06-21 03:50:24.491  INFO 83107 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1529524224491, current=UP, previous=STARTING]
2018-06-21 03:50:24.494  INFO 83107 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ORDER/192.168.30.112:order:8081: registering service...
2018-06-21 03:50:24.499  INFO 83107 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2018-06-21 03:50:24.500  INFO 83107 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'order-1.errorChannel' has 1 subscriber(s).
2018-06-21 03:50:24.500  INFO 83107 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started _org.springframework.integration.errorLogger
2018-06-21 03:50:24.501  INFO 83107 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147482647
2018-06-21 03:50:24.545  INFO 83107 --- [           main] c.s.b.r.p.RabbitExchangeQueueProvisioner : declaring queue for inbound: springCloudBus.anonymous.5mLwRjZZRPankS2PU5aYUg, bound to: springCloudBus
2018-06-21 03:50:24.588  INFO 83107 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ORDER/192.168.30.112:order:8081 - registration status: 204
2018-06-21 03:50:24.611  INFO 83107 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'order-1-1.springCloudBus.anonymous.5mLwRjZZRPankS2PU5aYUg.errors' has 1 subscriber(s).
2018-06-21 03:50:24.612  INFO 83107 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'order-1-1.springCloudBus.anonymous.5mLwRjZZRPankS2PU5aYUg.errors' has 2 subscriber(s).
2018-06-21 03:50:24.684  INFO 83107 --- [           main] o.s.i.a.i.AmqpInboundChannelAdapter      : started inbound.springCloudBus.anonymous.5mLwRjZZRPankS2PU5aYUg
2018-06-21 03:50:24.702  INFO 83107 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147483647
2018-06-21 03:50:24.952  INFO 83107 --- [ctor-http-nio-1] r.ipc.netty.tcp.BlockingNettyContext     : Started HttpServer on /0:0:0:0:0:0:0:0:8081
2018-06-21 03:50:24.953  INFO 83107 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port(s): 8081
2018-06-21 03:50:24.972  INFO 83107 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8081
2018-06-21 03:50:24.980  INFO 83107 --- [           main] com.imooc.order.OrderApplication         : Started OrderApplication in 14.781 seconds (JVM running for 15.685)
2018-06-21 03:55:24.478  INFO 83107 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2018-06-21 04:00:24.497  INFO 83107 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
qq20180621-035700 2x
ryanjbaxter commented 6 years ago

Please provide a sample that reproduces the issue.

lly835 commented 6 years ago

@ryanjbaxter

SpringBoot 2.0.2.RELEASE SpringCloud Finchley.RELEASE

config-server https://github.com/lly835/config config-client https://github.com/lly835/config-client config-repo https://github.com/lly835/config-repo

config-repo webhooks

qq20180621-150525 2x

PS

curl -v -X POST "http://sell.natapp4.cc/actuator/bus-refresh"

config-client received refresh msg, why doesn't /monitor work?

lly835 commented 6 years ago

@ryanjbaxter see commented 4 days ago

XSPatswpu commented 6 years ago

yeah,yeah.I encountered the same problem。 I use the postman,the config-client refresh msg, but I use /monitor ,it doesn't work

lly835 commented 6 years ago

@XSPatswpu see https://github.com/spring-cloud/spring-cloud-bus/issues/124

XSPatswpu commented 6 years ago

@lly835 thanks!

ryanjbaxter commented 6 years ago

@lly835 I am going to close this in favor of spring-cloud/spring-cloud-bus#124

Gaodongove commented 6 years ago

I have the same problem,What's the solution?postman run is ok,server and client can update,but user github webhooks server can receive message update,but client can't receive anymessage.