[sr-dev] Re: [kamailio/kamailio] db_redis: compile issues with TLS + redis-cluster (Issue #3893)

2024-07-05 Thread uv-2722 via sr-dev
Hello, Thank you for looking into this!

I added the above snippet, this is the output: 

```
> [kam 37/44] RUN make Q=0: 
>   
>
0.219 config.mak included
0.255 config.mak included
0.287 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 
-minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow 
-mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall-DNAME='"kamailio"' 
-DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' 
-DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 
-DCFG_DIR='"/usr/local/etc/kamailio/"' 
-DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' 
-DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE 
-DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST 
-DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY 
-DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP 
-DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM 
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL 
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM 
-DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL 
-DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT  
-I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64  
-DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster 
-D_FILE_OFFSET_BITS=64  -DWITH_SSL -DMOD_NAME='"db_redis"' 
-DMOD_NAMEID='db_redis' -c db_redis_mod.c -o db_redis_mod.o -MMD -MP
0.361 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 
-minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow 
-mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall-DNAME='"kamailio"' 
-DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' 
-DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 
-DCFG_DIR='"/usr/local/etc/kamailio/"' 
-DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' 
-DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE 
-DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST 
-DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY 
-DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP 
-DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM 
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL 
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM 
-DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL 
-DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT  
-I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64  
-DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster 
-D_FILE_OFFSET_BITS=64  -DWITH_SSL -DMOD_NAME='"db_redis"' 
-DMOD_NAMEID='db_redis' -c redis_connection.c -o redis_connection.o -MMD -MP
0.413 redis_connection.c: In function 'db_redis_connect':
0.413 redis_connection.c:129:9: error: unknown type name 'redisSSLContext'; did 
you mean 'redisContext'?
0.413   129 | redisSSLContext *ssl = NULL;
0.413   | ^~~
0.413   | redisContext
0.415 redis_connection.c:166:17: warning: implicit declaration of function 
'redisInitOpenSSL' [-Wimplicit-function-declaration]
0.415   166 | redisInitOpenSSL();
0.415   | ^~~~
0.417 redis_connection.c:167:23: warning: implicit declaration of function 
'redisCreateSSLContext' [-Wimplicit-function-declaration]
0.417   167 | ssl = redisCreateSSLContext(
0.417   |   ^
0.418 redis_connection.c:167:21: warning: assignment to 'int *' from 'int' 
makes pointer from integer without a cast [-Wint-conversion]
0.418   167 | ssl = redisCreateSSLContext(
0.418   | ^
0.420 redis_connection.c:196:17: warning: implicit declaration of function 
'redisClusterSetOptionEnableSSL'; did you mean 'redisClusterSetOptionMaxRetry'? 
[-Wimplicit-function-declaration]
0.420   196 | redisClusterSetOptionEnableSSL(con->con, ssl);
0.420   | ^~
0.420   | redisClusterSetOptionMaxRetry
0.439 make: *** [../../Makefile.rules:100: redis_connection.o] Error 1
```

Based on the errors it seemed like `hircluster_ssh.h` was missing, so added 
that to  `redis_connection.h` like below:

```
#ifdef WITH_HIREDIS_CLUSTER
#include 
#ifdef WITH_SSL
#include 
#endif
#else
#ifdef WITH_HIREDIS_PATH
#include 
#ifdef WITH_SSL
#include 
#endif
#else
#include 
#ifdef 

[sr-dev] Re: [kamailio/kamailio] ndb_redis: Error when receiving 'MOVED' response from redis-cluster with TLS (Issue #3894)

2024-07-05 Thread uv-2722 via sr-dev
Hello, Thank you for looking into this!

I installed and tested the latest master branch, I am getting the below errors. 
I have verified that the host in the `MOVED` response is up, has the needed 
data and can connect to it from the system kamailio is running on. Kamailio is 
running with log level 3 (debug), please let me know how to provide more 
information for troubleshooting. 

```
2024-07-05T17:43:30.226948916Z 2024-07-05 17:43:30.226089  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:437]: 
redisc_get_server(): Hash 31807 (ra)
2024-07-05T17:43:30.226949946Z 2024-07-05 17:43:30.226104  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:440]: 
redisc_get_server(): Entry 31807 (ra)
2024-07-05T17:43:30.226951136Z 2024-07-05 17:43:30.226120  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:444]: 
redisc_get_server(): Using entry 31807 (ra)
2024-07-05T17:43:30.226952166Z 2024-07-05 17:43:30.226136  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis 
[redis_client.c:1031]: redisc_exec(): rsrv->ctxRedis = 0x5589e7200c80
2024-07-05T17:43:30.226953146Z 2024-07-05 17:43:30.226151  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis 
[redis_client.c:1037]: redisc_exec(): rsrv->ctxRedis = 0x5589e7200c80
2024-07-05T17:43:30.226954236Z 2024-07-05 17:43:30.226167  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:896]: 
check_cluster_reply(): Redis replied: "MOVED 3667 
testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379"
2024-07-05T17:43:30.226955306Z 2024-07-05 17:43:30.226182  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:904]: 
check_cluster_reply(): Port "6379" [4] => 6379
2024-07-05T17:43:30.226956296Z 2024-07-05 17:43:30.226197  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:914]: 
check_cluster_reply(): Host 
"testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com
 [130]
