fails on boot when using mysql

Bug #574575 reported by Johnathon
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Jabberd
Triaged
Medium
MOTU
NULL Project
Invalid
Undecided
Unassigned

Bug Description

I am using the package in lucid (2.2.8-2ubuntu4). I have jabberd2 correctly configured to use mysql, and if I load everything myself after the system has booted, jabberd2 works great. However, when jabberd2 tries to load on boot, c2s fails with this message in the log:

[info] loading 'mysql' authreg module
[error] mysql: connection to database failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[error] failed to initialize auth module 'mysql'

It then never fully loads jabberd2 (only s2s and router are running on boot), until I manually do it.

From what I can tell, mysql (which now in lucid is loading through upstart) hasn't actually started yet. Once the system has fully loaded, I have verified that the mysql socket does indeed exist in that location. It would seem that either jabberd2 needs to be ported to use upstart, or have something set in its init to check for mysql.

Tomasz Sterna (smoku)
Changed in jabberd2:
assignee: nobody → MOTU (motu)
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

There's no evidence presented here that this is a bug in the Upstart upstream code

affects: upstart → null
Changed in null:
status: New → Invalid
Revision history for this message
Mystic-Mirage (mystic-mirage) wrote :

I have the same problem. Is there any fix for this?

Revision history for this message
Johnathon (outdooricon) wrote :

Currently I have to run "sudo invoke-rc.d jabberd2 start" every time I boot up to get jabber running properly.

Revision history for this message
Mystic-Mirage (mystic-mirage) wrote : Re: [Bug 574575] Re: fails on boot when using mysql

I have solve the problem by adding 'sleep 5' to /etc/init.d/jabberd2
file in 'start' section:

...
case "$1" in
   start)
      sleep 5
      echo -n "Starting Jabber services:"
...

2010/11/7 Johnathon <email address hidden>:
> Currently I have to run "sudo invoke-rc.d jabberd2 start" every time I
> boot up to get jabber running properly.
>
> --
> fails on boot when using mysql
> https://bugs.launchpad.net/bugs/574575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in JabberD XMPP server: New
> Status in NULL Project: Invalid
>
> Bug description:
> I am using the package in lucid (2.2.8-2ubuntu4). I have jabberd2 correctly configured to use mysql, and if I load everything myself after the system has booted, jabberd2 works great. However, when jabberd2 tries to load on boot, c2s fails with this message in the log:
>
> [info] loading 'mysql' authreg module
> [error] mysql: connection to database failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
> [error] failed to initialize auth module 'mysql'
>
> It then never fully loads jabberd2 (only s2s and router are running on boot), until I manually do it.
>
> >From what I can tell, mysql (which now in lucid is loading through upstart) hasn't actually started yet. Once the system has fully loaded, I have verified that the mysql socket does indeed exist in that location. It would seem that either jabberd2 needs to be ported to use upstart, or have something set in its init to check for mysql.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/jabberd2/+bug/574575/+subscribe
>

Revision history for this message
Tomasz Sterna (smoku) wrote :

My guess is that jabberd2 startup script needs mysql dependency of type 'uses'.

Revision history for this message
Mystic-Mirage (mystic-mirage) wrote :

Right but jabberd2 starts using init scripts and mysql uses upstart mechanism. Proper way is to convert jabberd2 autorun script to upstart.

Revision history for this message
Tomasz Sterna (smoku) wrote :

Agreed.
If the package maintainer is going to mess with init script, (s)he can as well convert it to upstart job.

Tomasz Sterna (smoku)
Changed in jabberd2:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.