util.sasl_cyrus: Add text message from cyrussasl to <not-authorized/> errors.
[prosody.git] / prosody
diff --git a/prosody b/prosody
index 96223c72f2b7506e88745e1757911a822c66b092..9e41c27711186f78dab18504216101728088b891 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -32,6 +32,9 @@ if CFG_DATADIR then
        end
 end
 
+-- Initialize logging
+require "core.loggingmanager"
+
 -- Check runtime dependencies
 if not require "util.dependencies".check_dependencies() then
        os.exit(1);
@@ -112,9 +115,6 @@ function read_config()
 end
 
 function load_libraries()
-       -- Initialize logging
-       require "core.loggingmanager"
-       
        -- Load socket framework
        server = require "net.server"
 end    
@@ -225,9 +225,14 @@ function init_global_state()
                                                        elseif port == 5280 then
                                                                friendly_message = "check that Prosody or a BOSH connection manager "
                                                                        .."is not already running";
+                                                       else
+                                                               friendly_message = "this port is in use by another application";
                                                        end
                                                elseif err:match("permission") then
                                                        friendly_message = "Prosody does not have sufficient privileges to use this port";
+                                               elseif err == "no ssl context" then
+                                                       friendly_message = "there is no 'ssl' config under Host \"*\" which is "
+                                                               .."require for legacy SSL ports";
                                                end
                                                log("error", "Failed to open server port %d, %s", port, friendly_message);
                                        end