hi all, i am trying to load the permission module in the following manner:
loadmodule "permissions.so"
#---- permission params ------ modparam("permissions", "db_url", "mysql://openser:openserrw@localhost/openser") modparam("permissions", "db_mode",1) modparam("permissions", "trusted_table", "trusted")
and i am getting the following error:
ct 9 04:44:25 ubuntu /sbin/kamailio[1469]: WARNING: permissions [permissions.c:604]: default allow file (//etc/kamailio/permissions.allow) not found => empty rule set Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: WARNING: permissions [permissions.c:613]: default deny file (//etc/kamailio/permissions.deny) not found => empty rule set Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:156]: database problem Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: CRITICAL: permissions [address.c:233]: reload of address table failed Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:243]: no more shm memory Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [permissions.c:627]: failed to initialize the allow_address function Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: <core> [sr_module.c:874]: init_mod(): Error while initializing module permissions
any idea what is happening ?
2010/10/9 Shrouk Khan shroukkhan@softverk.is:
ct 9 04:44:25 ubuntu /sbin/kamailio[1469]: WARNING: permissions [permissions.c:604]: default allow file (//etc/kamailio/permissions.allow) not found => empty rule set Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: WARNING: permissions [permissions.c:613]: default deny file (//etc/kamailio/permissions.deny) not found => empty rule set Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:156]: database problem Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: CRITICAL: permissions [address.c:233]: reload of address table failed Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:243]: no more shm memory Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [permissions.c:627]: failed to initialize the allow_address function Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: <core> [sr_module.c:874]: init_mod(): Error while initializing module permissions any idea what is happening ?
Which kamailio version? I remember such error when some entry in the "address" table is wrong (invalid IP, invalid mask....). I think the error message was fixed some time ago.
2010/10/9 Shrouk Khan shroukkhan@softverk.is:
Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:156]: database problem Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: CRITICAL: permissions [address.c:233]: reload of address table failed Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:243]: no more shm memory Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [permissions.c:627]: failed to initialize the allow_address function
Hi Juha, the above error occurs because "grp" is 0. Could the log be improved so it doesn't complain about shared memory and instead tells that "grp" cannot be zero?
Best regards.
Iñaki Baz Castillo writes:
Hi Juha, the above error occurs because "grp" is 0. Could the log be improved so it doesn't complain about shared memory and instead tells that "grp" cannot be zero?
there was a commit recently to kamailio_3.0 modules_k/permissions/address.c. perhaps is already fixed the error message.
-- juha
On 10/9/10 3:07 PM, Juha Heinanen wrote:
Iñaki Baz Castillo writes:
Hi Juha, the above error occurs because "grp" is 0. Could the log be improved so it doesn't complain about shared memory and instead tells that "grp" cannot be zero?
there was a commit recently to kamailio_3.0 modules_k/permissions/address.c. perhaps is already fixed the error message.
the commit was related to this case. I moved shm error message when testing the pointer returned by shm_malloc(), previously was after the error label.
Cheers, Daniel
On 10/9/10 3:35 PM, Iñaki Baz Castillo wrote:
2010/10/9 Shrouk Khanshroukkhan@softverk.is:
Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:156]: database problem Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: CRITICAL: permissions [address.c:233]: reload of address table failed Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [address.c:243]: no more shm memory Oct 9 04:44:25 ubuntu /sbin/kamailio[1469]: ERROR: permissions [permissions.c:627]: failed to initialize the allow_address function
Hi Juha, the above error occurs because "grp" is 0. Could the log be improved so it doesn't complain about shared memory and instead tells that "grp" cannot be zero?
The shared memory message should not be printed. The hint about the problem can be improved, but there can be other error cases. It is quite a big IF condition that has to be split for a more accurate log message.
Cheers, Daniel