Workaround for Redis Could not connect to Redis at 127.0.0.1:6379:connection refused during Linux redis authentication Interactive Connection

Source: Internet
Author: User

Could not connect to Redis at 127.0.0.1:6379:connection refused

1. Locate redis.conf and modify Daemonize No to daemonize Yes so you can run the background by default

[Email protected] trade01 conf.d]# vi/etc/redis.conf

2. Turn on the client to ensure server-side startup

[Email protected] trade01 src]#./redis-server. /etc/redis.conf

Now you can access it normally.

[Email protected] trade01 src]#./redis-cli

Redis 127.0.0.1:6379>set Foo Bar

Ok
127.0.0.1:6379> get foo
"Bar"
127.0.0.1:6379>

If you still have an error

View the configuration file and find that Bind is written as:

Bind 127.0.0.1

Modify the configuration to

Bind 192.168.0.129

192.168.0.129 is the address of the server where Redis resides

Start again

(If bind 127.0.0.1 is modified in order for 192.168.0.129 to start, if not successful, add the 127.0.0.1.

Two addresses to be separated by a space)

Workaround for Redis Could not connect to Redis at 127.0.0.1:6379:connection refused during Linux redis authentication Interactive Connection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.