kstyrc / embedded-redis

Redis embedded server for Java integration testing
840 stars 368 forks source link

Can't start RedisServer on Debian x32 #61

Open uanian opened 8 years ago

uanian commented 8 years ago

Can't start redis-server on Debian x32, while on x64 systems it's working

kstyrc commented 8 years ago

Any error log?

uanian commented 8 years ago

Log is empty, but when i tried to run redis-server in terminal from /tmp/guid, received - exec format error

kstyrc commented 8 years ago

Hmmm, that's probably the thing that redis is compiled for x64 rather than x86. I will try to release new version with the fixed redisserver binary for x86 systems.

For now, you can use a workaround - download & compile redis-server from: http://download.redis.io/releases/ Then, use this builder to construct RedisServer:

RedisExecProvider customProvider = RedisExecProvider.defaultProvider()
  .override(OS.UNIX, Architecture.x86, "/path/to/unix/redis-x86")   // <-- provide path to x86 binary
  .override(OS.UNIX, Architecture.x64, "/path/to/unix/redis-x64");   // <-- provide path to x64 binary

RedisServer redisServer = new RedisServer(customProvider, 6379);

My bad.

stianl commented 8 years ago

I had the same problem. Made PR #62 for this