I'm trying to connect to my virtual machine Redis
package nosql;
import redis.clients.jedis.Jedis;
public class NoSQL {
public static void main(String[] args) {
//I try port: ("127.0.0.1",6379)
Jedis jedis = new Jedis("127.0.0.1",60448);
if(jedis.isConnected())
System.out.println("connected");
jedis.ping();
jedis.set("key1", "value1");
System.out.println(jedis.get("key1"));
}
}
My Redis configuration:
I have already put the virtual machine in bridge mode (I do not know if there has).
I am researching the hours and not getting answers.
Does anyone know what the error?