Session replication issues with redis

112 views
Skip to first unread message

john mcteague

unread,
Jun 20, 2014, 6:35:27 AM6/20/14
to vcap...@cloudfoundry.org
I am evaluating the session replication functionality of the java buildpack. When I provision a redis service with the name session-replication as per the buildpack docs, I get the following message at staging:

[Services]                       WARN  A service with a name label or tag matching (?-mix:session-replication) was found, but was missing one of the required credentials ["hostname", "port", "password"]




The session replication does not work and at runtime my VCAP_SERVICES env var looks like:

VCAP_SERVICES:{"p-redis":[{"name":"session-replication","label":"p-redis","tags":["pivotal","redis"],"plan":"development","credentials":{"host":"1.2.3.4","port":50673,"password":"*****"}}]} 

Any clues from the group?

Thanks,
John

john mcteague

unread,
Jun 20, 2014, 6:36:22 AM6/20/14
to vcap...@cloudfoundry.org
I should mention I am using v2.1.2 of the buildpack.

Ben Hale

unread,
Jun 20, 2014, 7:04:29 AM6/20/14
to vcap...@cloudfoundry.org
The error message points at the root problem, it's expecting hostname, but is being provided host.  We've not tested against the Pivotal Redis Service (it didn't exist when we wrote the support), so we're behind there.  I've opened an issue to update the buildpack to accommodate it.


-Ben Hale
Cloud Foundry Java Experience

Ben Hale

unread,
Jun 27, 2014, 10:13:37 AM6/27/14
to vcap...@cloudfoundry.org
John,

We've just finished the work on this and it is now in master.  If you don't want to test against the latest, it'll go out in v2.4 which should arrive shortly.

Neil Aitken

unread,
Oct 6, 2014, 4:18:36 PM10/6/14
to vcap...@cloudfoundry.org, bh...@gopivotal.com
I'm testing this out with the redis service from cf-services-contrib-release, I get a similar error.  I'm using v2.4 of the Java buildpack, and the warning message suggests this patch has been applied (since it includes host and hostname):

[Services]                       WARN  A service with a name label or tag matching (?-mix:session-replication) was found, but was missing one of the required credentials [["hostname", "host"], "port", "password"]
[Services]                       WARN  A service with a name label or tag matching (?-mix:session-replication) was found, but was missing one of the required credentials [["hostname", "host"], "port", "password"]

The warning fires twice - maybe something in the regexp is tripped up because the redis service exposes both host and hostname in the VCAP_SERVICES json?

{"redis-2.6":[{"name":"session-replication","label":"redis-2.6","tags":["key-value","nosql"],"plan":"default","credentials":{"hostname":"4.3.2.1","host":"4.3.2.1","port":5000,"password":"*****","name":"5cfec282-81cb-4b5b-8fa2-da169a46c4ae"}}]}

Ben Hale

unread,
Oct 7, 2014, 4:08:37 AM10/7/14
to vcap...@cloudfoundry.org, bh...@gopivotal.com
Neil,

We definitely don't have a test for this, so can you please open an issue at https://github.com/cloudfoundry/java-buildpack/issues with this information?  We'll look at it from there.


-Ben Hale
Cloud Foundry Java Experience

Neil Aitken

unread,
Oct 8, 2014, 3:45:31 PM10/8/14
to vcap...@cloudfoundry.org, bh...@gopivotal.com
Reply all
Reply to author
Forward
0 new messages