Unable to open bucket after upgrading from 4.1.1 to 5.0.1

Using the new Java DCP client version 0.12.0.

We had some existing buckets on Couchbase 4.1.1 cluster (no password was set for them). After upgrading the Couchbase cluster to 5.0.1, trying to open the same bucket but the operation is failing due to following exception.
We are using the cluster level Administrator user for the operation.
The API used is connect() from com.couchbase.client.dcp.Client class.

2018-02-19 13:41:25 [nioEventLoopGroup-5-9] INFO  DcpChannel:133 - Connect attempt to c1.abc.com/172.17.1.22:11210 failed.
java.lang.IllegalArgumentException: the input string is not according to the spec
	at com.couchbase.client.core.security.sasl.ShaSaslClient.decodeAttributes(ShaSaslClient.java:353)
	at com.couchbase.client.core.security.sasl.ShaSaslClient.evaluateChallenge(ShaSaslClient.java:119)
	at com.couchbase.client.dcp.transport.netty.AuthHandler.handleAuthResponse(AuthHandler.java:139)
	at com.couchbase.client.dcp.transport.netty.AuthHandler.channelRead0(AuthHandler.java:119)
	at com.couchbase.client.dcp.transport.netty.AuthHandler.channelRead0(AuthHandler.java:51)
	at com.couchbase.client.deps.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
	at com.couchbase.client.deps.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312)
	at com.couchbase.client.deps.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
	at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1302)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at com.couchbase.client.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:135)
	at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
	at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
	at java.lang.Thread.run(Thread.java:745)

The same code works if we try to open a bucket created on a fresh 5.0.1 installation.

Any pointers as to what might be the issue here?

Some more observation.

During Couchbase upgrade, there is a new user created (without password) for each existing bucket, as expected.
Now, if we try to open the bucket using this newly created user, we are able to perform the operation.
But, if we use the cluster administrator user, the same call fails with the exception shared above.

Could you show your configuration? This specific message is about incorrectly formatted connection string or lists of the endpoints.

Following is the Java code that we are using. Which configuration you want to see?

Client client = null;

client = Client.configure()
  .hostnames("172.17.1.22")
  .username("Administrator")
  .password("adminpassword")
  .bucket("b1")
  .build();

client.controlEventHandler(new ControlEventHandler() {
  public void onEvent(ChannelFlowController flowController, ByteBuf event) {
    logger.info(String.format("Received control event [%s]", event));
    event.release();
  }
});

client.dataEventHandler(new DataEventHandler() {
  public void onEvent(ChannelFlowController flowController, ByteBuf event) {
    if (DcpMutationMessage.is(event)) {
      logger.info("Mutation: " + DcpMutationMessage.toString(event));
    } else if (DcpDeletionMessage.is(event)) {
      logger.info("Deletion: " + DcpDeletionMessage.toString(event));
    }
    event.release();
  }
});

client.connect().await(10, TimeUnit.SECONDS);
logger.info(String.format("Opened bucket [%s] on [%s]", "b1", "172.17.1.22"));
client.disconnect().await();
logger.info(String.format("Closed bucket [%s] on [%s]", "b1", "172.17.1.22"));