Closed lylo closed 4 years ago
I'm not using a JSON Caddyfile. I've noticed that caddy adapt
returns this:
"storage": {
"Client": null,
"ClientLocker": null,
"Logger": null,
"address": "",
"aes_key": "",
"db": 0,
"host": "",x
"key_prefix": "",
"module": "redis",
"password": "",
"port": "",
"timeout": 0,
"tls_enabled": false,
"tls_insecure": false,
"value_prefix": ""
},
Presumably this is the root of the problem? Any advice on how to correct this would be welcome!
I have the same issue. Not working even from env or from static config
~/Sources/caddyv2/test using ☁️ default/iwc-apipy-ss-int-dtep
➜ cat Caddyfile
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: Caddyfile
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ storage redis {
3 │ address "myredisinstance.ondigitalocean.com:25061"
4 │ password "mypassword"
5 │ db 1
6 │ key_prefix "caddytls"
7 │ value_prefix "caddy-storage-redis"
8 │ timeout 5
9 │ tls_enabled "false"
10 │ tls_insecure "true"
11 │ aes_key "redistls-01234567890-caddytls-32"
12 │ }
13 │ }
14 │
15 │ # lb.cloud.skynewz.local:80 {
16 │ # respond /health "OK" 200
17 │ # }
18 │
19 │ localhost {
20 │ respond "Hello, world!"
21 │ }
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~/Sources/caddyv2/test using ☁️ default/iwc-apipy-ss-int-dtep
➜ ./caddy-redis run
2020/10/15 00:30:57.033 INFO using adjacent Caddyfile
2020/10/15 00:30:57.036 INFO admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["127.0.0.1:2019", "localhost:2019", "[::1]:2019"]}
2020/10/15 00:30:57.036 INFO caddy.storage.redis TLS Storage are using Redis, on :6379
run: loading initial config: loading new config: loading storage module: loading module 'redis': provision caddy.storage.redis: dial tcp :6379: connect: connection refused
I've built Caddy with the
caddy-tlsredis
module but I'm seeing connection problems. Caddy version:I have configured Caddy as follows:
However I'm seeing this in the logs when starting Caddy:
It's quite likely I've made a mistake somewhere but it's unclear to me where! I am aware that
127.0.0.1:6379
is the Redis default but I don't understand why Caddy (or this module) is attempting to connect to it, given that I have specified the host and port as well as address. I have also tried setting just theaddress
and also just thehost
andport
. I've even tried adding CADDY_CLUSTERING_REDIS_PORT etc in the environment but I still get the same error.Thanks in advance.