First make sure that it's working correctly when you start mysql and opensips 
manually.

If it's good then you can change the boot order by editing the opensips init 
script in /etc/init.d/opensips:
Change the following:

### BEGIN INIT INFO
# Provides:          opensips
# Required-Start:    $syslog $network $local_fs $time
# Required-Stop:     $syslog $network $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the OpenSIPS SIP server
# Description:       Start the OpenSIPS SIP server
### END INIT INFO

With:

### BEGIN INIT INFO
# Provides:          opensips
# Required-Start:    $syslog $network $local_fs $time
# Required-Stop:     $syslog $network $local_fs
# Should-Start:      mysql
# Should-Stop:       mysql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the OpenSIPS SIP server
# Description:       Start the OpenSIPS SIP server
### END INIT INFO

i.e. add the should-start and should-stop lines and do "insserv -v opensips" to 
recalculate the boot deps.

Hope this helps.

Best Regards,
Vallimamod.


On Aug 29, 2013, at 12:24 PM, Danny Dias <[email protected]> wrote:

> I think that the problem is that OpenSIPS is starting before MySQL, that's 
> why opensips stops:
> 
> Aug 28 23:15:26 opencomm01 opensips: INFO:core:daemonize: pre-daemon process 
> exiting with -1
> 
> I'm using Debian 7; i'm trying to figure it out how to change the order of 
> startup services, but not sure how
> 
> 
> 
> 2013/8/29 Vallimamod ABDULLAH <[email protected]>
> Hi,
> 
> On Aug 29, 2013, at 5:55 AM, Danny Dias <[email protected]> wrote:
> 
> > Aug 28 23:15:26 opencomm01 /usr/local/opensips_proxy/sbin/opensips[3060]: 
> > ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect to local 
> > MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
> 
> 
> Looks like a mysql connection issue. Check your settings and don't hesitate 
> to share your opensips config file.
> 
> --
> Best Regards,
> Vallimamod
> .
> 
> 
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> -- 
> SIP: [email protected]
> Web: http://www.danntel.net
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to