Closed robacarp closed 4 years ago
Any update on this? I'm having troubles connecting over URL through :36
, getting:
Unhandled exception: Errno: connect: Cannot assign requested address (Redis::CannotConnectError)
Using proper connection string redis://cache:6379/4
, and for which Redis instance seems usable by open-source library Crecto
. Any reason for this? Application is run in docker.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
838a43ccae0d my_pkg "/bin/bash" 47 hours ago Up 8 hours 0.0.0.0:3000->3000/tcp my_pkg_1
60641bf0b38d redis "docker-entrypoint.s…" 47 hours ago Up 8 hours 6379/tcp my_redis_1
@duraki are you setting the Connection string via env var? I don’t see any reason here why that wouldn’t work
Strange. Seems like it works now; after rebooting my system. Still, would love to see this implemented, will try to send a PR soon.
fixed by #51
https://github.com/robacarp/mosquito/blob/515fad360820ac8b961555ab6f0e3c07de7df6bf/src/mosquito/redis.cr#L34-L40
These lines shouldn't attempt to connect to redis directly, but read from a configuration object with default values.