Couchbase Ticket Registry Connection Error

117 views
Skip to first unread message

Scott Green

unread,
Mar 20, 2018, 5:47:21 PM3/20/18
to CAS Community
I am trying to setup an HA environment and use Couchbase as the ticket registry, but I am getting authentication errors when deploying the .war files.

Settings from cas.properties

cas.ticket.registry.couchbase.timeout:10
cas.ticket.registry.couchbase.nodeSet:localhost
cas.ticket.registry.couchbase.password=test1234
cas.ticket.registry.couchbase.queryEnabled=true
cas.ticket.registry.couchbase.bucket=cas

I have tried the nodeSet as both localhost:8091 and localhost without the :port

Here are the entries from the cas.log 

2018-03-20 14:40:44,602 DEBUG [com.couchbase.client.core.endpoint.Endpoint] - <Using a connectCallbackGracePeriod of 2000 on Endpoint 127.0.0.1:8091>
2018-03-20 14:40:44,647 DEBUG [com.couchbase.client.core.endpoint.Endpoint] - <[/127.0.0.1:8091][ConfigEndpoint]: Connected Endpoint.>
2018-03-20 14:40:44,687 DEBUG [com.couchbase.client.core.endpoint.AbstractGenericHandler] - <[/127.0.0.1:8091][ConfigEndpoint]: Channel Active.>
2018-03-20 14:40:44,695 DEBUG [com.couchbase.client.core.endpoint.kv.KeyValueFeatureHandler] - <Requesting supported features: [TCPNODELAY, XATTR, SELECT_BUCKET, XERROR]>
2018-03-20 14:40:44,700 DEBUG [com.couchbase.client.core.endpoint.kv.KeyValueFeatureHandler] - <Negotiated supported features: [TCPNODELAY]>
2018-03-20 14:40:44,705 WARN [com.couchbase.client.core.endpoint.Endpoint] - <[null][KeyValueEndpoint]: Authentication Failure.>
2018-03-20 14:40:44,705 WARN [com.couchbase.client.core.endpoint.Endpoint] - <Error during reconnect: >
com.couchbase.client.core.endpoint.kv.AuthenticationException: Authentication Failure
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.checkIsAuthed(KeyValueAuthHandler.java:288) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.channelRead0(KeyValueAuthHandler.java:173) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.channelRead0(KeyValueAuthHandler.java:52) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1302) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131) ~[core-io-1.5.1.jar:?]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) ~[core-io-1.5.1.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]


Here are the log entries that I have from Couchbase. 

[ns_server:info,2018-03-20T14:40:44.795-07:00,babysitte...@127.0.0.1:<0.79.0>:ns_port_server:log:210]memcached<0.79.0>: 2018-03-20T14:40:44.546306-07:00 WARNING 808: Invalid username/password combination
memcached<0.79.0>: 2018-03-20T14:40:44.704321-07:00 WARNING 808: Invalid username/password combination
memcached<0.79.0>: 2018-03-20T14:40:44.771326-07:00 WARNING 808: Invalid username/password combination


Any help is much appreciated.

Thanks,

Scott


Michael Peterson

unread,
Mar 21, 2018, 9:37:59 AM3/21/18
to cas-...@apereo.org
In your config settings I did not see a setting for username. I am not familiar with couchbase but it seems to me a username should also be set in the cas properties.

[ns_server:info,2018-03-20T14:40:44.795-07:00,babysitter_of_ns...@127.0.0.1:<0.79.0>:ns_port_server:log:210]memcached<0.79.0>: 2018-03-20T14:40:44.546306-07:00 WARNING 808: Invalid username/password combination
memcached<0.79.0>: 2018-03-20T14:40:44.704321-07:00 WARNING 808: Invalid username/password combination
memcached<0.79.0>: 2018-03-20T14:40:44.771326-07:00 WARNING 808: Invalid username/password combination


Any help is much appreciated.

Thanks,

Scott


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/d3721db5-2244-4892-b2d5-4a17b3dc438b%40apereo.org.

Message has been deleted

Scott Green

unread,
Mar 22, 2018, 6:59:47 AM3/22/18
to cas-...@apereo.org
Michael,

Here are the relevant CAS Properties according to the documentation

# cas.ticket.registry.couchbase.timeout=10
# cas.ticket.registry.couchbase.nodeSet=localhost:8091
# cas.ticket.registry.couchbase.password=
# cas.ticket.registry.couchbase.queryEnabled=true
# cas.ticket.registry.couchbase.bucket=default

# cas.ticket.registry.couchbase.crypto.signing.key=
# cas.ticket.registry.couchbase.crypto.signing.keySize=512
# cas.ticket.registry.couchbase.crypto.encryption.key=
# cas.ticket.registry.couchbase.crypto.encryption.keySize=16
# cas.ticket.registry.couchbase.crypto.alg=AES
# cas.ticket.registry.couchbase.crypto.enabled=false


There is no setting for username in that field.  Couchbase itself is configured to use the bucket settings which simply list a password, not a username.  I'm guessing that the URI is incorrect in some way, but I have not been able to determine why.

Thank you

Scott

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
Message has been deleted

Olivier Guilloux

unread,
Mar 29, 2018, 11:20:41 AM3/29/18
to cas-...@apereo.org
Hello,

The bucket name must match the login name regarding this pull request :
  https://github.com/apereo/cas/pull/3227

Olivier

On Wed, Mar 21, 2018 at 6:28 PM, Scott Green <s.w.g...@gmail.com> wrote:
Michael,

Here are the relevant CAS Properties according to the documentation

# cas.ticket.registry.couchbase.timeout=10
# cas.ticket.registry.couchbase.nodeSet=localhost:8091
# cas.ticket.registry.couchbase.password=
# cas.ticket.registry.couchbase.queryEnabled=true
# cas.ticket.registry.couchbase.bucket=default

# cas.ticket.registry.couchbase.crypto.signing.key=
# cas.ticket.registry.couchbase.crypto.signing.keySize=512
# cas.ticket.registry.couchbase.crypto.encryption.key=
# cas.ticket.registry.couchbase.crypto.encryption.keySize=16
# cas.ticket.registry.couchbase.crypto.alg=AES
# cas.ticket.registry.couchbase.crypto.enabled=false


There is no setting for username in that field.  Couchbase itself is configured to use the bucket settings which simply list a password, not a username.  I'm guessing that the URI is incorrect in some way, but I have not been able to determine why.

Thank you

Scott
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

Scott Green

unread,
Mar 29, 2018, 4:21:19 PM3/29/18
to cas-...@apereo.org
Is there no option in the cas.properties file for the username?  Do I need to add it?

Thanks,

Scott

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

Olivier Guilloux

unread,
Mar 31, 2018, 4:29:25 AM3/31/18
to cas-...@apereo.org
There is no option for the username. You have to configure couchbase with the bucket name matching the login.

Olivier

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
Reply all
Reply to author
Forward
0 new messages