The user is not authorized to the db. Looks like you haven't created the opensips database on the mysql server. Use the opensipsdbctl utility to initialize the database. First edit the opensipsctlrc with the settings for your database<div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: 'Trebuchet MS', sans-serif, Verdana, Arial; font-size: 14px; line-height: 21px; "><p class="vspace" style="margin-top: 1.33em; margin-bottom: 0px; ">
. At /etc/opensips/opensipsctlrc, uncomment as follows:</p><ol style="margin-top: 0px; margin-bottom: 0px; "><li>If you want to setup a database with opensipsdbctl, you must at least specify</li><li>this parameter.</li></ol>
<p style="margin-top: 0px; margin-bottom: 0px; ">DBENGINE=MYSQL</p><div class="vspace" style="margin-top: 1.33em; "></div><dl style="margin-top: 0px; margin-bottom: 0px; "><dd><ol style="margin-top: 0px; margin-bottom: 0px; ">
<li>database host</li></ol></dd></dl><p style="margin-top: 0px; margin-bottom: 0px; ">DBHOST=localhost</p><div class="vspace" style="margin-top: 1.33em; "></div><dl style="margin-top: 0px; margin-bottom: 0px; "><dd><ol style="margin-top: 0px; margin-bottom: 0px; ">
<li>database name (for ORACLE this is TNS name)</li></ol></dd></dl><p style="margin-top: 0px; margin-bottom: 0px; ">DBNAME=opensips</p><div class="vspace" style="margin-top: 1.33em; "></div><ol style="margin-top: 0px; margin-bottom: 0px; ">
<li>database path used by dbtext or db_berkeley</li><li>DB_PATH="/usr/local/etc/opensips/dbtext"<div class="vspace" style="margin-top: 1.33em; "></div><ol style="margin-top: 0px; margin-bottom: 0px; "><li>database read/write user</li>
</ol></li></ol><p style="margin-top: 0px; margin-bottom: 0px; ">DBRWUSER=opensips</p><div class="vspace" style="margin-top: 1.33em; "></div><dl style="margin-top: 0px; margin-bottom: 0px; "><dd><ol style="margin-top: 0px; margin-bottom: 0px; ">
<li>password for database read/write user</li></ol></dd></dl><p style="margin-top: 0px; margin-bottom: 0px; ">DBRWPW="password"</p><div class="vspace" style="margin-top: 1.33em; "></div><dl style="margin-top: 0px; margin-bottom: 0px; ">
<dd><ol style="margin-top: 0px; margin-bottom: 0px; "><li>database super user (for ORACLE this is 'scheme-creator' user)</li></ol></dd></dl><p style="margin-top: 0px; margin-bottom: 0px; ">DBROOTUSER="root"</p>
<div class="vspace" style="margin-top: 1.33em; "></div><ol style="margin-top: 0px; margin-bottom: 0px; "><li>user name column</li></ol><p style="margin-top: 0px; margin-bottom: 0px; ">USERCOL="username"</p><p class="vspace" style="margin-top: 1.33em; margin-bottom: 0px; ">
10. Now at /etc/opensips/ you should be able to run the following command to create a database from script: opensipsdbctl create the process is interactive.</p><p class="vspace" style="margin-top: 1.33em; margin-bottom: 0px; ">
<br></p></span><div class="gmail_quote">On Thu, Sep 15, 2011 at 11:23 PM, yasiru welandawe <span dir="ltr"><<a href="mailto:modygw@yahoo.com">modygw@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:lucida console, sans-serif;font-size:10pt"><div style="font-family:'lucida console', sans-serif;font-size:10pt"><span><br></span></div><div><font size="2"> Thank you Robert,</font></div>
<div><font size="2"><br></font></div><div><font size="2">I found that I wasn't add the db_mysql module. After I adding it, now opensips.cfg looks changed. </font></div><div><font size="2">But opensips still not starting. Now it gives following errors;</font></div>
<div><font size="2"><br></font></div><div><font size="2">Must be mysql connection error. I have no idea how to fix it.</font></div><div class="im"><div><font size="2"><br></font></div><div><font size="2"><div>astboxvm:~# /etc/init.d/opensips
start</div><div>Starting opensips: opensipsListening on</div><div> udp: 127.0.0.1 [127.0.0.1]:5065</div><div> udp: 192.168.102.24 [192.168.102.24]:5065</div><div> tcp: 127.0.0.1 [127.0.0.1]:5065</div>
<div> tcp: 192.168.102.24 [192.168.102.24]:5065</div><div>Aliases:</div><div> tcp: localhost:5065</div><div> udp: localhost:5065</div><div><br></div><div> already running.</div><div><br>
</div></font></div></div><div><font size="2">syslog:</font></div><div><font size="2"><div>Sep 17 14:54:08 astboxvm opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.102.24</div><div>Sep 17 14:54:08 astboxvm opensips:
WARNING:core:fix_socket_list: could not rev. resolve 192.168.102.24</div><div>Sep 17 14:54:08 astboxvm opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: NOTICE:core:main: version: opensips 1.7.0-notls (i386/linux)</div>
<div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:core:main: using 64 Mb shared memory</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:core:main: using 2 Mb private memory per process</div><div>
Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: NOTICE:signaling:mod_init: initializing module ...</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:sl:mod_init: Initializing StateLess engine</div><div>
Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:tm:mod_init: TM - initializing...</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:rr:mod_init: rr - initializing</div><div>Sep 17
14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:maxfwd:mod_init: initializing...</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:usrloc:ul_init_locks: locks array size 512</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:registrar:mod_init: initializing...</div>
<div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: INFO:textops:mod_init: initializing...</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: ERROR:db_mysql:db_mysql_connect: driver error(1045): Access denied for user 'opensips'@'localhost' (using password: YES)</div>
<div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: ERROR:db_mysql:db_mysql_new_connection: initial connect failed</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: ERROR:core:db_do_init: could not add connection to the pool</div>
<div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: ERROR:uri:mod_init: Could not connect to database</div><div>Sep 17 14:54:08 astboxvm
/usr/sbin/opensips[2166]: ERROR:core:init_mod: failed to initialize module uri</div><div>Sep 17 14:54:08 astboxvm /usr/sbin/opensips[2166]: ERROR:core:main: error while initializing modules</div><div>Sep 17 14:54:08 astboxvm opensips: INFO:core:daemonize: pre-daemon process exiting with -1</div>
</font></div><div><font size="2"><br></font></div><div><font size="2">Thank you & Regards</font></div><div><font size="2">Yasiru</font></div><div><font size="2"><br></font></div><div class="hm"><div style="font-family:'lucida console', sans-serif;font-size:10pt">
<br></div></div><div style="font-size:10pt;font-family:'lucida console', sans-serif"><div style="font-size:12pt;font-family:'times new roman', 'new york', times, serif"><div class="hm"><font size="2" face="Arial"><hr size="1">
<b><span style="font-weight:bold">From:</span></b> Robert Thomas
<<a href="mailto:thomcr@gmail.com" target="_blank">thomcr@gmail.com</a>><br><b><span style="font-weight:bold">To:</span></b> yasiru welandawe <<a href="mailto:modygw@yahoo.com" target="_blank">modygw@yahoo.com</a>>; OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, September 16, 2011 10:25 AM<br><b><span style="font-weight:bold">Subject:</span></b> Re: [OpenSIPS-Users] Trying to start opensips<br></font></div><div><div></div>
<div class="h5"><br><div>Looks like your config uses a function or a module that depends on a database backend and either you didnt register one, or it was not compiled<br><br><div>On Thu, Sep 15, 2011 at 10:34 PM, yasiru welandawe <span dir="ltr"><<a rel="nofollow" href="mailto:modygw@yahoo.com" target="_blank">modygw@yahoo.com</a>></span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-size:10pt;font-family:'lucida console', sans-serif"><div>
<span style="font-family:sans-serif">Hi All,</span><br></div><div><div style="font-size:10pt;font-family:sans-serif"><br></div><div style="font-size:10pt;font-family:sans-serif">
I just start to learn opensips, and i complete installing it using apt.</div><div style="font-size:10pt;font-family:sans-serif">When I try this "/etc/init.d/opensips start" it gives,</div><div><div><font size="2">astboxvm:~# /etc/init.d/opensips start</font></div>
<div><font size="2">Starting opensips: opensipsListening on</font></div><div><font size="2"> udp:
127.0.0.1 [127.0.0.1]:5065</font></div><div><font size="2"> udp: 192.168.102.24 [192.168.102.24]:5065</font></div><div><font size="2"> tcp: 127.0.0.1 [127.0.0.1]:5065</font></div><div><font size="2"> tcp: 192.168.102.24 [192.168.102.24]:5065</font></div>
<div><font size="2">Aliases:</font></div><div><font size="2"> tcp: localhost:5065</font></div><div><font size="2"> udp: localhost:5065</font></div><div><font size="2"><br></font></div><div><font size="2"> already running.</font></div>
<div style="font-size:10pt;font-family:sans-serif"><br></div><div style="font-size:10pt;font-family:sans-serif">and syslog log follows,</div><div><div><font size="2">Sep 17 14:15:38 astboxvm opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.102.24</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.102.24</font></div><div><font size="2">Sep 17 14:15:39 astboxvm opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: NOTICE:core:main: version: opensips 1.7.0-notls (i386/linux)</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:core:main: using 64 Mb shared memory</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:core:main: using 2 Mb private memory per process</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: NOTICE:signaling:mod_init: initializing module ...</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:sl:mod_init: Initializing StateLess engine</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:tm:mod_init: TM - initializing...</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:rr:mod_init: rr -
initializing</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:maxfwd:mod_init: initializing...</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:usrloc:ul_init_locks: locks array size 512</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:registrar:mod_init: initializing...</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: INFO:textops:mod_init: initializing...</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: ERROR:core:db_check_api: module db_mysql does not export db_use_table function</font></div><div><font size="2">Sep 17 14:15:39 astboxvm
/usr/sbin/opensips[2002]: ERROR:uri:mod_init: No database module found</font></div><div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: ERROR:core:init_mod: failed to initialize module uri</font></div>
<div><font size="2">Sep 17 14:15:39 astboxvm /usr/sbin/opensips[2002]: ERROR:core:main: error while initializing modules</font></div><div><font size="2">Sep 17 14:15:39 astboxvm opensips: INFO:core:daemonize: pre-daemon process exiting with -1</font></div>
<div><font size="2"><br></font></div><div><font size="2">Can anyone help me.</font></div><div><font size="2"><br></font></div><div><font size="2">Thank you & regards</font></div><div><font size="2">Yasiru</font></div>
</div></div></div></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a rel="nofollow" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a rel="nofollow" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Robert<br>
</div><br><br></div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Robert<br>
</div>