Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRASH] db_text for drouting - column gwid has a bad type [4], accepting only [3] #3518

Open
SoftSwitchDev opened this issue Nov 18, 2024 · 6 comments

Comments

@SoftSwitchDev
Copy link

OpenSIPS version

version: opensips 3.4.6 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 40206eeef
main.c compiled on  with gcc 10

Describe the bug
Opensips does not start when using db_text table for the drouting module.

To Reproduce

Steps to reproduce the behavior:

  1. Enable drouting and db_text modules in configuration.
  2. Fill in the db_text drouting table dr_gateways:
$ cat db_text/dr_gateways
id(int) gwid(str) type(int) address(str) strip(int) pri_prefix(str,null) attrs(str,null) probe_mode(int) state(int) socket(str,null) description(str,null)
1:asterisk:0:10.214.0.78:0:::0:0:udp\:10.214.0.77\:5081:test out provider server\n
  1. Launching opensips
  2. Opensips crashes on startup with an error:
    ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], accepting only [3]"
    CRITICAL:drouting:dr_reload_data_head: failed to load routing info"

Expected behavior

Opensips correctly loads drouting information from the db_text dr_gateways file without failures.

Relevant System Logs

$ tail -f /var/log/opensips/opensips.log | egrep "ERR|CRIT|WAR"
ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], accepting only [3]"
CRITICAL:drouting:dr_reload_data_head: failed to load routing info"

OS/environment information

  • Debian GNU/Linux 11 (bullseye)
  • OpenSIPS installation: debs
@SoftSwitchDev SoftSwitchDev changed the title [BUG] db_text for drouting - column gwid has a bad type [4], accepting only [3] [BUG] CRITICAL ERROR - db_text for drouting - column gwid has a bad type [4], accepting only [3] Nov 26, 2024
@SoftSwitchDev SoftSwitchDev changed the title [BUG] CRITICAL ERROR - db_text for drouting - column gwid has a bad type [4], accepting only [3] [BUG] ERROR CRITICAL - db_text for drouting - column gwid has a bad type [4], accepting only [3] Nov 26, 2024
@SoftSwitchDev SoftSwitchDev changed the title [BUG] ERROR CRITICAL - db_text for drouting - column gwid has a bad type [4], accepting only [3] [BUG] db_text for drouting - column gwid has a bad type [4], accepting only [3] Dec 9, 2024
@SoftSwitchDev SoftSwitchDev changed the title [BUG] db_text for drouting - column gwid has a bad type [4], accepting only [3] [CRASH] db_text for drouting - column gwid has a bad type [4], accepting only [3] Dec 9, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Dec 24, 2024
@SoftSwitchDev
Copy link
Author

Hi @bogdan-iancu ! Сan you please comment this issue about db_text ?

@github-actions github-actions bot removed the stale label Jan 10, 2025
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jan 26, 2025
@SoftSwitchDev
Copy link
Author

up

@github-actions github-actions bot removed the stale label Jan 28, 2025
@SoftSwitchDev
Copy link
Author

Checked the issue on opensips version: opensips 3.5.3 (x86_64/linux))

Have the same issue:

/usr/sbin/opensips[24454]: ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], accepting only [3]
/usr/sbin/opensips[24454]: CRITICAL:drouting:dr_reload_data_head: failed to load routing info

@SoftSwitchDev
Copy link
Author

@razvancrainea , could you please check the problem?

I replaced all DB_STRING with DB_STR in modules/drouting/dr_load.c , successfully compiled and launched opensips 3.6, with no error about the gwid column type.
Is this the right fix, or can you recommend something better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant