2016-10-25 64 views
1

我試圖在4個虛擬機上運行擴展的雅虎基準測試。每次我嘗試運行「STORM_TEST」時,都會收到以下錯誤消息。我嘗試配置'redis.conf',但仍然得到相同的錯誤。我在下面顯示了錯誤和我的'redis.conf'文件。Redis正在保護模式下運行

錯誤:

Caused by: java.lang.Exception: 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.protocol$read_error_reply.invoke(protocol.clj:86) 
at redis.protocol$read_reply.invoke(protocol.clj:119) 
at redis.connection$send_command_and_read_reply.invoke(connection.clj:42) 
at redis.connection$make_connection.invoke(connection.clj:75) 
at redis.connection_pool$make_connection_factory$reify__495.makeObject(connection_pool.clj:21) 
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1190) 
at redis.connection_pool.ConnectionPool.get_connection(connection_pool.clj:11) 
at setup.core$do_new_setup.invoke(core.clj:211) 
at setup.core$_main.doInvoke(core.clj:284) 
at clojure.lang.RestFn.invoke(RestFn.java:436) 
at clojure.lang.Var.invoke(Var.java:388) 
at user$eval5.invoke(form-init4687907619169214448.clj:1) 
at clojure.lang.Compiler.eval(Compiler.java:6782) 
at clojure.lang.Compiler.eval(Compiler.java:6772) 
at clojure.lang.Compiler.load(Compiler.java:7227) 
... 11 more 

REDIS.CONF:

bind 127.0.0.1 
protected-mode no 
port 6379 
tcp-backlog 511 
timeout 0 
tcp-keepalive 300 
daemonize no 
supervised no 
pidfile /var/run/redis_6379.pid 
loglevel notice 
logfile "" 
databases 16 
save 900 1 
save 300 10 
save 60 10000 
stop-writes-on-bgsave-error yes 
rdbcompression yes 
rdbchecksum yes 
dbfilename dump.rdb 
dir ./ 
slave-serve-stale-data yes 
slave-read-only yes 
repl-diskless-sync no 
repl-diskless-sync-delay 5 
repl-disable-tcp-nodelay no 
slave-priority 100 
appendonly no 
appendfilename "appendonly.aof" 
appendfsync everysec 
no-appendfsync-on-rewrite no 
auto-aof-rewrite-percentage 100 
auto-aof-rewrite-min-size 64mb 
aof-load-truncated yes 
lua-time-limit 5000 
slowlog-log-slower-than 10000 
slowlog-max-len 128 
latency-monitor-threshold 0 
notify-keyspace-events "" 
hash-max-ziplist-entries 512 
hash-max-ziplist-value 64 
list-max-ziplist-size -2 
list-compress-depth 0 
set-max-intset-entries 512 
zset-max-ziplist-entries 128 
zset-max-ziplist-value 64 
hll-sparse-max-bytes 300 
activerehashing yes 
client-output-buffer-limit normal 0 0 0 
client-output-buffer-limit slave 256mb 64mb 60 
client-output-buffer-limit pubsub 32mb 8mb 60 
hz 10 
aof-rewrite-incremental-fsync yes 

任何幫助深表感謝。謝謝。

+1

你嘗試異常中給定的步驟是什麼?我想,這樣做會解決問題 –

+1

您是否在更改redis.conf之後重新啓動了服務器?用於運行Redis的命令是什麼? –

+0

@KarthikeyanGopall和Pascal Le Merrer:謝謝你的快速回復。是的,我嘗試了更改'redis.conf'的第二步,然後重新啓動服務器。但它似乎redis沒有看到該文件。然後,我在啓動redis時手動爲腳本指定了配置文件的路徑,然後運行。 –

回答

2

我認爲你應該做參考到您的配置文件

26399:C 16 Jan 08:51:13.413 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf 

,你可以嘗試啓動Redis的服務器一樣

./redis-server /path/to/redis-stable/redis.conf 
+0

謝謝你的回答。但是,我現在不在做這個項目。所以,我無法嘗試你的方式。但是你的回答對某人會有幫助。 :-) –

相關問題