Redis template no longer works for separate data container

It seems that redis changed the default for protected mode so that if you’ve got a separate data container it no longer allows connections. My caveman solution is to add this to data.yml in the hooks section.

  after_redis:
    - replace:
        filename: "/etc/redis/redis.conf"
        from: /^protected-mode yes/
        to: "protected-mode no"

There’s probably a smarter way to allow only connections from the docker network or some such, so I’ll leave it to someone more clever than I to submit a PR.

EDIT: If you see errors that look like

Failed to report error: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no auth
entication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect
 from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no'

then this is the solution.

7개의 좋아요

@dan can advise here.

3개의 좋아요

Default protected mode is a bit overkill, especially since the container is not exposing any of this, I say we change the base image here to default not protected

4개의 좋아요

I may not understand, but my take is that they changed the default upstream.

Someone decided that it was time to grow up and that wide open defaults was a bad idea. :slight_smile:

4개의 좋아요

Awww you’re taking all my fun away by not letting me blame @dan :kissing_heart:

3개의 좋아요

And FWIW, a standard single container install works fine.

1개의 좋아요

Sure which is fine, but we can ship our own default :blush:

6개의 좋아요

That’s the pr that I would have submitted!

5개의 좋아요

This topic was automatically closed after 27 hours. New replies are no longer allowed.