我正在尝试运行自定义 Spring Cloud Stream 应用程序启动器,并获取以下信息日志,
2017-11-14 14:59:24.600 INFO 30300 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka version : 0.10.1.1
2017-11-14 14:59:24.600 INFO 30300 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka commitId : f10ef2720b03b247
2017-11-14 14:59:24.747 INFO 30300 --- [ main] o.a.k.clients.producer.KafkaProducer : Closing the Kafka producer with timeoutMillis = 30000 ms.
2017-11-14 14:59:24.768 INFO 30300 --- [ main] o.s.integration.channel.DirectChannel : Channel 'websocket-source.output' has 1 subscriber(s).
2017-11-14 14:59:24.773 INFO 30300 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2017-11-14 14:59:24.906 INFO 30300 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
我的问题是我的应用程序没有按预期工作(我无法连接到该应用程序将启动的 websocket 服务器),因此我希望从 kafka 日志中获得一些线索。可能缺少一些依赖项,但我找不到。
这是一个错误吗?我该如何调试?
最佳答案
当你构建 Spring Boot Web 应用程序时,你应该记住默认情况下安全性是打开的 - HTTP 基本授权
默认用户是,错误,用户
。
您可以在日志中找到的生成密码。例如:
2017-11-14 11:56:09.756 INFO 7304 --- [ main] b.a.s.AuthenticationManagerConfiguration :
Using default security password: 396c8870-f36e-44a5-aaea-735d5a8e950a
虽然您也可以将其关闭。例如命令行参数:
--security.basic.enabled=false
关于java - KafkaProducer 在应用程序启动时停止,说 "Closing the Kafka producer with timeoutMillis = 30000 ms",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47283166/