# Il template Redis non funziona più per il contenitore dati separato

**URL:** <https://meta.discourse.org/t/redis-template-no-longer-works-for-separate-data-container/109704>\
**Category:** Bug\
**Created:** [20 Febbraio 2019, 10:37pm UTC](https://meta.discourse.org/t/redis-template-no-longer-works-for-separate-data-container/109704 "2019-02-20T22:37:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [20 Febbraio 2019, 10:37pm UTC](https://meta.discourse.org/t/redis-template-no-longer-works-for-separate-data-container/109704/1 "2019-02-20T22:37:35Z")

</div>

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.

```plaintext
  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

```plaintext
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.

---

_[View the full topic](https://meta.discourse.org/t/redis-template-no-longer-works-for-separate-data-container/109704)._
