Right, so should we close this one and move the example to #1726 considering its length, or maybe it's better to keep this one as more generic/readable?.
There's an issue when using TLS 1.3 that causes this behaviour, using 1.2 "solves" it.
Also discussed here: https://github.com/phpredis/phpredis/issues/1726.
Using your example:
$host = 'localhost';
$port = 6379;
$tls_opts = [
'verify_peer' => false,
'verify_peer_name' => false,
'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
];
$timeout = 1;
$client = new Redis();
if (! $client->connect("tls://$host", $port, 0, null, 0, 0, ['stream' => $tls_opts])) {
throw new Exception('Unable to connect to host.');
}
sleep($timeout);
$client->ping();
This is my problem.
When use xGroup on cluster and got "Next RedisClusterException: Can't communicate with any node in the cluster" I see cluster_library.h and not found commands with xGroup .xReadGroup and so on.
My redis info: redis 7.0
cluster inf
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:1
cluster_size:1
cluster_current_epoch:1
cluster_my_epoch:1
cluster_stats_messages_sent:0
cluster_stats_messages_received:0
total_cluster_links_buffer_limit_exceeded:0
cluster slots
1) 1) (integer) 0
2) (integer) 16383
3) 1) ""
2) (integer) 6379
3) "eaeb72c0c2093cf7cc047058ad6221c02c9e12b9"
4) (empty array)
When use xGroup on cluster and got "Next RedisClusterException: Can't communicate with any node in the cluster" I see cluster_library.h and not found commands with xGroup .xReadGroup and so on.
My redis info: redis 7.0
cluster inf
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:1
cluster_size:1
cluster_current_epoch:1
cluster_my_epoch:1
cluster_stats_messages_sent:0
cluster_stats_messages_received:0
total_cluster_links_buffer_limit_exceeded:0
cluster slots
1) 1) (integer) 0
2) (integer) 16383
3) 1) ""
2) (integer) 6379
3) "eaeb72c0c2093cf7cc047058ad6221c02c9e12b9"
4) (empty array)
Redisson issue was fixed in https://github.com/redisson/redisson/issues/4381
Hello,
This is just a simple issue report on other Java, Python, ectera client redis libraries that are known and we have seen have problems especially regarding "Sessions getting mixed up between different users". Although this would affect non-sessions too.
We have seen this issue happen to several large Java based sites, and we think we have finally figured the exact reason due to recent OpenAPI outage.
Here is OpenAPI describing the issue(redis-py, python based redis client): https://openai.com/blog/march-20-chatgpt-outage
Here is the (suspected) bug happening on Java based client library too: https://github.com/redisson/redisson/issues/4747
This issue is opened to suggest phpredis developers check whether the phpredis library is susceptible to "Sessions getting mixed up between different users". Especially when using persistent redis connections.
Thank you.
fix testObject for redis 7.2
change expected value according to redis version
See #2334
I also add a new $msg
option to assertTrue to be able to add some debug info about the failure
change expected value according to redis version
Second test failure is from my env, so going to delete my comment
Another failure using develop branch
testPipelinePublish [FAILED]
Uncaught exception 'NOPERM No permissions to access a channel' (testPipelinePublish)
See #2334
I also add a new $msg
option to assertTrue to be able to add some debug info about the failure
5.3.7 test suite
testObject [FAILED]
Assertion failed: /dev/shm/BUILD/php-pecl-redis5-5.3.7/NTS/tests/RedisTest.php:2747 (testObject)
Assertion failed: /dev/shm/BUILD/php-pecl-redis5-5.3.7/NTS/tests/RedisTest.php:2754 (testObject)
Redis 7.2-RC1 is released
See the 00-RELEASENOTES