首页 > 数据库 >Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Failed

Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Failed

时间:2022-11-26 11:12:28浏览次数:70  
标签:Exception java thread centos clients redis 命令 systemctl

背景:idea 使用在java程序中练习使用redis.

Caused by: java.net.SocketTimeoutException: connect timed out

解决过程:

linux 虚拟机或者说服务器没有关闭防火墙

命令:systemctl stop firewalld
发现:
systemctl: command not found

百度一番之后发现centos 使用 service 命令替代systemctl

还是不行,

再查看发现centos版本不对,使用的命令也不对,centos关闭防火墙的命令

但是java还是连接不上redis.

标签:Exception,java,thread,centos,clients,redis,命令,systemctl
From: https://www.cnblogs.com/javaxubo/p/16927080.html

相关文章