Previous Application log print error message:
There is no problem with the Telnet port and Ping on the app, so why not get the value?
Install a Redis client first to test: yum-y Install Redis
Redis-cli-h 192.168.32.12-p 6887
Then the error is:
(Error) DENIED Redis is running in protected mode because protected mode is ...
Later, you can view the configuration discovery redis.conf the line is also commented:
# Requirepass Foobared
Continue troubleshooting the discovery is related to a parameter configuration:
Redis can only be linked via local localhost (127.0.0.1), not network IP (192.168..). This link, the problem if you use the Network IP link will report the following error:
(Error) DENIED Redis is running in protected mode because protected mode are enabled, no bind address was specified, no authenticat Ion password is requested to clients. The This mode connections is only accepted from the Lookback interface. If you want-to-connect from external computers to Redis-adopt one of the following solutions:1) Just disable prot ected 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 are not publicly accessible from Internet if your 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 PROTECTE d mode option to ' No ', and then restarting the server. 3) If You started the server manually just for testing, restart it with the--portected-mode no option. 4) Setup A bind address or an authentication password. Note:you only neeD to does one of the above things in order for the server to start accepting connections from the outside.
is said to be in protected mode, only local links, we need to modify the configuration file. /redis.conf
1) Open the configuration file and comment out the corresponding comments below
# bind 127.0.0.1
2) Redis default is not run as daemon, can be modified by this configuration item, use Yes to enable daemon, set to No
Daemonize No
3) Protection mode
Protected-mode No
Error Handling :
One
Remove comments from the corresponding configuration conf file and change Yes to No
#protected-mode Yes
Protected-mode No
Restart Redis (caution when data is available)
Kill-9 Process Number
Redis-cli-h 192.168.32.12-p 6887 shutdown
Second, add authentication, set the password
# Requirepass Foobared
Requirepass redis123456
Verify
Once again, use the Java program to establish the connection pool, no error, and the Redis server can be normal data processing. Program error log no longer displayed
Problem solving
This article is from the "7835882" blog, please be sure to keep this source http://crfsz.blog.51cto.com/7835882/1878137
Redis solution (DENIED Redis is running in protected mode because Prote)