### Description
Scenario: Kamailio servers running behind a loadbalancer (AWS network loadbalancer in this case). This causes all packets to come from the same IP address in Kamailio's POV.
The change https://github.com/kamailio/kamailio/commit/a902e4a032a85a7755de32eeadac800… introduced a connection limit per source IP address. This obviously conflicts with the setup mentioned above. We need up to 10000 client connections, which would seem to all come from the same IP address.
Apart from this limit being introduced without a changelog entry (at least I didn't find one), I would expect it to be configurable. But from the commit it looks like it is a compile time option only.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
#### Log Messages
```
Feb 15 09:24:00 sipproxy /usr/sbin/kamailio[174]: CRITICAL: <core> [core/tcp_main.c:4447]: handle_new_connect(): hit the limit of connections per source IP (100.68.15.172:33334) - rejecting
Feb 15 09:24:01 sipproxy /usr/sbin/kamailio[174]: CRITICAL: <core> [core/tcp_main.c:4447]: handle_new_connect(): hit the limit of connections per source IP (100.68.15.172:1153) - rejecting
Feb 15 09:24:01 sipproxy /usr/sbin/kamailio[174]: CRITICAL: <core> [core/tcp_main.c:4447]: handle_new_connect(): hit the limit of connections per source IP (100.68.15.172:59946) - rejecting
```
### Additional Information
Using the packages from the official Kamailio repository.
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.7.4 (x86_64/linux)
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: unknown
compiled with gcc 11.4.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
Ubuntu Jammy
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3755
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3755(a)github.com>
Hi,
we at sipgate would like to know if there is a reason why the xhttp_prom
module doesn't export statistics like stats.fetch all.
We are missing the tls.info as well as pkg.stats values.
Is there a reason for this? Are there any pointers on how we could
implement it ourselves and provide patches?
Best regards
Christian Berger
--
Christian Berger - berger(a)sipgate.de
Telefon: +49 (0)211-63 55 55-0
Telefax: +49 (0)211-63 55 55-22
sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
www.sipgate.de - www.sipgate.co.uk
Module: kamailio
Branch: master
Commit: c89fe41b1583af74cdf7e20d2357d7c90990839f
URL: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-02-14T15:20:35+08:00
db_mysql: fix typos
The option opt_ssl_ca is a string not integer.
The comment for ea81e6cb should show the code fix as
mysql_options(ptr->con, MYSQL_OPT_SSL_CA, (void *)db_mysql_opt_ssl_ca)
---
Modified: src/modules/db_mysql/doc/db_mysql_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
Patch: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
---
diff --git a/src/modules/db_mysql/doc/db_mysql_admin.xml b/src/modules/db_mysql/doc/db_mysql_admin.xml
index 7297f2d1b15..18c703838ce 100644
--- a/src/modules/db_mysql/doc/db_mysql_admin.xml
+++ b/src/modules/db_mysql/doc/db_mysql_admin.xml
@@ -219,7 +219,7 @@ modparam("db_mysql", "opt_ssl_mode", 1)
</example>
</section>
<section id="db_mysql.p.opt_ssl_ca">
- <title><varname>opt_ssl_ca</varname> (integer)</title>
+ <title><varname>opt_ssl_ca</varname> (string)</title>
<para>
Configures the CA certs used to verify the MySQL server cert when
SSL is enabled.
Module: kamailio
Branch: master
Commit: a61bfe9fb8357cedf5cb22e2698ec5d817fcfe5a
URL: https://github.com/kamailio/kamailio/commit/a61bfe9fb8357cedf5cb22e2698ec5d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-02-14T08:16:19+01:00
modules: readme files regenerated - db_mysql ... [skip ci]
---
Modified: src/modules/db_mysql/README
---
Diff: https://github.com/kamailio/kamailio/commit/a61bfe9fb8357cedf5cb22e2698ec5d…
Patch: https://github.com/kamailio/kamailio/commit/a61bfe9fb8357cedf5cb22e2698ec5d…
---
diff --git a/src/modules/db_mysql/README b/src/modules/db_mysql/README
index 8e135cdcbf2..17f8795581a 100644
--- a/src/modules/db_mysql/README
+++ b/src/modules/db_mysql/README
@@ -32,6 +32,7 @@ Daniel-Constantin Mierla
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
4. Functions
5. Installation
@@ -46,9 +47,10 @@ Daniel-Constantin Mierla
1.5. Set insert_delayed parameter
1.6. Set update_affected_found parameter
1.7. Set opt_ssl_mode parameter
- 1.8. Set a my.cnf group in db_url parameter
- 1.9. Adding a kamailio group to my.cnf
- 1.10. Using [client] and specific group
+ 1.8. Set opt_ssl_ca parameter
+ 1.9. Set a my.cnf group in db_url parameter
+ 1.10. Adding a kamailio group to my.cnf
+ 1.11. Using [client] and specific group
Chapter 1. Admin Guide
@@ -69,6 +71,7 @@ Chapter 1. Admin Guide
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
4. Functions
5. Installation
@@ -107,6 +110,7 @@ Chapter 1. Admin Guide
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
3.1. ping_interval (integer)
@@ -212,6 +216,21 @@ modparam("db_mysql", "update_affected_found", 1)
modparam("db_mysql", "opt_ssl_mode", 1)
...
+3.8. opt_ssl_ca (integer)
+
+ Configures the CA certs used to verify the MySQL server cert when SSL
+ is enabled.
+
+ Required when opt_ssl_mode = 4 or 5 and db_mysql is built with
+ libmysqlclient.
+
+ Default value is NULL (NULL - not configured).
+
+ Example 1.8. Set opt_ssl_ca parameter
+...
+modparam("db_mysql", "opt_ssl_ca", "/etc/ssl/certs/mysql-ca.pem")
+...
+
4. Functions
No function exported to be used from configuration file.
@@ -238,12 +257,12 @@ modparam("db_mysql", "opt_ssl_mode", 1)
* mysql://user:pass@[group]/db
* mysql://[group]/db
- Example 1.8. Set a my.cnf group in db_url parameter
+ Example 1.9. Set a my.cnf group in db_url parameter
...
modparam("usrloc", "db_url", "mysql://[kamailio]/kamailio)
...
- Example 1.9. Adding a kamailio group to my.cnf
+ Example 1.10. Adding a kamailio group to my.cnf
...
[kamailio]
socket = /path/to/mysql.sock
@@ -257,7 +276,7 @@ default-character-set = utf8
both your specific group and the client group, then the value is taken
from the last one.
- Example 1.10. Using [client] and specific group
+ Example 1.11. Using [client] and specific group
...
[client]
socket = /run/mysql/mysqld.sock