[OpenSIPS-Users] Error Initializing auth_aaa Module on Startup

Ionut Boangiu ionut.boangiu at itsyscom.com
Thu Apr 25 09:38:43 UTC 2024


Hello,

I've been working through the Diameter Authentication and Accounting
tutorial (https://www.opensips.org/Documentation/Tutorials-Diameter-AAA)
and I have some issues when loading the auth_aaa module on startup. Before
posting, I had a look through the mailing list archives and did not find a
solution to this issue. Sorry if I missed any.

Debian 12
OpenSIPS Version: 3.5 nightly (also tried on 3.4 but encountered the same
issue)
freeDiameter version: 1.2.1

Error Logs:

Apr 25 05:03:29 debian /usr/sbin/opensips[24397]: INFO:auth_aaa:mod_init:
initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24397]:
ERROR:aaa_diameter:dm_find: error in
((fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, map->name,
&obj, 2))): -2
Apr 25 05:03:29 debian /usr/sbin/opensips[24397]: ERROR:auth_aaa:mod_init:
auth_aaa: can't get code for the Digest-Qop attribute (type 0)
Apr 25 05:03:29 debian /usr/sbin/opensips[24397]: ERROR:core:init_mod:
failed to initialize module auth_aaa
Apr 25 05:03:29 debian /usr/sbin/opensips[24397]: ERROR:core:main: failed
to initialize modules!


What I did:
- Installed freeDiameter and set up the configurations for both client and
server (both sharing the same VM).
- Verified that Capabilities and Watchdog exchanges happen successfully
between the isolated client and server.
- Created an opensips MySQL database for the diameter server using
opensips-cli (currently empty).
- Configured `opensips.cfg` using the residential setup as a base, modified
the sockets, the module path, and loaded auth and diameter modules.
- Included `aaa_proxy_authorize`, `proxy_challenge`, and `do_accounting` in
the routing logic (without any purpose for now).
- Started the freeDiameter server, then tried to start the opensips service
and it failed with the error above.

In the tutorial, no extensions were loaded in the client configuration. I
thought initially, that I had to load the dict_sip.fdx extension for the
client as well, as the Digest-Qop AVP is part of that, but that didn't make
much sense after seeing in the debug logs that the other Digest-* AVPs were
actually found. They are being loaded internally, right?

I attached the logs, the opensips configuration and the freeDiameter
configurations (for both server and client, although they should be
identical to the tutorial with only the paths differing). Let me know if i
missed anything. Any help is appreciated!

I also have an unrelated question if you don't mind: is there a tool or
method to convert a .c dict to .xml format, or is creating them
myself/looking for them already in .xml format somewhere else the only
option?

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240425/40c335f0/attachment.html>
-------------- next part --------------
Identity = "client.diameter.test";
Realm = "diameter.test";
Port = 3866;
SecPort = 3867;
No_SCTP;

TLS_Cred = "/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/cert.pem",
"/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/privkey.pem";
TLS_CA = "/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/certchain.pem";

