Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564434 - net-im/prosody - init script should wait for database
Summary: net-im/prosody - init script should wait for database
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rafael Martins
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 15:40 UTC by Erich Seifert
Modified: 2015-10-29 16:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Seifert 2015-10-29 15:40:23 UTC
When I use net-im/prosody-0.9.8 with PostgreSQL as a storage backend (USE flag postgres), prosody fails to start at boot time because it can't connect to the database.

Restarting prosody as soon as the database is running makes it work again.


Reproducible: Always

Steps to Reproduce:
1. # USE="postgresql" emerge net-im/prosody
2. # rc-update add prosody default
3. reboot

Actual Results:  
Oct 26 00:28:45 general info    Hello and welcome to Prosody version 0.9.8
Oct 26 00:28:46 general info    Prosody is using the select backend for connection handling
Oct 26 00:28:46 modulemanager   error   Error initializing module 'storage_sql' on 'muc.server.org': /usr/lib64/prosody/modules/mod_storage_sql.lua:172: Failed to connect to database: no connection 

stack traceback:
        /usr/lib64/prosody/core/modulemanager.lua:29: in function </usr/lib64/prosody/core/modulemanager.lua:29>
        [C]: in function 'assert'
        /usr/lib64/prosody/modules/mod_storage_sql.lua:172: in main chunk
        [C]: in function 'pcall'
        /usr/lib64/prosody/core/modulemanager.lua:171: in function 'do_load_module'
        /usr/lib64/prosody/core/modulemanager.lua:249: in function 'load'
        /usr/lib64/prosody/core/storagemanager.lua:54: in function 'load_driver'
        /usr/lib64/prosody/core/storagemanager.lua:74: in function 'get_driver'
        /usr/lib64/prosody/core/storagemanager.lua:84: in function 'open_store'
        /usr/lib64/prosody/modules/muc/mod_muc.lua:36: in main chunk
        [C]: in function 'pcall'
        /usr/lib64/prosody/core/modulemanager.lua:171: in function 'do_load_module'
        /usr/lib64/prosody/core/modulemanager.lua:249: in function 'load'
        /usr/lib64/prosody/core/modulemanager.lua:71: in function </usr/lib64/prosody/core/modulemanager.lua:46>
        /usr/lib64/prosody/util/events.lua:67: in function 'fire_event'
        /usr/lib64/prosody/core/hostmanager.lua:98: in function 'activate'
        /usr/lib64/prosody/core/hostmanager.lua:44: in function </usr/lib64/prosody/core/hostmanager.lua:35>
        /usr/lib64/prosody/util/events.lua:67: in function 'fire_event'
        /usr/lib64/prosody/../../bin/prosody:337: in function 'prepare_to_start'
        /usr/lib64/prosody/../../bin/prosody:403: in main chunk
        [C]: at 0x00404540
Oct 26 00:28:46 storagemanager  error   Failed to load storage driver plugin sql on muc.server.org: /usr/lib64/prosody/modules/mod_storage_sql.lua:172: Failed to connect to database: no connection to the server



# emerge -pv prosody

[ebuild   R    ] net-im/prosody-0.9.8::gentoo  USE="ipv6 jit libevent postgres ssl zlib -mysql -sqlite" 0 KiB