Using config_cache getting error message: Bucket name is nullptr

Hi!

I’m trying to get the config_cache working for my connection to my cluster:

My connection string looks like the following:
‘cluster’ => ‘couchbase://IP?config_cache=./data/cache/cb_config_cache’

The connection part happens in a factory and looks like that:
$cluster = new Cluster($config[‘cluster’],$clusterOptions);

The first time the factory is invoked I get the following error message:
[cb,EROR] (bc_file L:73 I:268883527) (cache=./data/cache/cb_config_cache) Couldn’t open for reading: No such file or directory

That’s ok, the file was not there and is now written.

When the second invocation happens I would not expect an error message, but the following appears:

[cb,EROR] (bc_file L:127 I:2317153737) (cache=./data/cache/cb_config_cache) Bucket name is nullptr

So how do I get rid of this message?
I thought in v3 & cb 7 this should not be bucket depending?

My Versions are:
Couchbase Server community-7.0.2
couchbase support => enabled
extension version => 3.2.0
libcouchbase runtime version => 3.2.2 (git: fadbd4d1617df952457abfa9984d095015f1ca52)
libcouchbase headers version => 3.2.1 (git: 4e76dc6c809d0b01cf304f6421c73386c852b353)

Can someone please help me or explain if I should use the config cache or not?
Thanks!!

regards Alex

2 Likes

I have the same problem.
Running libcouchbase.x86_64 v 3.2.4-1 on Centos 7, php 8.0

        $options = new ClusterOptions();
        $options->credentials('user', 'pass');

        $connection_string = 'couchbase://someIPaddresses?'
            . http_build_query([
                'config_cache' => 'test-cache.json',
                'config_node_timeout' => 2,
                'operation_timeout' => 30
            ]);

        $cluster = new Cluster($connection_string, $options);

(obviously with proper values for user/pass/someIPaddresses)

yields

[cb,EROR] (bc_file L:127 I:2316925664) (cache=test-cache.json) Bucket name is nullptr

Further experimenting with this, I have…

  • created new buckets with no “-” in the name
  • set up a fresh couchbase server (local separate docker container rather than out on the network accessed over VPN)
  • changed the base image for php from Centos7 to redhat/ubi9

None of these changes has affected the outcome, but maybe it helps other folks diagnose things (please?).

Same issue here :confused: Tried different options, names, log levels etc. Never made it work.