You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a service that needs to access a redis cluster. I started development with placing the service and cluster in the same Docker container and it worked without a problem. Unfortunately when I tried to place both the service and cluster in separate containers the cluster client is unable to create a subscriber. The subscriber() method call on RedisCluster fails with a following stacktrace:
#0 0x00007f7e7e97c672 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007f7e7eaedd4f in sw::redis::throw_error(redisContext const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) [clone .cold] () from /usr/local/lib/libredis++.so.1 #2 0x00007f7e7eafdc4f in sw::redis::Connection::Connector::connect() const () from /usr/local/lib/libredis++.so.1 #3 0x00007f7e7eaff0c4 in sw::redis::Connection::Connection(sw::redis::ConnectionOptions const&) () from /usr/local/lib/libredis++.so.1 #4 0x00007f7e7eb19034 in sw::redis::RedisCluster::subscriber() () from /usr/local/lib/libredis++.so.1 #5 0x0000555eaa058a9a in main (argc=1, argv=0x7fffdf5c40f8) at ../test.cpp:9
To Reproduce
I have provided a minimal example in this repository: https://github.com/KonradPR/redis-example
It contains a simple docker compose that runs the minimal setup capable of the bug reproduction.
Expected behavior
I expected to create a Subscriber object without a problem.
In this case, nodes in Redis Cluster connects to each other with localhost, and send redirection response to client with localhost. So when client is redirected, it tries to connect to a local address, and it does not exist.
You might need to seek help from a Redis and docker expert on how to create the cluster with IP address other than localhost.
Describe the bug
I have a service that needs to access a redis cluster. I started development with placing the service and cluster in the same Docker container and it worked without a problem. Unfortunately when I tried to place both the service and cluster in separate containers the cluster client is unable to create a subscriber. The subscriber() method call on RedisCluster fails with a following stacktrace:
#0 0x00007f7e7e97c672 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007f7e7eaedd4f in sw::redis::throw_error(redisContext const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) [clone .cold] () from /usr/local/lib/libredis++.so.1
#2 0x00007f7e7eafdc4f in sw::redis::Connection::Connector::connect() const () from /usr/local/lib/libredis++.so.1
#3 0x00007f7e7eaff0c4 in sw::redis::Connection::Connection(sw::redis::ConnectionOptions const&) () from /usr/local/lib/libredis++.so.1
#4 0x00007f7e7eb19034 in sw::redis::RedisCluster::subscriber() () from /usr/local/lib/libredis++.so.1
#5 0x0000555eaa058a9a in main (argc=1, argv=0x7fffdf5c40f8) at ../test.cpp:9
To Reproduce
I have provided a minimal example in this repository:
https://github.com/KonradPR/redis-example
It contains a simple docker compose that runs the minimal setup capable of the bug reproduction.
Expected behavior
I expected to create a Subscriber object without a problem.
Environment:
Additional context
I would be thankful for any sugestions or directions as to what can be the source of the problem.
Best Regards,
Konrad
The text was updated successfully, but these errors were encountered: