当前位置:   article > 正文

DENIED Redis is running in protected mode because protected mode is enabled, no bind address was ...

denied redis is running in protected mode because protected mode is enabled,

Caused by: redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

at redis.clients.jedis.Protocol.processError(Protocol.java:117)

at redis.clients.jedis.Protocol.process(Protocol.java:151)

at redis.clients.jedis.Protocol.read(Protocol.java:205)

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)

at redis.clients.jedis.Connection.getIntegerReply(Connection.java:222)

at redis.clients.jedis.Jedis.hset(Jedis.java:606)

at org.apache.flink.streaming.connectors.redis.common.container.RedisContainer.hset(RedisContainer.java:84)

at org.apache.flink.streaming.connectors.redis.RedisSink.invoke(RedisSink.java:155)

at org.apache.flink.streaming.api.functions.sink.SinkFunction.invoke(SinkFunction.java:50)

at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:54)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)

at org.apache.flink.streaming.runtime.tasks.BroadcastingOutputCollector.collect(BroadcastingOutputCollector.java:77)

at org.apache.flink.streaming.runtime.tasks.BroadcastingOutputCollector.collect(BroadcastingOutputCollector.java:32)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)

at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)

at org.apache.flink.streaming.api.operators.StreamFilter.processElement(StreamFilter.java:39)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)

at org.apache.flink.streaming.api.operators.StreamFilter.processElement(StreamFilter.java:39)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)

at org.apache.flink.streaming.api.operators.StreamFilter.processElement(StreamFilter.java:39)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)

at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)

at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)

at org.apache.flink.streaming.api.operators.StreamSourceContexts$NonTimestampContext.collect(StreamSourceContexts.java:197)

at org.apache.flink.streaming.api.operators.StreamSourceContexts$NonTimestampContext.collectWithTimestamp(StreamSourceContexts.java:204)

at org.apache.flink.streaming.api.operators.StreamSourceContexts$SwitchingOnClose.collectWithTimestamp(StreamSourceContexts.java:108)

at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecordsWithTimestamps(AbstractFetcher.java:365)

at org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher.partitionConsumerRecordsHandler(KafkaFetcher.java:183)

at org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher.runFetchLoop(KafkaFetcher.java:142)

at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:826)

at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:116)

at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:73)

at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323)

将文件位置切换为redis文件夹下的src中

进入redis数据库

redis-cli

执行

CONFIG SET protected-mode no

结果

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/698397
推荐阅读
相关标签
  

闽ICP备14008679号