• Resolved benz1

    (@benz1)


    I’ve been having a problem with lots of critical issues in the WP Dashboard and noticed that the error_log `is full of thousands of connection refused issues, e.g.
    [17-Feb-2022 15:49:28 UTC] Connection refused
    [17-Feb-2022 15:49:34 UTC] Connection refused
    [17-Feb-2022 15:51:19 UTC] Connection refused

    After Googling I found the support post at https://www.ads-software.com/support/topic/connection-refused-error_log/ (and article at https://io.bikegremlin.com/12583/server-website-problems/#p3) withthe same issue that suggests an issue with Redis cache when used with this plugin). My object cache is also showing connection failed. I’m on a shared host so don’t have access to the root to run any commands. I tried to run the Redis test file in the debug section but couldn’t get it to run. I have disabled Object cache in the meantime. I raised a support ticket with my host asking if they could restart/reinstall the Redis service but they replied, “Redis on the server is not something we start/restart it is installed on the server as a whole and accessed by each account that is needing it. You can stop using it via any method you have started using it by then start using it again. Since you are pointing to the issue with Litespeed cache, I would suggest contacting them as it is their caching system. We also use their webserver which is refusing the connection, according to the log you have provided.”

    Any suggestions on what I can do or what I can say to my host? Thanks in anticipation.

    Report number: UPPCEFEP

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Does your provider provide you Redis ?

    if you create a php file with code

    <?php
    $redis = new Redis();
    $redis->connect('127.0.0.1', 6379);
    $res = $redis->ping();
    echo $res;

    access it by browser, what does it say ?

    best regards,

    Thread Starter benz1

    (@benz1)

    According to the host they do (although I don’t know if I need to do anything to activate it on the account) but when I run this file I get,
    Fatal error: Uncaught RedisException: Connection refused in /home/xxxx/public_html/redis.php:3 Stack trace: #0 /home/xxxx/public_html/redis.php(3): Redis->connect('127.0.0.1', 6379) #1 {main} thrown in /home/xxxx/public_html/redis.php on line 3
    Thanks

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yeah , that indicates the Redis is not running or not accepting connection with the simple test script

    you will need your provider’s to solve it first , make sure that simple test script works , where it should gives “1” return

    after that if the test script works and plugin doesn’t work , that’s the time we need to investigate

    Best regards,

    Hi, I just had the same problem and between the host EAPPS using Jelaastic and me, it was solved, but actually in this case I think it was a Jelastic problem (neither Litespeed or host) which made it more complicated and the fix won’t apply to others.

    Sorry for long intro – here is the problem:

    1. The file /etc/systemd/system/redis.service.d/override.conf was set to –daemonize no which overrode the /etc/redis.conf file and was inaccessible to the user
    2. And in the redis.conf file the port was not set to 6379
    3. So in effect there was no way to get it to work as the plugin config wanted it to work out of the box. Also it would help if the plugin defaulted to 127.0.0.1 since that’s what the redis.conf file wants.

      Cheers
      Mike

      PS the installation for the litespeed server came from here: Jelastic Litespeed Github Installer

    • This reply was modified 2 years, 9 months ago by 5doc.
    Thread Starter benz1

    (@benz1)

    @qtwrk in my case, I went back to the host and they replied, “Redis was installed on the server, but it was not added to the cageFS for your account. I have added it to your cageFS and it should be able to be accessed now”. The above script is now returning the “1” (although the Redis test file at https://docs.litespeedtech.com/lscache/lscwp/admin/#how-to-debug is still failing) but the Object cache page is still showing the connection test as Failed. I’ve checked the page on several other sites on the same server and it’s showing the Connection test as ‘unavailable’.

    Any suggestions?

    Thanks.

    Please see #1 of my post above. Check this file if you can.

    Thread Starter benz1

    (@benz1)

    Thanks @5doc but I don’t have root access so cannot check this file.

    Not even to read it?

    Ask your host.

    If it is set to daemonize NO you might be able to override without root access via the CLI and Redis will work until there is a reboot.
    redis-server --daemonize yes

    Plugin Support qtwrk

    (@qtwrk)

    daemonized or not , does not really matter , as long as there is a redis process running and accept connection

    what was host/port setting your provider used in test script makes it return 1 ? apply same host/port to plugin’s setting ought do it

    • This reply was modified 2 years, 9 months ago by qtwrk.
    Thread Starter benz1

    (@benz1)

    Thanks @qtwrk it was port 6379 as per the script you provided above. I checked the cache page and even though I had Redis selected it was showing the Memcached port of 11211 so I changed it to 6379, saved the changes and the connection test has now passed. So I’ve re-enable Object Cache and will see how I get on. Thanks for your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Connection refused (Redis issue)’ is closed to new replies.