2024-07-05T17:43:30.226957366Z 2024-07-05 17:43:30.226213  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:925]: 
check_cluster_reply(): Name of new connection: 
testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379
2024-07-05T17:43:30.226958386Z 2024-07-05 17:43:30.226240  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:437]: 
redisc_get_server(): Hash 307573284 
(testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379)
2024-07-05T17:43:30.226959406Z 2024-07-05 17:43:30.226256  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:440]: 
redisc_get_server(): Entry 31807 (ra)
2024-07-05T17:43:30.226960846Z 2024-07-05 17:43:30.226271  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:450]: 
redisc_get_server(): No entry found.
2024-07-05T17:43:30.226962046Z 2024-07-05 17:43:30.226286  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:437]: 
redisc_get_server(): Hash 307573284 
(testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379)
2024-07-05T17:43:30.226963076Z 2024-07-05 17:43:30.226302  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:440]: 
redisc_get_server(): Entry 307573284 
(testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379)
2024-07-05T17:43:30.226964116Z 2024-07-05 17:43:30.226318  3(16) NOTICE: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:444]: 
redisc_get_server(): Using entry 307573284 
(testdbredis-masked-hostname.00111000.130-characters-long.1.availability-zone.amazonaws.com:6379)
2024-07-05T17:43:30.226965146Z 2024-07-05 17:43:30.226333  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:593]: 
redisc_reconnect_server(): rsrv->ctxRedis = (nil)
2024-07-05T17:43:30.227843477Z 2024-07-05 17:43:30.227772  3(16) DEBUG: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:626]: 
redisc_reconnect_server(): rsrv->ctxRedis = 0x5589e7239650
2024-07-05T17:43:31.247855886Z 2024-07-05 17:43:31.247646  3(16) ERROR: {Kam 
192.168.20.4 191391185_65481742 1 706329 INVITE}ndb_redis [redis_client.c:652]: 
redisc_reconnect_server(): error 

