• Resolved alexnoxx

    (@alexnoxx)


    Hi guys,
    I am configuring the W3 Total Cache plugin on my hosting which has the following features:

    – Web server: Apache
    – LSMCD (MemcacheD from LiteSpeed)

    I’m having trouble authenticating (SASL enabled). I have entered the data requested (Object cache configuration > advanced configuration):

    • Memcached hostname:port / IP:port
    • I activate the checkbox: “Persistent connection”
    • Memcached username: Here I enter my username (SASL)
    • Memcached password: Here I enter my password (SASL)

    When I press the “test” button, the connection failed message appears. And I get the following message:

    “The following memcached servers are not responding or not running:

    • Database Cache: 127.0.0.1:11211.
    • Object Cache: 127.0.0.1:11211.
    • Page Cache: 127.0.0.1:11211.

    This message will automatically disappear once the issue is resolved.”

    I have checked with my hosting service to see if they are blocking connections and they responded that they did not apply any type of blocking.

    What could be happening?
    I attach images:

    https://ibb.co/QbbPYX1
    https://ibb.co/D8GdmN2

    Regards,
    Diego

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alexnoxx

    Thank you for reaching out and I am happy to help!

    Check the service at the CLI/SSH: memcached-tool 127.0.0.1:11211 display and memcached-tool 127.0.0.1:11211 stats.

    telnet 127.0.0.1 11211

    should communicate with memcache and respond to status commands etc

    Look if the service is running: ps afux | grep memc

    restart the service if needed (as root/sudo): service memcached restart.

    Please also restart your server if needed.

    Thanks!

    Thread Starter alexnoxx

    (@alexnoxx)

    Dear,
    I have proceeded to carry out the requested tests. I have created the following code to demonstrate that the authentication is successful:

    file t.php:
    https://www.interplastsa.com.ar/t.php

    <?php
    $mem_var = new Memcached();
    $mem_var->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
    $mem_var->setOption(Memcached::OPT_COMPRESSION, false);
    $mem_var->setSaslAuthData('interplast01', 'xxx');
    $mem_var->addServer("127.0.0.1", 11211);
    $response = $mem_var->get("SampleKey");
    if ($response) {
     echo "get(SampleKey) => " . $response;
    } else if ($mem_var->getResultCode() == Memcached::RES_NOTFOUND) {
     echo "Adding a key/value: SampleKey/SampleValue";
     $mem_var->set("SampleKey", "SampleValue") or 
     die("SampleKey Couldn't be Created: '( " . $mem_var->getResultMessage() . 
       " )' ");
    } else die ("Error in get: " . $mem_var->getResultCode() . ": " . 
          $mem_var->getResultMessage());
    ?>

    The answer obtained is:

    get(SampleKey) => SampleValue

    With this test we demonstrate that the authentication is carried out successfully. But it still doesn’t connect memcached:
    https://ibb.co/D8GdmN2

    Regards,
    Diego

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alexnoxx

    Thank you for your feedback.
    Can you please check if the memcached php extension is installed?

    Thanks!

    Thread Starter alexnoxx

    (@alexnoxx)

    Dear,
    If the memcached php extension was not installed, the test code presented above would not work (t.php):
    https://www.interplastsa.com.ar/t.php

    In the code cited above it is observed:

    $mem_var = new Memcached();
    The extension is installed and my hosting provider is not applying any blocking.

    Regards,
    Diego

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conexion fallida usando LSMCD con Apache’ is closed to new replies.