JAvaはjedisを使用してlinux上のredisサービスに接続できません

1532 ワード

java  jedis  redis。
reids         ,ip 192.168.216.128,    ping    ,  xshell         。
     redis    ,    ,         。

  :
     telnet+          java      redis。

    :
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
	at redis.clients.jedis.Connection.connect(Connection.java:134)
	at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:69)
	at redis.clients.jedis.Connection.sendCommand(Connection.java:79)
	at redis.clients.jedis.Connection.sendCommand(Connection.java:75)
	at redis.clients.jedis.BinaryClient.auth(BinaryClient.java:499)
	at redis.clients.jedis.Jedis.auth(Jedis.java:1963)
	at com.liyh.web.JedisDemo.test1(JedisDemo.java:13)
	at com.liyh.web.JedisDemo.main(JedisDemo.java:188)
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:529)
	at redis.clients.jedis.Connection.connect(Connection.java:129)

    ,          ,       ,  ! 

 
linuxのファイアウォールを閉じればいい