ConnectPeer = "server.diameter.test" { 
        No_TLS; 
};
-------------- next part --------------
Apr 25 05:03:29 debian systemd[1]: Starting opensips.service - OpenSIPS is a very fast and flexible SIP (RFC3261) server...
Apr 25 05:03:29 debian opensips[24398]: INFO:core:fix_poll_method: using epoll as the IO watch method (auto detected)
Apr 25 05:03:29 debian opensips[24398]: Listening on
Apr 25 05:03:29 debian opensips[24398]:              udp: 127.0.0.1 [127.0.0.1]:5080
Apr 25 05:03:29 debian opensips[24398]:              udp: 127.0.0.1 [127.0.0.1]:5060
Apr 25 05:03:29 debian opensips[24398]:              udp: 192.168.122.42 [192.168.122.42]:5060
Apr 25 05:03:29 debian opensips[24398]:              udp: 192.168.122.42 [192.168.122.42]:5080
Apr 25 05:03:29 debian opensips[24398]: Aliases:
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:core:main: version: opensips 3.5.0-dev (x86_64/linux)
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:core:main: using 64 MB of shared memory, allocator: Q_MALLOC_DBG
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:core:main: using 4 MB of private process memory, allocator: Q_MALLOC_DBG
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: WARNING:core:init_reactor_size: shrinking reactor size from 262144 (autodetected via rlimit) to 10485 (limited by memory of 10% from 4Mb)
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: WARNING:core:init_reactor_size: use 'open_files_limit' to enforce other limit or increase pkg memory
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:init_reactor_size: reactor size 10485 (using up to 0.40Mb of memory per process)
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_CORE_THRESHOLD(1)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_CORE_SHM_THRESHOLD(2)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_CORE_PKG_THRESHOLD(3)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_CORE_PROC_AUTO_SCALE(4)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_CORE_TCP_DISCONNECT(5)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:tm:mod_init: TM - initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:sl:mod_init: Initializing StateLess engine
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:signaling:mod_init: initializing module ...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:rr:mod_init: rr - initializing
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:maxfwd:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:sipmsgops:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:usrloc:ul_init_locks: locks array size 512
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_AOR_INSERT(6)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_AOR_DELETE(7)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_INSERT(8)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_UPDATE(9)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_DELETE(10)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_CONTACT_REFRESH(11)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_UL_LATENCY_UPDATE(12)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:registrar:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:acc:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_ACC_EVENT(13)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_ACC_CDR(14)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_ACC_MISSED_EVENT(15)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:mod_init: initializing UDP-plain protocol
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:auth:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:aaa_diameter:dm_check_config: Diameter server support enabled
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:aaa_diameter:dm_check_config: Diameter server event E_DM_REQUEST not used in opensips script, auto-replying error code 3001 to any Diameter request
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:aaa_diameter:dm_init_minimal: initializing the Diameter object dictionary...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:evi_publish_event: Registered event <E_DM_REQUEST(16)>
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:auth_aaa:mod_init: initializing...
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: ERROR:aaa_diameter:dm_find: error in ((fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, map->name, &obj, 2))): -2
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: ERROR:auth_aaa:mod_init: auth_aaa: can't get code for the Digest-Qop attribute (type 0)
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: ERROR:core:init_mod: failed to initialize module auth_aaa
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: ERROR:core:main: failed to initialize modules!
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: INFO:core:cleanup: cleanup
Apr 25 05:03:29 debian opensips[24400]: 05:03:29  FATAL! Initiating freeDiameter shutdown sequence (0)
Apr 25 05:03:29 debian opensips[24400]: 05:03:29  NOTI   freeDiameterd framework is stopping...
Apr 25 05:03:29 debian opensips[24400]: 05:03:29  NOTI   Shutting down server sockets...
Apr 25 05:03:29 debian opensips[24400]: 05:03:29  NOTI   Sending terminate signal to all peer connections
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: NOTICE:core:main: Exiting....
Apr 25 05:03:29 debian /usr/sbin/opensips[24400]: CRITICAL:core:sig_usr: segfault in attendant (starter) process!
Apr 25 05:03:29 debian opensips[24398]: INFO:core:daemonize: pre-daemon process exiting with -1
Apr 25 05:03:29 debian systemd[1]: opensips.service: Control process exited, code=exited, status=255/EXCEPTION
Apr 25 05:03:29 debian systemd[1]: opensips.service: Failed with result 'exit-code'.
Apr 25 05:03:29 debian systemd[1]: Failed to start opensips.service - OpenSIPS is a very fast and flexible SIP (RFC3261) server.
Apr 25 05:03:29 debian systemd[1]: opensips.service: Scheduled restart job, restart counter is at 5.
Apr 25 05:03:29 debian systemd[1]: Stopped opensips.service - OpenSIPS is a very fast and flexible SIP (RFC3261) server.
Apr 25 05:03:29 debian systemd[1]: opensips.service: Start request repeated too quickly.
Apr 25 05:03:29 debian systemd[1]: opensips.service: Failed with result 'exit-code'.
Apr 25 05:03:29 debian systemd[1]: Failed to start opensips.service - OpenSIPS is a very fast and flexible SIP (RFC3261) server.
-------------- next part --------------
Identity = "server.diameter.test";
Realm = "diameter.test";
Port = 3868;
No_SCTP;

TLS_Cred = "/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/cert.pem",
"/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/privkey.pem";
TLS_CA = "/home/boangiu/src/freeDiameter/contrib/PKI/ca_script2/ca_data/my_diameter_ca/clients/*.diameter.test/certchain.pem";

LoadExtension = "/usr/lib/freeDiameter/dict_sip.fdx";
LoadExtension = "/home/boangiu/src/freeDiameter/fDbuild/extensions/app_opensips.fdx";

ConnectPeer = "client.diameter.test" { 
        No_TLS;
        port = 3866;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensips.cfg
Type: application/octet-stream
Size: 5428 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240425/40c335f0/attachment.obj>


More information about the Users mailing list