I'm trying the Jedis (Redis for Java) "Basic usage example" from https://github.com/xetorthio/jedis/wiki/Getting-started but I'm getting the following error:
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:42)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused
I'm trying this on OSX 10.9.2 with Jedis-2.4.2, commons-pool2-2.0
Had the same trouble. All the tutorials online show just running some simple Java BUT you need to have the redis server running on your computer (duh...). As a noobie I thought it all came in the jar but it does not. It is a database just like Mongo or whatever. Try this:
redis download
After you download, unzip it into the UserApps folder (on windows) and then run redis-server.exe. A window will pop up with the port and such in it. Then run your java. Bam, works like a charm!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With