Error message: "This connection does not support pipelining."

Hi, guys!

I’m new to Chirpstack and have recently installed a v4 stack. Whenever I click on a gateway I get a error message saying “This connection does not support pipelining.”.

When googling this error message I found this site, which appears to be from the redis source code. This leads me to think that this is a error message that originates in my redis cluster.

I am currently running the 4.0.4 version of ChirpStack, connected to a three node redis cluster (version 6.0.16). The documentation mentions that the requirement for redis is version 5 or above.

Does anyone know what the problem could be? Thanks in advance.

I decided to look into this problem myself. The first thing I noticed is that the link I found was actually the source code of the redis-rs rust library which Chirpstack uses to communicate with redis.

Here we can see the code where the error message originates:

    #[inline]
    pub fn query<T: FromRedisValue>(&self, con: &mut dyn ConnectionLike) -> RedisResult<T> {
        if !con.supports_pipelining() {
            fail!((
                ErrorKind::ResponseError,
                "This connection does not support pipelining."
            ));
        }

We can see that it fails if supports_pipelining() returns false.

In cluster.rs we can see the following code:

impl ConnectionLike for ClusterConnection {
    fn supports_pipelining(&self) -> bool {
        false
    }

This means that cluster connections do not support pipelining, and thus every call to query with a cluster connection on a redis::pipe() will fail with the indicated error message.

The consequence of this is that Chirpstack v4 does not actually support using redis clusters. Can someone confirm my findings?

That is an interesting find. To guarantee that all keys that are used in the pipeline are on the same node, I’m using the Redis hashtags (Redis cluster specification | Redis) so pipelining shouldn’t be an issue.

I was about to create an issue about this, when I noticed that there is a redis::pipe() and redis::cluster::cluster_pipe() function. I need to fix this in the ChirpStack code to use the cluster_pipe() function in case clustering is enabled (for the storage functions that are using pipelining).

1 Like