docker-rspamd
docker-rspamd copied to clipboard
Rspamd does not connect to Redis
Summary
The Rspamd inside the container does not connet to Redis in another container. The redis-cli inside the Rspamd container does connect.
Steps to reproduce
This happens when executing rspamd configwizard
[tiredofit/rspamd:1.7.8 20:03:52 /] $ rspamadm configwizard
...
Do you wish to set Redis servers?[Y/n]:
Input read only servers separated by `,` [default: localhost]: 172.22.0.8
Input write only servers separated by `,` [default: 172.22.0.8]:
Do you have any username set for your Redis (ACL SETUSER and Redis 6.0+)[y/N]: y
Enter Redis username:rspamd
Enter Redis password:rspamdpw
Do you have any specific database for your Redis?[y/N]: y
Enter Redis database:0
Do you want to setup dkim signing feature?[y/N]:
cannot prepare redis connection (authentication or db selection failure): Operation timed out
Cannot connect to Redis server
The connection with redis-cli works:
[tiredofit/rspamd:1.7.8 20:09:01 /] $ redis-cli -h 172.22.0.8
172.22.0.8:6379> AUTH rspamd rspamdpw
OK
172.22.0.8:6379> SELECT 0
OK
172.22.0.8:6379> KEYS *
(empty array)
I tried this with version 7 as well as with version 6 images of Redis.
What is the expected correct behavior?
The Rspamd configwizard should be able to connect to Redis
Environment
-
Image version / tag: tiredofit/rspamd:1.7.8
-
Host OS: Ubuntu 22.04.3 LTS
-
docker-compose.yaml:
version: "3.6"
services:
rspamd:
container_name: "rspamd"
image: "tiredofit/rspamd:1.7.8"
restart: "unless-stopped"
hostname: "rspamd"
expose:
- "11332/tcp"
- "11333/tcp"
- "11334/tcp"
networks:
- "docker-internal"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
TZ: "Europe/Berlin"
volumes:
- "/container/rspamd/conf:/usr/share/rspamd/config/"
- "/container/rspamd/data:/var/lib/rspamd"
depends_on:
- "redis"
logging:
options:
max-size: "5m"
max-file: "2"
redis:
container_name: "redis"
image: "redis:7.2.3"
restart: "unless-stopped"
hostname: "redis"
expose:
- "6379/tcp"
# ports:
# - "172.17.0.1:9085:80"
networks:
- "docker-internal"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
TZ: "Europe/Berlin"
volumes:
- "/container/redis/data:/data"
- "/container/redis/conf:/usr/local/etc/redis/"
entrypoint: redis-server /usr/local/etc/redis/redis.conf
logging:
options:
max-size: "5m"
max-file: "2"
networks:
docker-internal:
name: "docker-internal"
driver: "bridge"