#588 Prosody returns unauth error when MySQL is not ready at start; doesn't recover
Reporter
rhi
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Type-Defect
Status-Duplicate
rhi
on
First, thanks for your good work! I really love prosody. However, I have this (small) problem:
I have prosody/0.9.10 with MySQL storage backend (on a FreeBSD 10.2 server).
When booting the system, both MySQL and prosody are started. However, it MySQL is not ready before prosody is started, prosody always returns "user unauthenticated" and doesn't retry the MySQL connection. This means that prosody is not usable until it's restarted after MySQL is fully ready. (Which means that I can't reliably reboot the server, because prosody won't work then without manual interaction.)
Suggestions:
1. Either retry on external storage backend errors, or at least refuse to start prosody if the storage is not available.
2. Return an error message like "storage not available" instead of "user unauthenticated"
Steps to reproduce:
1. Configure prosody with MySQL storage
2. Stop MySQL
3. Start prosody
4. Try to connect to prosody with a client: "user not authorized"
5. Start MySQL, wait until it's ready
6. Try to connect to prosody with a client: still "user not authorized"!
7. Restart prosody
8. Now it works
Zash
on
Hi, thanks for the report!
First, are you sure the version is 0.9.10? That hasn't been released yet.
Second, retrying and reconnecting is one of the improvements that will be in the SQL storage plugin in the next major version, 0.10. There is an issue for this already so I will close this as a duplicate.
Duplicate of #417
First, thanks for your good work! I really love prosody. However, I have this (small) problem: I have prosody/0.9.10 with MySQL storage backend (on a FreeBSD 10.2 server). When booting the system, both MySQL and prosody are started. However, it MySQL is not ready before prosody is started, prosody always returns "user unauthenticated" and doesn't retry the MySQL connection. This means that prosody is not usable until it's restarted after MySQL is fully ready. (Which means that I can't reliably reboot the server, because prosody won't work then without manual interaction.) Suggestions: 1. Either retry on external storage backend errors, or at least refuse to start prosody if the storage is not available. 2. Return an error message like "storage not available" instead of "user unauthenticated" Steps to reproduce: 1. Configure prosody with MySQL storage 2. Stop MySQL 3. Start prosody 4. Try to connect to prosody with a client: "user not authorized" 5. Start MySQL, wait until it's ready 6. Try to connect to prosody with a client: still "user not authorized"! 7. Restart prosody 8. Now it works
Hi, thanks for the report! First, are you sure the version is 0.9.10? That hasn't been released yet. Second, retrying and reconnecting is one of the improvements that will be in the SQL storage plugin in the next major version, 0.10. There is an issue for this already so I will close this as a duplicate. Duplicate of #417
Changes