Found the problem after some investigation based on your suggestions. In the openldap configuration file /etc/openldap/ldap.conf, the entry TLS_CACERT is pointed to a certificate file in a directory which is accessible only by root user. After I move the file to a directory which all user can access it, now it works. I can start the kamailio as a service with "service kamailio start" with the running user and group is kamailio.

Thank you all for your helps and suggestions!

Best Regards,
Laura

On Tue, Jun 21, 2011 at 5:44 PM, laura testi <lau.testi@gmail.com> wrote:
The SELinux is disabled.




On Tue, Jun 21, 2011 at 5:26 PM, Andrew Pogrebennyk <andrew.pogrebennyk@portaone.com> wrote:
On 21.06.2011 17:30, laura testi wrote:
Should I need to set a some special environment variable to load ldap.so
in the /etc/init.d/kamailio?

The env output for root does not confirm my theory :) I'm not sure what is preventing kamailio from communication with LDAP, could it be that SELinux is enabled and denying it in some way?

--
Sincerely,
Andrew Pogrebennyk