Tips for Error reply to ping from master: '-reading from master: connection reset by peer'


I would like to share how I solved that kind of issue which was bother me a lot.

Fell things to know

Since you are using Redis from Docker, You should not let exposed Redis to the internet.
Redis has security ways to protect himself against possible attacks.


Error reply to ping from master: '-reading from master: connection reset by peer'

Tip and little explanation

That type of error is almost always related to security. So, as a little good practice.
You should consider setting your docker file or docker-compose like this:

version: "3.9"
    image: redis
    container_name: n8n_redis
    command: redis-server --save 20 1 --appendonly yes --requirepass [YOUR PASSWORD]--loglevel warning
    user: root
    privileged: "true"
      - 6379:6379
    restart: always
      REDIS_APPENDFSYNC: "always"
      - ./redis/redis.conf:/usr/local/etc/redis/redis.conf

    external: "true"
    name: [Your External NetWorks HERE]

Above you can see that was set as a Password which increases your security.
Then we have DISABLE_COMMANDS which disable externals executions and avoid external and dangerous malicious commands.
Keep in mind that once you are using the password you should set ALLOW_EMPTY_PASSWORD as a NO because by default it is set to YES.

Append-only file

Take a look at Redis persistence | Redis it is related to Persistence data, so depending on your needs may you should consider reading it.

I hope to help someone who has been into that issue.

Anyway Thanks, n8n for sharing this great platform automation process.

1 Like