-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bumped rediscala to 1.8.2 and Akka 2.5.x #151
Conversation
6ee028b
to
1498a35
Compare
Will verify today and get back.
Thanks,
… On 27-Feb-2018, at 12:17 PM, Karel Čemus ***@***.***> wrote:
Fixes #150 <#150>
@pandian-egnaroinc <https://github.com/pandian-egnaroinc> I updated the rediscala to version 1.8.2, which uses Akka 2.5.8. However, there are new maintainers so I'm not sure and convinced about its stability. Could you test this snapshot before I merge it to master, please?
I ran the tests within play-redis (517) and all passed, so I hope it should work.
You can view, comment on, or merge this pull request online at:
#151 <#151>
Commit Summary
Bumped rediscala to 1.8.2 and Akka 2.5.x
File Changes
M build.sbt <https://github.com/KarelCemus/play-redis/pull/151/files#diff-0> (6)
Patch Links:
https://github.com/KarelCemus/play-redis/pull/151.patch <https://github.com/KarelCemus/play-redis/pull/151.patch>
https://github.com/KarelCemus/play-redis/pull/151.diff <https://github.com/KarelCemus/play-redis/pull/151.diff>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmTN6hfQIh8ZSA8XPleiiZ8xr5y5Rks5tY6TrgaJpZM4SUb2g>.
|
Can you share a private jar or a private repository location that I can use?
Thanks,
… On 27-Feb-2018, at 12:17 PM, Karel Čemus ***@***.***> wrote:
Fixes #150 <#150>
@pandian-egnaroinc <https://github.com/pandian-egnaroinc> I updated the rediscala to version 1.8.2, which uses Akka 2.5.8. However, there are new maintainers so I'm not sure and convinced about its stability. Could you test this snapshot before I merge it to master, please?
I ran the tests within play-redis (517) and all passed, so I hope it should work.
You can view, comment on, or merge this pull request online at:
#151 <#151>
Commit Summary
Bumped rediscala to 1.8.2 and Akka 2.5.x
File Changes
M build.sbt <https://github.com/KarelCemus/play-redis/pull/151/files#diff-0> (6)
Patch Links:
https://github.com/KarelCemus/play-redis/pull/151.patch <https://github.com/KarelCemus/play-redis/pull/151.patch>
https://github.com/KarelCemus/play-redis/pull/151.diff <https://github.com/KarelCemus/play-redis/pull/151.diff>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmTN6hfQIh8ZSA8XPleiiZ8xr5y5Rks5tY6TrgaJpZM4SUb2g>.
|
Unfortunately, I cannot attach a file here ... This snapshot is not published anywere. Usually, people clone the repository a build it from source themselves. Is it a problem?
and then inside the Alternatively, you could instead of |
Will do today.
Thanks,
… On 28-Feb-2018, at 11:55 AM, Karel Čemus ***@***.***> wrote:
Unfortunately, I cannot attach a file here ...
This snapshot is not published anywere.
Usually, people clone the repository a build it from source themselves. Is it a problem?
git clone ***@***.***:KarelCemus/play-redis.git
cd play-redis
git checkout akka-2.5.x
sbt +package
and then inside the target/scala-${version}/ is the JAR.
Alternatively, you could instead of package do publishLocal and you'll get it installed in your private ivy repository.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmYWmivFJHGRM2ThSQaChUKNNrzDGks5tZPFbgaJpZM4SUb2g>.
|
@pandian-egnaroinc Hi, any progress on this PR? |
I tried earlier and got an unexpected exception..
Issue could be at my end. So did not report. Need to debug more. If anything strikes top of your mind, let me know. Otherwise I will debug.
This is what I did.
1) I cloned and checked out 2.5.x.
2) Built your package (Built to play-redis_2.12-2.1.0-SNAPSHOT)
Verified that the below dependencies downloaded successfully when building.
[info] downloading https://repo1.maven.org/maven2/com/github/Ma27/rediscala_2.12/1.8.2/rediscala_2.12-1.8.2.jar ...
[info] [SUCCESSFUL ] com.github.Ma27#rediscala_2.12;1.8.2!rediscala_2.12.jar (4662ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.12/2.5.6/akka-actor_2.12-2.5.6.jar ...
[info] [SUCCESSFUL ] com.typesafe.akka#akka-actor_2.12;2.5.6!akka-actor_2.12.jar (4165ms)
3) Copied the jar to my libs directory.
4) Compilation mandated for new override function invocationPolicy() for RedisCluster and RedisStandalone derivatives. Defined as below.
@OverRide
public String invocationPolicy() { return "lazy"; }
5) Got this runtime exception.
NoClassDefFoundError: redis/ByteStringDeserializer
No source available, here is the exception stack trace:
->java.lang.NoClassDefFoundError: redis/ByteStringDeserializer
java.lang.NoClassDefFoundError: redis/ByteStringDeserializer
play.api.cache.redis.connector.RedisConnectorProvider.get$lzycompute(RedisConnectorProvider.scala:19)
play.api.cache.redis.connector.RedisConnectorProvider.get(RedisConnectorProvider.scala:19)
play.api.cache.redis.impl.RedisCachesProvider.redisConnector$lzycompute(RedisCaches.scala:31)
play.api.cache.redis.impl.RedisCachesProvider.play$api$cache$redis$impl$RedisCachesProvider$$redisConnector(RedisCaches.scala:31)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.async$lzycompute(RedisCaches.scala:34)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.async(RedisCaches.scala:34)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.java$lzycompute(RedisCaches.scala:38)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.java(RedisCaches.scala:38)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.javaSync$lzycompute(RedisCaches.scala:40)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.javaSync(RedisCaches.scala:40)
play.api.cache.redis.impl.RedisCachesProvider$$anon$1.javaSync(RedisCaches.scala:33)
play.api.cache.redis.GuiceProvider$.$anonfun$bindings$6(RedisCacheModule.scala:81)
play.api.cache.redis.DeprecatedNamedCacheInstanceProvider.get$lzycompute(RedisCacheModule.scala:127)
play.api.cache.redis.DeprecatedNamedCacheInstanceProvider.get(RedisCacheModule.scala:125)
com.google.inject.util.Providers$GuicifiedProvider.get(Providers.java:119)
com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)
play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409)
play.api.inject.ContextClassLoaderInjector.$anonfun$instanceOf$3(Injector.scala:118)
play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126)
play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:118)
play.api.inject.RoutesProvider.$anonfun$get$2(BuiltinModule.scala:104)
scala.Option.fold(Option.scala:158)
play.api.inject.RoutesProvider.get$lzycompute(BuiltinModule.scala:104)
play.api.inject.RoutesProvider.get(BuiltinModule.scala:100)
play.api.inject.RoutesProvider.get(BuiltinModule.scala:99)
com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)
play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409)
play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:404)
play.api.inject.ContextClassLoaderInjector.$anonfun$instanceOf$2(Injector.scala:117)
play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126)
play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:117)
play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:137)
play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
play.core.server.DevServerStart$$anon$1.$anonfun$reload$3(DevServerStart.scala:174)
play.utils.Threads$.withContextClassLoader(Threads.scala:21)
play.core.server.DevServerStart$$anon$1.reload(DevServerStart.scala:171)
play.core.server.DevServerStart$$anon$1.get(DevServerStart.scala:124)
play.core.server.AkkaHttpServer.modelConversion(AkkaHttpServer.scala:183)
play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:189)
play.core.server.AkkaHttpServer.$anonfun$createServerBinding$1(AkkaHttpServer.scala:106)
akka.stream.impl.fusing.MapAsync$$anon$24.onPush(Ops.scala:1191)
akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:512)
akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:475)
akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:371)
akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:584)
akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:468)
akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:559)
akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:741)
akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:756)
akka.actor.Actor.aroundReceive(Actor.scala:517)
akka.actor.Actor.aroundReceive$(Actor.scala:515)
akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:666)
akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
akka.actor.ActorCell.invoke(ActorCell.scala:496)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
akka.dispatch.Mailbox.run(Mailbox.scala:224)
akka.dispatch.Mailbox.exec(Mailbox.scala:234)
akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
… On 05-Mar-2018, at 2:36 PM, Karel Čemus ***@***.***> wrote:
@pandian-egnaroinc <https://github.com/pandian-egnaroinc> Hi, any progress on this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmYS5S1gwg7r1xQCTgQBP9V_KQfHRks5tbQAagaJpZM4SUb2g>.
|
After copying “rediscala_2.12-1.8.2.jar” also to my lib directory, the NoClassDefFoundError went away.
But we are back to square 1.
Even the new redisScale throws the same exception as earlier one.
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
[info] p.a.cache.redis - Redis cache actor started. It is connected to localhost:6379
[info] p.a.cache.redis - Redis cluster cache actor started. It is connected to localhost:30001
[error] a.a.OneForOneStrategy - null
java.lang.NullPointerException: null
at redis.RedisCluster.$anonfun$onConnectStatus$1(RedisCluster.scala:46)
at redis.RedisCluster.$anonfun$onConnectStatus$1$adapted(RedisCluster.scala:41)
at redis.actors.RedisWorkerIO.onConnected(RedisWorkerIO.scala:70)
at redis.actors.RedisWorkerIO$$anonfun$connecting$1.applyOrElse(RedisWorkerIO.scala:57)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
at akka.actor.Actor.aroundReceive(Actor.scala:517)
at akka.actor.Actor.aroundReceive$(Actor.scala:515)
at redis.actors.RedisWorkerIO.aroundReceive(RedisWorkerIO.scala:15)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
[info] p.a.cache.redis - Redis cache actor started. It is connected to localhost:6379?database=0
[info] p.a.h.EnabledFilters - Enabled Filters (see <https://www.playframework.com/documentation/latest/Filters>):
play.filters.csrf.CSRFFilter
play.filters.headers.SecurityHeadersFilter
play.filters.hosts.AllowedHostsFilter
[info] play.api.Play - Application started (Dev)
[error] p.a.cache.redis - Command SET for key 'name200' failed.
java.lang.RuntimeException: server not found: no server available
at redis.RedisCluster.$anonfun$send$2(RedisCluster.scala:161)
at scala.Option.getOrElse(Option.scala:121)
at redis.RedisCluster.send(RedisCluster.scala:161)
at redis.commands.Strings.set(Strings.scala:81)
at redis.commands.Strings.set$(Strings.scala:76)
at redis.RedisCluster.set(RedisCluster.scala:20)
at play.api.cache.redis.connector.RedisConnectorImpl.setEternally(RedisConnectorImpl.scala:79)
at play.api.cache.redis.connector.RedisConnectorImpl.$anonfun$set$2(RedisConnectorImpl.scala:62)
at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:304)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
[error] p.a.cache.redis - Command SET for key 'classTag::name200' failed.
java.lang.RuntimeException: server not found: no server available
at redis.RedisCluster.$anonfun$send$2(RedisCluster.scala:161)
at scala.Option.getOrElse(Option.scala:121)
at redis.RedisCluster.send(RedisCluster.scala:161)
at redis.commands.Strings.set(Strings.scala:81)
at redis.commands.Strings.set$(Strings.scala:76)
at redis.RedisCluster.set(RedisCluster.scala:20)
at play.api.cache.redis.connector.RedisConnectorImpl.setEternally(RedisConnectorImpl.scala:79)
at play.api.cache.redis.connector.RedisConnectorImpl.$anonfun$set$2(RedisConnectorImpl.scala:62)
at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:304)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
[error] p.a.cache.redis - Command GET for key 'classTag::name200' failed.
java.lang.RuntimeException: server not found: no server available
at redis.RedisCluster.$anonfun$send$2(RedisCluster.scala:161)
at scala.Option.getOrElse(Option.scala:121)
at redis.RedisCluster.send(RedisCluster.scala:161)
at redis.commands.Strings.get(Strings.scala:44)
at redis.commands.Strings.get$(Strings.scala:43)
at redis.RedisCluster.get(RedisCluster.scala:20)
at play.api.cache.redis.connector.RedisConnectorImpl.get(RedisConnectorImpl.scala:28)
at play.api.cache.redis.impl.RedisCache.$anonfun$get$1(RedisCache.scala:19)
at play.api.cache.redis.impl.dsl$CacheKey$.prefixed$extension(dsl.scala:50)
at play.api.cache.redis.impl.RedisCache.get(RedisCache.scala:18)
Thanks,
|
You mean branch
Sorry, I forgot to suggest using
You can use
Yes, version Otherwise the error is odd. The version |
Inline..
On 05-Mar-2018, at 10:32 PM, Karel Čemus ***@***.***> wrote:
I cloned and checked out 2.5.x.
You mean branch akka-2.5.x, I hope
[Pandian] Yes.
Copied the jar to my libs directory.
Sorry, I forgot to suggest using sbt publishLocal to have it automatically published in your local ivy repository. Do it instead of copying, this works better and is reliable.
Compilation mandated for new override function invocationPolicy() for RedisCluster and RedisStandalone derivatives. Defined as below.
@OverRide <https://github.com/override>
public String invocationPolicy() { return "lazy"; }
You should you new RedisCluster with RedisDelegatingSettings when overriding the settings to avoid unnecessary implementation of defaults, but your solution also works.
After copying “rediscala_2.12-1.8.2.jar”
Yes, version 2.1.0 uses new version of the connector. That's right.
Otherwise the error is odd. The version 1.8.2 uses akka 2.5.6 so it should be fine. However, it seems you are manually maintaining your dependencies, so there might be the issue. Anyway, are you able to give me some minimal configuration (build.sbt) to reproduce the issue?
[Pandian] Iam not manually managing dependencies. Since I built redis-scala from code instead of downloading using sbt, I needed to provide its dependencies also in the lib directory.
I am just using a demo project as of now. Will upload it to GitHub and share the link.
In parallel, I will try to publishLocal and try.
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmUMvF4quUlqkfuzzUykadq4QbiAZks5tbW-mgaJpZM4SUb2g>.
|
You mean like my hello world but in the cluster mode? I'll try to reproduce .... |
Ya, Also it is in java, If it makes a difference.
Thanks,
… On 05-Mar-2018, at 10:55 PM, Karel Čemus ***@***.***> wrote:
You mean like my hello world <https://github.com/KarelCemus/play-redis-samples/tree/master/hello_world> but in the cluster mode? I'll try to reproduce ....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxma33_1BFS_NZzPPzFvEDD_0kA_bRks5tbXTvgaJpZM4SUb2g>.
|
I have uploaded it to gitlab in case you need.
https://gitlab.com/pandian-egnaroinc/Redis-Cluster
Thanks,
… On 05-Mar-2018, at 10:56 PM, Gnanapandian Gnanachandran ***@***.***> wrote:
Ya, Also it is in java, If it makes a difference.
Thanks,
> On 05-Mar-2018, at 10:55 PM, Karel Čemus ***@***.*** ***@***.***>> wrote:
>
> You mean like my hello world <https://github.com/KarelCemus/play-redis-samples/tree/master/hello_world> but in the cluster mode? I'll try to reproduce ....
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxma33_1BFS_NZzPPzFvEDD_0kA_bRks5tbXTvgaJpZM4SUb2g>.
>
|
I ran your code and there are several things I noticed:
For more details look here For example, I used: cluster: [
{ host: 127.0.0.1, port: 7003 }
{ host: 127.0.0.1, port: 7002 }
{ host: 127.0.0.1, port: 7001 }
{ host: 127.0.0.1, port: 7000 }
] Invalid cluster configuration caused your However, although it works, there is still sometimes thrown that |
Hi,
I actually have a 5 node redis cluster running.
But, Your example mentions only one server for cluster configuration.
https://github.com/KarelCemus/play-redis/wiki/Configuration#running-in-different-environments <https://github.com/KarelCemus/play-redis/wiki/Configuration#running-in-different-environments>
Redis is able to load balance internally if requests come to a single sentinel and lot of clients are written this way.
I thought that is the case with play-redis too.
Documentation needs correction.
Also, I think that the root of the issue could be something else.
Thanks,
… On 06-Mar-2018, at 3:21 PM, Karel Čemus ***@***.***> wrote:
I ran your code and there are several things I noticed:
In Module you expose your bindings to redis and ITS, don't do it. Play-redis registers them for you.
you have invalid configuration of your cluster, valid cluster has at least 3 masters. I changed your configuration to the configuration of the valid cluster and it works like a charm.
Note that the minimal cluster that works as expected requires to contain at least three master nodes. For your first tests it is strongly suggested to start a six nodes cluster with three masters and three slaves.
For more details look here <https://redis.io/topics/cluster-tutorial>
For example, I used:
cluster: [
{ host: 127.0.0.1, port: 7003 }
{ host: 127.0.0.1, port: 7002 }
{ host: 127.0.0.1, port: 7001 }
{ host: 127.0.0.1, port: 7000 }
]
However, although it works, there is still sometimes thrown that NPE at a.a.OneForOneStrategy - null, which is weird. I'll investigate.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmRvoP7bIFjZxMNwvyAkna_GDPrN1ks5tblw5gaJpZM4SUb2g>.
|
There are 2 issues. First is the cluster configuration and the second is that exception. Play redis does not implement the protocol, it's implemented by rediscala so for detailed documentation, configuration and settings regarding the connection look there. Also both these issues are issues of the underlying connector, not the play-redis itself.
I don't know how rediscala validates the cluster configuration, so provide them all and you'll see.
That's right, that was only for illustration but I'll fix it.
Sentinel is not exactly the same thing as a cluster. At least not in the terms of
Feel free to dig into it, I'm a bit short on time. |
Will correct the cluster configuration and give it a try.
Ultimately I think the fix should be in redisScala’s handling of newer version actors. The original author is not maintaining it, so..
Will dig into it and get back if I get any results.
Thanks,
… On 06-Mar-2018, at 3:40 PM, Karel Čemus ***@***.***> wrote:
There are 2 issues. First is the cluster configuration and the second is that exception.
Play redis does not implement the protocol, it's implemented by rediscala <https://github.com/etaty/rediscala> so for detailed documentation, configuration and settings regarding the connection look there. Also both these issues are issues of the underlying connector, not the play-redis itself.
I actually have a 5 node redis cluster running
I don't know how rediscala validates the cluster configuration, so provide them all and you'll see.
But, Your example mentions only one server for cluster configuration.
That's right, that was only for illustration but I'll fix it.
Redis is able to load balance internally if requests come to a single sentinel and lot of clients are written this way. I thought that is the case with play-redis too.
Sentinel is not exactly the same thing as a cluster. At least not in the terms of rediscala, that is a different mode and play-redis does not support it right now.
Also, I think that the root of the issue could be something else.
Feel free to dig into it, I'm a bit short on time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#151 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AXVxmeuP39G0j29oXOP3VgLAukNL6ZzVks5tbmCggaJpZM4SUb2g>.
|
I investigated the issue and it was just as I assumed - two independent issues. The |
bb6392b
to
019bee5
Compare
- bumped to Scala 2.12.5 - bumped play to 2.6.12
Migrated to Akka 2.5.x and resolved the NPE in the cluster mode. |
Bumped rediscala to 1.8.2 and Akka 2.5.x
Fixes #150
@pandian-egnaroinc I updated the rediscala to version 1.8.2, which uses Akka 2.5.6. However, there are new maintainers so I'm not sure and convinced about its stability. Could you test this snapshot before I merge it to master, please?
I ran the tests within play-redis (517) and all passed, so I hope it should work.