[sr-dev] Re: [kamailio/kamailio] Kamailio crash with DMQ!? (Issue #3905)

2024-07-05 Thread Benjamin via sr-dev
We use the event_route[xhttp:request] to regurarly call jsonrpc_dispatch(). 
Every 5 minutes to get some data for monitoring. But nothing else. From the DMQ 
module we use dmq_handle_message() and dmq_is_from_node().

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3905#issuecomment-2210786915
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Kamailio crash with DMQ!? (Issue #3905)

2024-07-05 Thread Benjamin via sr-dev
No. The Kamailio ist "just" doing it's job. But I will double check if we have 
RPC calls.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3905#issuecomment-2210777867
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] Base58 not decoding correctly (Issue #3907)

2024-07-05 Thread duarterocha91 via sr-dev
### Description

When doing base58 encoding and decoding there is some issue with the decoded 
string.

Here is my code to ilustrate the issue : 

$var(Test) = "test_string";
$var(Test) = $(var(Test){s.encode.base58});
xerr("Test String encoded = STRING_BEGIN$var(Test)STRING_END");

$var(Test) = $(var(Test){s.decode.base58});
xerr("Test String decoded = STRING_BEGIN$var(Test)STRING_END");

It has the following output : 

   
![image](https://github.com/kamailio/kamailio/assets/28625449/f9b10fd3-6e75-4368-9abd-005d44cc1235)

I've inserted STRING_BEGIN and STRING_END in the log to be able to know when 
string ends.

After this i've tried to user {s.trim} method with no success. I've noticed 
that despite not printing correctly, the string's length is calculated 
correctly, so i did a manual substring and was able to fix it.

xerr("Test Base58");
$var(Test) = "test_string";
$var(Test) = $(var(Test){s.encode.base58});
xerr("Test String encoded = STRING_BEGIN$var(Test)STRING_END");

$var(Test) = $(var(Test){s.decode.base58});
xerr("Test String decoded = STRING_BEGIN$var(Test)STRING_END");

$var(Test) = $(var(Test){s.trim});
xerr("Test String decoded and trimmed = 
STRING_BEGIN$var(Test)STRING_END");

$var(substring_length) = $(var(Test){s.len}) - 1;
$var(Test) = $(var(Test){s.substr,0,$var(substring_length)});

xerr("Test String decoded and fixed = 
STRING_BEGIN$var(Test)STRING_END");

Output : 

  
![image](https://github.com/kamailio/kamailio/assets/28625449/9a100c45-4671-4381-9ddf-3a1c8c9404ee)

All of this doesn't happen with method for base64 for example



### Additional Information


version: kamailio 5.7.1 (x86_64/linux) 4238e4
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, 
TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 4238e4
compiled on 12:39:30 Jun 29 2023 with gcc 4.8.5


* **Operating System**:

CentOS 7 



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3907
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] pkg: RPM packaging add kamailio-tls_wolfssl subpackage (PR #3592)

2024-07-05 Thread Gustavo Almeida via sr-dev
> I have tried to build a module on `CentOS 8 Stream` and got an error
> 
> ```
> CC (gcc) [M auth_identity.so]   auth_crypt.o
> CC (gcc) [M auth_identity.so]   auth_dynstr.o
> LD (gcc) [M auth_identity.so]   auth_identity.so
> Makefile:65: sources = tls_util.c tls_domain.c tls_rand.c tls_map.c tls_cfg.c 
> tls_select.c tls_dump_vf.c tls_init.c tls_bio.c tls_config.c tls_server.c 
> tls_rpc.c tls_ct_wrq.c tls_wolfssl_mod.c tls_verify.c , auto_gen = , objs 
> = tls_util.o tls_domain.o tls_rand.o tls_map.o tls_cfg.o tls_select.o 
> tls_dump_vf.o tls_init.o tls_bio.o tls_config.o tls_server.o tls_rpc.o 
> tls_ct_wrq.o tls_wolfssl_mod.o tls_verify.o
> Makefile:65: sources = tls_util.c tls_domain.c tls_rand.c tls_map.c tls_cfg.c 
> tls_select.c tls_dump_vf.c tls_init.c tls_bio.c tls_config.c tls_server.c 
> tls_rpc.c tls_ct_wrq.c tls_wolfssl_mod.c tls_verify.c , auto_gen = , objs 
> = tls_util.o tls_domain.o tls_rand.o tls_map.o tls_cfg.o tls_select.o 
> tls_dump_vf.o tls_init.o tls_bio.o tls_config.o tls_server.o tls_rpc.o 
> tls_ct_wrq.o tls_wolfssl_mod.o tls_verify.o
> CC (gcc) [M tls_wolfssl.so] tls_util.o
> In file included from tls_util.c:36:
> tls_util.h:37:12: error: unknown type name 'SSL'
>char *s, SSL *ssl, tls_domains_cfg_t **tls_domains_cfg)
> ^~~
> make[2]: *** [../../Makefile.rules:100: tls_util.o] Error 1
> make[1]: *** [Makefile:508: modules] Error 1
> make[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-5.8.0-dev1/src'
> make: *** [Makefile:34: every-module] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.y2gQNv (%build)
> Bad exit status from /var/tmp/rpm-tmp.y2gQNv (%build)
> ```
> 
> I used wolfssl 5.6.3. Should I update to wolfssl 5.6.4?

Hi @sergey-safarov,

I'm facing the same issue when building for `CentOS 7`.
I'm using the `wolfssl-devel` package available on `kamailio` repo: `v5.6.3`.
Can you please update the version for `CentOS 7`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3592#issuecomment-2210681596
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] performance regression related to new TCP connection tracking feature with a high number of connections (Issue #3759)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Closed #3759 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3759#event-13404816026
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] performance regression related to new TCP connection tracking feature with a high number of connections (Issue #3759)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
The commit e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6 allows a way to disable the 
checks, if one wants to add further improvements, then PRs can be made.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3759#issuecomment-2210681821
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] tcpops module event_route[tcp:closed] route block $conid is null (Issue #3767)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Should be fixed, as reported.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3767#issuecomment-2210675972
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] tcpops module event_route[tcp:closed] route block $conid is null (Issue #3767)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Closed #3767 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3767#event-13404773866
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Kamailio crash with DMQ!? (Issue #3905)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
The rpc commands do not have to be about dmq itself, but any other core or 
module parameter. Isn't there any rpc command executed to change Kamailio 
parameter values?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3905#issuecomment-2210616280
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] ndb_redis: Error when receiving 'MOVED' response from redis-cluster with TLS (Issue #3894)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Closed #3894 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3894#event-13404172621
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] ndb_redis: Error when receiving 'MOVED' response from redis-cluster with TLS (Issue #3894)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
The local buffers used to build the new server spec after the MOVED were not 
large enough for the address returned. I increased the size, which should be 
now for any decently large server address. The commit is in master branch, it 
will be backported soon.

I am closing this one, should there be still problems, comment to reopen.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3894#issuecomment-2210588747
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:6f434afc: ndb_redis: larger size for buffers to create server specs on cluster redirect

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 6f434afc414b7f5b66374a124138990f7a3dd1d1
URL: 
https://github.com/kamailio/kamailio/commit/6f434afc414b7f5b66374a124138990f7a3dd1d1

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-07-05T11:47:34+02:00

ndb_redis: larger size for buffers to create server specs on cluster redirect

- GH #3894

---

Modified: src/modules/ndb_redis/redis_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6f434afc414b7f5b66374a124138990f7a3dd1d1.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6f434afc414b7f5b66374a124138990f7a3dd1d1.patch

---

diff --git a/src/modules/ndb_redis/redis_client.c 
b/src/modules/ndb_redis/redis_client.c
index cba94a38c06..74df8efda0b 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -886,11 +886,11 @@ int redisc_exec_pipelined(redisc_server_t *rsrv)
 int check_cluster_reply(redisReply *reply, redisc_server_t **rsrv)
 {
redisc_server_t *rsrv_new;
-   char buffername[100];
+   char buffername[512];
unsigned int port;
str addr = {0, 0}, tmpstr = {0, 0}, name = {0, 0};
int server_len = 0;
-   char spec_new[100];
+   char spec_new[512];
 
if(redis_cluster_param) {
LM_DBG("Redis replied: \"%.*s\"\n", (int)reply->len, 
reply->str);

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:4d2988a7: ndb_redis: print server spec lenght in error message

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: 4d2988a79d992ed8f3ce4cffa6c387ef0425be94
URL: 
https://github.com/kamailio/kamailio/commit/4d2988a79d992ed8f3ce4cffa6c387ef0425be94

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-07-05T10:41:09+02:00

ndb_redis: print server spec lenght in error message

- use standard pkg alloc error message

---

Modified: src/modules/ndb_redis/redis_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4d2988a79d992ed8f3ce4cffa6c387ef0425be94.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4d2988a79d992ed8f3ce4cffa6c387ef0425be94.patch

---

diff --git a/src/modules/ndb_redis/redis_client.c 
b/src/modules/ndb_redis/redis_client.c
index c9280991ff3..cba94a38c06 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -944,12 +944,13 @@ int check_cluster_reply(redisReply *reply, 
redisc_server_t **rsrv)
addr.len, addr.s, port);
 
if(server_len < 0 || server_len > 
sizeof(spec_new) - 1) {
-   LM_ERR("failed to print server spec 
string\n");
+   LM_ERR("failed to print server spec 
string (%d)\n",
+   server_len);
return 0;
}
server_new = (char *)pkg_malloc(server_len + 1);
if(server_new == NULL) {
-   LM_ERR("Error allocating pkg mem\n");
+   PKG_MEM_ERROR;
return 0;
}
 
@@ -969,7 +970,7 @@ int check_cluster_reply(redisReply *reply, redisc_server_t 
**rsrv)

name.len, name.s);
return 1;
} else {
-   LM_ERR("ERROR 
connecting to the new server with "
+   LM_ERR("failed 
connecting to the new server with "
   "name: 
%.*s\n",

name.len, name.s);
return 0;

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] [Warning] Aborted connection 203 to db: 'kamailio' user: 'kamailio' host: 'localhost' (Issue #3906)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Follow the provided template to report an issue (provide all the data requested 
in the template in the appropriate format) or use sr-us...@lists.kamailio.org 
mailing list to figure out if it is something related to the configuration file.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3906#issuecomment-2210235330
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] [Warning] Aborted connection 203 to db: 'kamailio' user: 'kamailio' host: 'localhost' (Issue #3906)

2024-07-05 Thread Daniel-Constantin Mierla via sr-dev
Closed #3906 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3906#event-13401550632
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org