{"action":"opened","issue":{"url":"https://api.github.com/repos/eclipse/leshan/issues/173","repository_url":"https://api.github.com/repos/eclipse/leshan","labels_url":"https://api.github.com/repos/eclipse/leshan/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/leshan/issues/173/comments","events_url":"https://api.github.com/repos/eclipse/leshan/issues/173/events","html_url":"https://github.com/eclipse/leshan/issues/173","id":176645874,"number":173,"title":"Problem with Redis PSUBSCRIBE for Cluster Registries","user":{"login":"mhuelfen","id":1228781,"avatar_url":"https://avatars.githubusercontent.com/u/1228781?v=3","gravatar_id":"","url":"https://api.github.com/users/mhuelfen","html_url":"https://github.com/mhuelfen","followers_url":"https://api.github.com/users/mhuelfen/followers","following_url":"https://api.github.com/users/mhuelfen/following{/other_user}","gists_url":"https://api.github.com/users/mhuelfen/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuelfen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuelfen/subscriptions","organizations_url":"https://api.github.com/users/mhuelfen/orgs","repos_url":"https://api.github.com/users/mhuelfen/repos","events_url":"https://api.github.com/users/mhuelfen/events{/privacy}","received_events_url":"https://api.github.com/users/mhuelfen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-13T13:51:04Z","updated_at":"2016-09-13T13:51:04Z","closed_at":null,"body":"Hello I have a problem when using the classes from the leshan cluster project the server starts without any problem but after a while this error happens\r\n\r\n```\r\n2016-09-13 15:01:57.815  WARN 1666 --- [       Thread-5] o.e.l.s.d.cluster.RedisClientRegistry    : Redis PSUBSCRIBE interrupted.\r\n\r\njava.lang.AbstractMethodError: redis.clients.jedis.JedisPubSub.onPSubscribe(Ljava/lang/String;I)V\r\n\tat redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:151)\r\n\tat redis.clients.jedis.JedisPubSub.proceedWithPatterns(JedisPubSub.java:96)\r\n\tat redis.clients.jedis.Jedis.psubscribe(Jedis.java:2826)\r\n\tat org.eclipse.leshan.server.demo.cluster.RedisClientRegistry$1.run(RedisClientRegistry.java:68)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\n\r\n\r\nThan this error is repeated in the log for about a minute and about 60 - 70 \r\n```\r\n2016-09-13 15:01:58.317  WARN 1666 --- [       Thread-5] o.e.l.s.d.cluster.RedisClientRegistry    : Relaunch Redis PSUBSCRIBE.\r\n2016-09-13 15:01:58.318  WARN 1666 --- [       Thread-5] o.e.l.s.d.cluster.RedisClientRegistry    : Redis PSUBSCRIBE interrupted.\r\n\r\n\r\nredis.clients.jedis.exceptions.JedisDataException: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context\r\n\tat redis.clients.jedis.Protocol.processError(Protocol.java:113)\r\n\tat redis.clients.jedis.Protocol.process(Protocol.java:131)\r\n\tat redis.clients.jedis.Protocol.read(Protocol.java:200)\r\n\tat redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:285)\r\n\tat redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:184)\r\n\tat redis.clients.jedis.Jedis.configSet(Jedis.java:2797)\r\n\tat org.eclipse.leshan.server.demo.cluster.RedisClientRegistry$1.run(RedisClientRegistry.java:67)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n```\r\nIn the end it stops and the relaunch seems to have ended \r\n```2016-09-13 15:01:58.317  WARN 1666 --- [       Thread-5] o.e.l.s.d.cluster.RedisClientRegistry    : Relaunch Redis PSUBSCRIBE.```\r\n\r\nThis is how I set up my Leshan Server\r\n\r\n```\r\n\t@Bean\r\n\tpublic LeshanServer getLeshanServer(JedisPool jedisPool) {\r\n\t\t// Use those ENV variables for specifying the interface to be bound for\r\n\t\t// coap and coaps\r\n\t\tString iface = System.getenv(\"COAPIFACE\");\r\n\t\tString ifaces = System.getenv(\"COAPSIFACE\");\r\n\r\n\t\t// Build LWM2M server\r\n\t\tLeshanServerBuilder builder = new LeshanServerBuilder();\r\n\t\tif (iface != null && !iface.isEmpty()) {\r\n\t\t\tString[] add = iface.split(\":\");\r\n\t\t\tbuilder.setLocalAddress(add[0], Integer.parseInt(add[1]));\r\n\t\t}\r\n\t\tif (ifaces != null && !ifaces.isEmpty()) {\r\n\t\t\tString[] adds = ifaces.split(\":\");\r\n\t\t\tbuilder.setLocalSecureAddress(adds[0], Integer.parseInt(adds[1]));\r\n\t\t}\r\n\r\n\t\tRedisSecurityRegistry securityRegistry = new RedisSecurityRegistry(jedisPool, null, null);\r\n\t\tbuilder.setSecurityRegistry(securityRegistry);\r\n\t\tRedisClientRegistry clientRegistry = new RedisClientRegistry(jedisPool);\r\n\t\tbuilder.setClientRegistry(clientRegistry);\r\n\t\tLwM2mModelProvider objectModelProvider = new CustomModelProvider(\"objectspec.json\");\r\n\t\tbuilder.setObjectModelProvider(objectModelProvider);\r\n\t\tbuilder.setEncoder(new DefaultLwM2mNodeEncoder());\r\n\t\tLwM2mNodeDecoder decoder = new DefaultLwM2mNodeDecoder();\r\n\t\tbuilder.setDecoder(decoder);\r\n\t\tbuilder.setObservationRegistry(\r\n\t\t\t\tnew RedisObservationRegistry(jedisPool, clientRegistry, objectModelProvider, decoder));\r\n\r\n\t\tLeshanServer lwServer = builder.build();\r\n\r\n\t\treturn lwServer;\r\n\t}\r\n```\r\n\r\nFor the JedisPoolConfig I tried using the default settings and playing around with the min and max thread settings without any change.\r\n\r\nLooking for a solution I only found this\r\nhttp://stackoverflow.com/questions/12119471/redis-pub-sub-with-jedis-sub-crashes-with-error  "}}
{"actor":{"display_login":"mhuelfen"}}