[ https://issues.apache.org/jira/browse/NIFI-5830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712104#comment-16712104 ]
ASF GitHub Bot commented on NIFI-5830: -------------------------------------- Github user pvillard31 commented on the issue: https://github.com/apache/nifi/pull/3176 Changes make sense to me, reproduced the issue with a Docker instance and confirmed this PR fixes the issue when using a standalone Redis instance. +1, merging to master, thanks @javajefe > RedisConnectionPoolService does not work with Standalone Redis using > non-localhost deployment > --------------------------------------------------------------------------------------------- > > Key: NIFI-5830 > URL: https://issues.apache.org/jira/browse/NIFI-5830 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Affects Versions: 1.8.0 > Environment: Ubuntu 16 LTS, NiFi 1.8.0 > Reporter: Alexander Bukarev > Priority: Major > > The controller service {{RedisConnectionPoolService}} does not work with > Standalone Redis which is deployed on a host other than {{localhost}} (or if > Redis uses the port other than {{6379}}). So the only way to use > {{RedisConnectionPoolService}} is to deploy Redis on {{localhost}} and run it > with default port {{6379}}. > *Steps*: > Let's assume our Redis is deployed on host *redis* (not {{localhost}}) and it > listens port 6379 (I use docker for that) > # Create a {{PutDistributedMapCache}} processor > # Configure the processor with {{RedisDistributedMapCacheClientService}} > # Create a new controller service: {{RedisConnectionPoolService}} > #* Choose *Standalone* Redis Mode > #* Use *redis:6379* as a Connection String > # Connect some incoming flow to the {{PutDistributedMapCache}} processor > (I've used {{GetFile}} as a producer) and run the whole flow. Allow > {{GetFile}} to consume some file (if you use {{GetFile}} ro reproduce) and > wait some time till the {{PutDistributedMapCache}} will be schedulled. > Result: > The processor is failed to run. And we can see the error in logs: > {panel}2018-11-17 06:06:47,572 WARN [Timer-Driven Process Thread-2] > o.a.n.controller.tasks.ConnectableTask Administratively Yielding PutDistribu > tedMapCache[id=2041c81f-0167-1000-c82f-d7da2155dfb4] due to uncaught > Exception: org.springframework.data.redis.RedisConnectionFailureExce > ption: Cannot get Jedis connection; nested exception is > redis.clients.jedis.exceptions.JedisConnectionException: Could not get a > resource > from the pool > org.springframework.data.redis.RedisConnectionFailureException: Cannot get > Jedis connection; nested exception is > redis.clients.jedis.exceptions.JedisConnectionException: Could not get a > resource from the pool > at > org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:281) > at > org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:464) > at > org.apache.nifi.redis.service.RedisConnectionPoolService.getConnection(RedisConnectionPoolService.java:89) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:84) > at com.sun.proxy.$Proxy128.getConnection(Unknown Source) > at > org.apache.nifi.redis.service.RedisDistributedMapCacheClientService.withConnection(RedisDistributedMapCacheClientService.java:343) > at > org.apache.nifi.redis.service.RedisDistributedMapCacheClientService.put(RedisDistributedMapCacheClientService.java:189) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:84) > at com.sun.proxy.$Proxy124.put(Unknown Source) > at > org.apache.nifi.processors.standard.PutDistributedMapCache.onTrigger(PutDistributedMapCache.java:202){panel} -- This message was sent by Atlassian JIRA (v7.6.3#76005)