{'EXIT',“invalid hostname”} when start Ejabberd [closed]-Collection of common programming errors

I install the Ejabberd on my Lion with OTP/r15b02.

When start Ejabberd, there is one error in log

=CRASH REPORT==== 18-Sep-2012::21:05:54 ===
  crasher:
    initial call: application_master:init/4
    pid: 
    registered_name: []
    exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]},
                                 {'EXIT',"invalid hostname"}}}
      in function  application_master:init/4 (application_master.erl, line 138)
    ancestors: []
    messages: [{'EXIT',,normal}]
    links: [,]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 987
    stack_size: 24
    reductions: 151
  neighbours:

Who can tell me the reason , thanks

  1. Tracking the ejabberd code, I see that you should have this return if the host (or hosts) definition in the ejabber config file is incorrect.

    The exmpp_stringprep:nodeprep(Host) is throwing an error for one of the Host name you define. I guess you can check it in the shell.

    Another possible reason is that exmpp is not started yet, but I guess that ejabber is taking care of that.

    In my opinion, ejabber should not redefine the error message coming from exmpp_stringprep:nodeprep because it can help for debug: {error, invalid_string | exmpp_not_started} give more info than {exit,invalid hostname}, or better, it should not trap it, as it fails anyway.