cheprasov / php-redis-client

RedisClient is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0
MIT License
126 stars 41 forks source link

Cannot connect to database #64

Closed derek-maurer closed 6 years ago

derek-maurer commented 6 years ago

Hello, I'm running into some issues getting php-redis-client working in my laravel project. I included it in my composer packages and installed it, however, the client cannot connect to the redis.

"stream_socket_client(): unable to connect to tcp://127.0.0.1:6379 (Connection refused)"

screen shot 2018-06-21 at 1 04 14 pm

As you can see the redis server is running and I can connect to it using the exact same host and port the codebase is attempting to use:

screen shot 2018-06-21 at 1 04 25 pm screen shot 2018-06-21 at 1 04 44 pm

Here's my code for reference.

screen shot 2018-06-21 at 1 06 02 pm
cheprasov commented 6 years ago

Hey @HomeSchoolDev I checked and the client works well. Really it does not look like a problem with the client. It looks like the client tries to connect to a server without a redis-server.

Please check network setting, firewall (opened ports) and redis config ("protected mode" setting in redis config).

Also, please check redis-server on the server with IP 192.168.64.2