artemeff / redis

Redis commands for Elixir
MIT License
358 stars 63 forks source link

Exredis not connecting to the Redis server #82

Closed LindaKadz closed 5 years ago

LindaKadz commented 5 years ago

I can't get Exredis to connect to the Redis server, neither can I get any of the functions to work. I keep on getting this error when using Exredis.start_using_connection_string("redis://127.0.0.1:6379")

            `{:connection_error, :econnrefused}
        ** (EXIT from #PID<0.391.0>) shell process exited with reason: {:connection_error, :econnrefused}`

And when using

Exredis.Api.set("foo", "bar")

I get this error

** (EXIT from #PID<0.394.0>) shell process exited with reason: an exception was raised: ** (MatchError) no match of right hand side value: {:error, :nxdomain} (eredis) /app/deps/eredis/src/eredis_client.erl:304: :eredis_client.connect/1 (eredis) /app/deps/eredis/src/eredis_client.erl:85: :eredis_client.init/1 (stdlib) gen_server.erl:374: :gen_server.init_it/2 (stdlib) gen_server.erl:342: :gen_server.init_it/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

I have tried starting it as a child and still nothing has changed. I have configured it on my config.exs as the setup instructions say but there's no change. Anything I may be missing out or any help? I'll really appreciate it. Thanks.

artemeff commented 5 years ago

:nxdomain is an Erlang error, when your network configuration is invalid. Refer to these issues to find out solution: