• Hi,
    The plugin installed and proper configured but it’s not working. My hosting developer checked and found 2 errors in class_purge_varnish.php

    Line 22
    const PURGE_VARNISH_DEFAULT_TREMINAL = ‘127.0.0.1:6082’;
    You have defaulted the port to 6082, while some hosting environment may have use other port(s)

    Besides, there was an extra information in
    Line 147
    Original
    $pack = $challenge . “\x0A” . $secret . “\x0A” . $challenge . “\x0A”;

    Edited
    $pack = $challenge . “\x0A” . $secret . $challenge . “\x0A”;

    Now it works.

    Please verify from your end.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thank you! rmvalues

    Hi, I’m the developer.

    Here’s an excerpt from varnishadm command’s source (S_fd is the fd of the varnish.key file):

       SHA256_Update(&ctx, challenge, 32);
        SHA256_Update(&ctx, "\n", 1);
        do {
            i = read(S_fd, buf, sizeof buf);
            if (i > 0)
                SHA256_Update(&ctx, buf, i);
        } while (i > 0);
        SHA256_Update(&ctx, challenge, 32);
        SHA256_Update(&ctx, "\n", 1);

    As you can see there’s no \n after the secret key. Your plugin’s original implementation implies that there’s a trailing \n after the secret. This is not true in all cases, so IMHO you should follow varnishadm’s implementation

    Hello,

    I am varnish 6.5.1 + Ubuntu 20.04.

    Previously I cannot use plugin, it always says: The Varnish control terminal is not responding at 127.0.0.1:6082

    Only I change line 147 of purge_varnish.php, it says: Status:
    Server OK: 127.0.0.1:6082 Varnish running.

    Documentation is not always correct/updated? I think it is not very rare for varnish.

    ??

    • This reply was modified 3 years, 11 months ago by meken.

    @strkol

    This is the only working varnish plugin for varnish 6.5, after @rmvalues change on 147 (“”). Thank you all!

    Do you have plan to fix this small “bug”?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working’ is closed to new replies.