I cloned ejabberd from GitHub (
I was able to start ejabberd, register users, and chat without problems on a clean install.
Then, I added some lines to my ejabberd.yml file to configure it to use Redis for session management storage (sm_db_type settting).
Here are the lines I added:
## Set session storage type
sm_db_type: redis
ejabberd still starts up, but I get this error message:
2016-05-10 15:28:21.470 [error] <0.327.0>@ejabberd_redis:connect:161 Redis connection at 127.0.0.1:6379 has failed: undef; reconnecting in 10 seconds
2016-05-10 15:28:21.470 [info] <0.328.0>@ejabberd_sm_redis:clean_table:135 Cleaning Redis SM table...
2016-05-10 15:28:21.475 [error] <0.328.0>@ejabberd_sm_redis:clean_table:168 failed to clean redis table for server localhost: {error,undef}
I then tried explicitly setting the connection information in the ejabberd.yml, even though these are the defaults:
redis_server: "localhost"
redis_port: 6379
redis_db: 0
Still, no luck. Any ideas? I have successfully connected to the Redis server on my laptop with the Ruby redis client gem and the eredis library that ejabberd uses.
error undef... may mean that
error undef... may mean that erlang can't find some required module.
When compiling ejabberd, remember to enable compilation od Redis stuff:
Thanks! That worked. I still
Thanks! That worked. I still can't believe that the docs don't even mention anything regarding the --enable flags. I ran into this same issue with Riak & Ejabberd, but the Riak error is easier to interpret.
Riak error: {"no such file or directory", "riakc.app"}}
I have written up some steps to install ejabberd with Riak & Redis support here:https://gist.github.com/holtbp/67356943dfc0900573806d9dc123b619