- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我是 Spring 云数据流的新手。
我在 kafka_2.11-1.1.0 中创建了一个主题./kafka-console-producer.sh --broker-list localhost:9092 --topic test
我在 Scdf 中注册了 redis-pubsub (spring-cloud-dataflow-server-local-1.3.0.RELEASE.jar):
sink.redis-pubsub=maven://org.springframework.cloud.stream.app:redis-sink-kafka-10:1.3.1.RELEASE
sink.redis-pubsub.metadata=maven://org.springframework.cloud.stream.app:redis-sink-kafka-10:jar:metadata:1.3.1.RELEASE
:test>redis-pubsub --key=msgs --host=127.0.0.1 --port=6379
中创建了以下流,但它的部署失败了。我想调试 redis-pubsub 源以了解问题,但我找不到它。你能帮帮我吗?
这是流日志:
2018-04-24 15:49:56.322 ERROR 8241 --- [main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.stream.app.redis.sink.RedisSinkConfiguration': Unsatisfied dependency expressed through field 'redisConnectionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration$RedisConnectionConfiguration.class]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is localhost master is running...
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.cloud.stream.app.redis.sink.kafka.RedisSinkKafka10Application.main(RedisSinkKafka10Application.java:29) [classes!/:1.3.1.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [redis-sink-kafka-10-1.3.1.RELEASE.jar:1.3.1.RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [redis-sink-kafka-10-1.3.1.RELEASE.jar:1.3.1.RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [redis-sink-kafka-10-1.3.1.RELEASE.jar:1.3.1.RELEASE]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [redis-sink-kafka-10-1.3.1.RELEASE.jar:1.3.1.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration$RedisConnectionConfiguration.class]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is localhost master is running...
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
... 27 common frames omitted
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is localhost master is running...
at redis.clients.jedis.JedisSentinelPool.initSentinels(JedisSentinelPool.java:180) ~[jedis-2.9.0.jar!/:na]
at redis.clients.jedis.JedisSentinelPool.<init>(JedisSentinelPool.java:95) ~[jedis-2.9.0.jar!/:na]
at redis.clients.jedis.JedisSentinelPool.<init>(JedisSentinelPool.java:76) ~[jedis-2.9.0.jar!/:na]
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createRedisSentinelPool(JedisConnectionFactory.java:263) ~[spring-data-redis-1.8.9.RELEASE.jar!/:na]
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createPool(JedisConnectionFactory.java:248) ~[spring-data-redis-1.8.9.RELEASE.jar!/:na]
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.afterPropertiesSet(JedisConnectionFactory.java:237) ~[spring-data-redis-1.8.9.RELEASE.jar!/:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
... 37 common frames omitted
最佳答案
当redis-sink 应用程序无法连接到Redis 集群时会出现此错误。您似乎正在尝试连接到 localhost
。
你可以,
java -jar redis-sink-kafka-10:1.3.1.RELEASE.jar
如果一切设置正确,此应用程序应该默认连接到 localhost
上的 Redis 实例。如果它在这种模式下工作,它也将在 SCDF 中工作。
关于redis - 官方 redis-pubsub 源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50004516/
对新版本 com.google.cloud.pubsub.spi.v1.Publisher.publish(pubsubMessage).get() 的调用永远挂起。我不确定问题是什么。 代码片段:
根据这里:https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage 当发布者向队列发送消息时,不应填充时间戳字段。所以这
Google PubSub 是否适合小批量(10 条消息/秒)但任务关键型消息传递,保证在任何固定时间段内及时传递每条消息? 或者,它是否更适合高吞吐量,其中个别消息可能偶尔会丢失或无限期延迟? 编辑
我们创建了一个 pull使用 GCP Web GUI 的默认确认截止时间为 10 秒的 PubSub 订阅。原来是我们太乐观了,我们的服务处理一批拉取的消息需要10多秒的时间。该服务不会抛出异常,它实
批处理 pubsub 请求的 NODEJS 示例代码如下所示: // Imports the Google Cloud client library const PubSub = require(`@
在 Google PubSub 中,可以异步调用来自客户端的发布调用。因此,我认为可以同时触发多个发布请求并将其发送到服务器,尤其是在批处理阈值太低的情况下。 如果这是真的,pubsub 客户端如何控
根据堆栈驱动程序图表,我们开始注意到某个主题/订阅的“未确认消息”数量不时增加。 症状 我不知道我们可以信任多少堆栈驱动程序图表,但我已经检查过: 拉取操作数与发布操作数一样多 问题发生时ack操作计
我有一个将数据写入 Google Cloud pubsub 的应用程序,根据 pubsub 的文档,由于重试机制导致的重复是偶尔会发生的事情。还有乱序消息的问题,这在 pubsub 中也不能保证。 另
我有一个包含多个拉取订阅的 pubsub 主题。我想要某种机制,我可以在其中发布带有“优先级”标签的消息,使消息尽可能地跳到队列的前面。 我不需要任何有保证的排序语义,只需要“尽力而为”的优先级机制。
我在我们的平台中集成了 GMB API,并与 PubSub 合作以获取实时评论通知。 为此,我已经完成了以下步骤: Created topic在谷歌 PubSub 云上。 创建了它的 subscrip
试图找出在本地测试 PubSub 推送端点的最佳方法。我们尝试过使用 ngrok.io,但您必须拥有域才能加入白名单(这样做的工具也已损坏……导致无限重定向循环)。我们还尝试在本地模拟 PubSub。
我们希望通过带有 pubsub 触发器 ( https://firebase.google.com/docs/functions/pubsub-events ) 的 firebase 云函数接收有关某
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 2年前关闭。 Improve t
我有一个向 PubSub 主题发布消息的简单服务,偶尔会收到“已超过截止日期”错误消息: GaxError(RPC failed, caused by ) Python代码: from google.
我的应用程序发布少量消息(最多每几秒 1 条)。它不订阅。 首次使用时,PubSub 会创建 60 个永久保持事件状态的线程,如下所示: "grpc-default-worker-ELG-1-1 Id
我想检查运行代码是否有权在特定项目中执行“pubsub.topics.list”。这段代码: try (TopicAdminClient admin = getTopicAdmin()) {
我正在开发微博 spring mvc hibernate 应用程序。我需要实现像推特这样的发布订阅功能。 我正在使用 RabbitMQ 通过 Spring AMQP 抽象进行消息传递。 我在网络上到处
我对 Airflow 很陌生,并尝试使用 apache Airflow 与 google pubsub 的集成,我猜它是添加到“Airflow-300”JIRA 下的。如果我在这里阅读不正确,请纠正我
我正在学习 https://www.woolha.com/tutorials/node-js-google-cloud-pub-sub-basic-examples 上的教程并且有一些困难.. 我在
我在我的 .net 核心微服务中使用 DAPR 和 Docker。我在 docker-compose.yml 中进行了以下配置以运行代理和 dapr pubsub 配置。 PUBSUB.yml api
我是一名优秀的程序员,十分优秀!