By: ved singh user 25 Oct 2017 at 11:20 p.m. CDT

6 Responses
ved singh gravatar
Hi, I was trying to configure clustering as per the instructions mentioned here - https://gluu.org/docs/ce/3.1.1/installation-guide/cluster/#introduction In the last step where it is mentioned ``` Restart Identity and oxAuth on all servers, then restart all your Gluu servers ``` i'm getting exception while restarting identity service ``` service identity start ``` tail -f /opt/gluu/jetty/identity/logs/2017_10_26.stderrout.log ``` org.gluu.site.ldap.persistence.exception.MappingException: Failed to convert json value '{"cacheProviderType": "REDIS", "memcachedConfiguration": {"servers":"localhost:11211", "maxOperationQueueLength":100000, "bufferSize":32768, "defaultPutExpiration":60, "connectionFactoryType": "DEFAULT"}, "inMemoryConfiguration": {"defaultPutExpiration":60}, "redisConfiguration":{"servers":"localhost:6379","dev-gluu-nginx.internal.com:6379", "defaultPutExpiration": 60}}' to object at org.gluu.site.ldap.persistence.AbstractEntryManager.convertStringToJson(AbstractEntryManager.java:1115) at org.gluu.site.ldap.persistence.AbstractEntryManager.setPropertyValue(AbstractEntryManager.java:1100) at org.gluu.site.ldap.persistence.AbstractEntryManager.createEntities(AbstractEntryManager.java:655) at org.gluu.site.ldap.persistence.AbstractEntryManager.createEntities(AbstractEntryManager.java:588) at org.gluu.site.ldap.persistence.AbstractEntryManager.find(AbstractEntryManager.java:447) ``` I'm getting the same error in all gluu nodes. What other log files should I look into to dig in further. Appreciate any guidance towards the possible cause behind this. Thanks

By Mohib Zico Account Admin 26 Oct 2017 at 3:47 a.m. CDT

Mohib Zico gravatar
>> redisConfiguration":{"servers":"localhost:6379","dev-gluu-nginx.internal.com:6379" This is the problem; you have two servers included in redisConfiguration. Remove that localhost one and let's see how that goes.

By ved singh user 26 Oct 2017 at 11:50 a.m. CDT

ved singh gravatar
Thanks Mohib. I'm still getting the same exception. Here's is my vi /etc/redis/redis.conf snippet. ``` ################################## NETWORK ##################################### # By default, if no "bind" configuration directive is specified, Redis listens # for connections from all the network interfaces available on the server. # It is possible to listen to just one or multiple selected interfaces using # the "bind" configuration directive, followed by one or more IP addresses. # # Examples: # # bind 192.168.1.100 10.0.0.1 # bind 127.0.0.1 ::1 bind dev-gluu-nginx.internal.com # # ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the # internet, binding to all the interfaces is dangerous and will expose the # instance to everybody on the internet. So by default we uncomment the # following bind directive, that will force Redis to listen only into # the IPv4 lookback interface address (this means Redis will be able to # accept connections only from clients running into the same computer it # is running). # # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES # JUST COMMENT THE FOLLOWING LINE. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #bind 127.0.0.1 ``` Exception ``` org.gluu.site.ldap.persistence.exception.MappingException: Failed to convert json value '{"cacheProviderType": "REDIS", "memcachedConfiguration": {"servers":"localhost:11211", "maxOperationQueueLength":100000, "bufferSize":32768, "defaultPutExpiration":60, "connectionFactoryType": "DEFAULT"}, "inMemoryConfiguration": {"defaultPutExpiration":60}, "redisConfiguration":{"servers":"localhost:6379","dev-gluu-nginx.internal.com:6379", "defaultPutExpiration": 60}}' to object at org.gluu.site.ldap.persistence.AbstractEntryManager.convertStringToJson(AbstractEntryManager.java:1115) ``` Another doubt - Do i have to install Redis inside gluu chroot or outside ? redis-server --version Redis server v=3.9.103 sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=8c1b008703dce324 Currently its installed outside. Appreciate and many thanks for your guidance.

By ved singh user 26 Oct 2017 at 7:47 p.m. CDT

ved singh gravatar
Hi Mohib, I updated the bind value with IP address but still getting the same error. ``` bind 172.16.12.35 ``` I followed the steps as documented here: https://gluu.org/docs/ce/3.1.1/installation-guide/cluster/#6-install-and-configure-redis ``` The standard redis-server's configuration file binds to 127.0.0.1. We need to comment out this entry so that it listens to external requests. ``` I even tried that. But still getting the same exception. Appreciate any guidance you can provide to resolve this.

By ved singh user 26 Oct 2017 at 8:20 p.m. CDT

ved singh gravatar
Hi Mohib, We can see from the exception trace that json which is been parsed is not valid. ``` { "cacheProviderType": "REDIS", "memcachedConfiguration": { "servers": "localhost:11211", "maxOperationQueueLength": 100000, "bufferSize": 32768, "defaultPutExpiration": 60, "connectionFactoryType": "DEFAULT" }, "inMemoryConfiguration": { "defaultPutExpiration": 60 }, "redisConfiguration": { > "servers": "localhost:6379","dev-gluu-nginx.internal:6379", "defaultPutExpiration": 60 } } ``` I was looking in to the gluu source code on github : https://github.com/GluuFederation/oxCore/blob/master/oxService/src/main/java/org/xdi/service/cache/RedisConfiguration.java I'm wondering how the "servers" property is been set with a comma separated value.This looks wired to me. I can see values to be something like the test case here: ``` @BeforeClass public void beforeClass() { RedisConfiguration config = new RedisConfiguration(); // config.setServers("localhost:7000,localhost:7001,localhost:7002,localhost:7003,localhost:7004,localhost:7005"); config.setServers("c4.gluu.org:22121"); standaloneProvider = new RedisStandaloneProvider(config); clusterProvider = new RedisClusterProvider(config); shardedProvider = new RedisShardedProvider(config); } ``` Is this a bug in the system and my redis configuration is still off?

By Mohib Zico Account Admin 27 Oct 2017 at 3:44 a.m. CDT

Mohib Zico gravatar
>> Remove that localhost one and let's see how that goes.

By ved singh user 27 Oct 2017 at 12:24 p.m. CDT

ved singh gravatar
Thanks Mohib. I was able to resolve this issue by updating the configuration in the ldap Thanks again for your guidance. Much appreciated!!!