• Resolved PSanma

    (@psanma)


    Hello,

    I’m using the DigitalOcean one-click install which comes with the plugin bundled. I’m using a Managed MySQL DB to which I connect without a problem through the private network and a Managed Redis database as well. When I try to connect to Redis however, the plugin says “Connection Test: Failed”.

    Does it not work properly when Redis is running on a separate server?

    I have tried both through the public and private networks. I can do the following as mentioned in the DigitalOcean docs to test and connect to the redis server without a problem:

    telnet HOST PORT

    But the plugin still says the test failed.

    I have added the Host, Port, User (though the plugin says it’s only for LSMCD) and password. DB Id is set to 0.

    Any ideas what might be going wrong?

    Thank you.

    • This topic was modified 4 years, 2 months ago by PSanma.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    if you use create a php file with this code , replace hostname/port/password to your own

    <?php 
    $redis = new Redis(); //Connecting to Redis 
    $redis->connect('hostname', port); 
    $redis->auth('password'); 
    if ($redis->ping()) { 
    echo "PONG"; 
    } 
    ?>

    and access it , what does it return ?

    Thread Starter PSanma

    (@psanma)

    It seems you also replied on DO, thank you!

    I was getting a 500 error, enabled error display and got:

    Fatal error: Uncaught RedisException: read error on connection to private-SERVER-do-user-NUMBER-0.a.db.ondigitalocean.com:25061 in /var/www/html/redis_test.php:8 Stack trace: #0 /var/www/html/redis_test.php(8): Redis->auth() #1 {main} thrown in /var/www/html/redis_test.php on line 8

    The password on that line seems to be correct though.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yeah … please do not post same issue on multiple places

    then try with command line

    redis-cli -h 127.0.0.1 -p 6379 -a ‘thisizmy!PASS’

    change the datas to your own , and see if you can connect

    Best regards,

    Thread Starter PSanma

    (@psanma)

    My apologies, I didn’t expect you to reply there as well. I posted there just in case it was an issue with DO.

    root@web-01:/var/www/html# redis-cli -h private-SERVER-do-user-NUMBER-0.a.db.ondigitalocean.com -p 25061 -a ‘password’
    Warning: Using a password with ‘-a’ or ‘-u’ option on the command line interface may not be safe.
    private-SERVER-do-user-NUMBER-0.a.db.ondigitalocean.com:25061>

    It looks like it can connect without a problem.

    Screenshot of my settings: https://i.imgur.com/ROzTg5T.png

    Plugin Support qtwrk

    (@qtwrk)

    in your screenshot , username should be empty

    Thread Starter PSanma

    (@psanma)

    The problem persists with or without user there.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    based on your reply in DO, this is more like PHP issue instead of plugin issue , let’s keep conversation there then.

    Best regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redis not working if running on a separate server’ is closed to new replies.