ejabberd - Comments for "Long Error Message: Unable to Start ejabberd" https://www.ejabberd.im/node/2804 en Purge completely and install slowly https://www.ejabberd.im/node/2804#comment-51890 <p>So your ejabberd server is completely useless right now? If I understood correctly, you installed ejabberd from source code package.</p> <p>I propose a drastic solution:</p> <ol> <li>Stop ejabberd. </li><li>Uninstall completely ejabberd, including the config files in /etc/ejabberd, binary files in /var/lib/ejabberd (or whatever), log files in /var/log/ejabberd, and start script in /sbin/ejabberdctl </li><li>Now that you removed everything related to ejabberd, download it again, compile and install. For example:<br /> <pre>$ wget ... $ tar -xzf ... $ cd ejabberd-2.0.0/src $ ./configure --enable-odbc $ make # sudo make install</pre></li><li>Do NOT configure ejabberd: don't modify ejabberd.cfg. Immediately after installing it, try to start with: /sbin/ejabberdctl </li><li>Check the directory /var/log/ejabberd It should have ejabberd.log with only some INFO REPORT, and sasl.log with many PROGRESS REPORT. </li><li>Try to connect with ejabberd, with a simple telnet:<br /> <pre>$ telnet localhost 5222 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. aaaa &lt;?xml version='1.0'?&gt; &lt;stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='none' from='localhost' version='1.0'&gt; &lt;stream:error&gt; &lt;xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/&gt; &lt;/stream:error&gt; &lt;/stream:stream&gt;Connection closed by foreign host. $</pre></li><li>If that worked, now try to connect with a Jabber client, and create an account. Your server is still 'localhost', and you can only use plaintext connection, because you are still using the default ejabberd.cfg. </li><li>If you reached to this step, then you are a lot better than you were with the previous ejabberd installation, right? Because now you can connect to port 5222. </li><li>Now you can make small changes in ejabberd.cfg, restart ejabberd each time you make a change and ensure with a Jabber client that all continues working correctly. Change your server name, enable TLS, database storage, etc. Remember to make only a change at a time, and check that ejabberd starts correctly.<br /> </li></ol> Tue, 26 Feb 2008 20:05:08 +0000 mfoss comment 51890 at https://www.ejabberd.im Sorry about waiting so long. https://www.ejabberd.im/node/2804#comment-51858 <p>Sorry about waiting so long. I get a "connection refused" in Pidgin when trying to do anything (account creation included) involving Jabber towards my server, and with ejabberd (beam.smp) running, either with or without SSL/TLS on the appropriate ports.</p> <p>As far as I can tell, there are no errors, especially since none of the lines since my last try at getting this working contain any:<br /> <div class="codeblock"><code>==&gt; ejabberd.log &lt;==<br />=INFO REPORT==== 2008-02-21 16:50:54 ===<br />I(&lt;0.9458.1&gt;:ejabberd_s2s_in:341): VERIFY KEY: {&quot;kenji-m.zapto.org&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;gmail.com&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;EE82E356F1EE2C1A&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;1622069622&quot;}</code></div></p> <p>=INFO REPORT==== 2008-02-21 16:50:54 ===<br />I(&lt;0.9460.1&gt;:ejabberd_s2s_out:249): recv result: {&quot;gmail.com&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;kenji-m.zapto.org&quot;,[],<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;valid&quot;}</p> <p>==&gt; sasl.log &lt;==<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mod_pubsub,start_link,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&quot;kenji-m.zapto.org&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{access_createnode,pubsub_createnode}]]}},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,temporary},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,1000},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,worker}]</p> <p>=PROGRESS REPORT==== 23-Feb-2008::00:56:14 ===<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; application: ejabberd<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started_at: ejabberd@superbob </p><p>I've checked my Netfilter logs, and there are no dropped packets involved. Why would the connection be refused on every try?</p> Sat, 23 Feb 2008 09:13:06 +0000 takeshita_kenji comment 51858 at https://www.ejabberd.im Test for auth and connection https://www.ejabberd.im/node/2804#comment-51725 <div class="quote-msg"> <div class="quote-author"><em>takeshita_kenji</em> wrote:</div> <p>There aren't any errors at the moment, but it looks like SSL isn't working, nor are TLS or even plaintext. I'm shooting for port 5223 SSL like I had with Jabberd2</p></div> <p>I plan to write a guide 'Best practices to explain a problem'. I'll probably use most of the text here. So, some of my response is not explicitely for you.</p> <p>The purpose of this test is to check which type of client connections work correctly in your Jabber server.</p> <ol> <li>Stop ejabberd. Make sure it is stopped.</li> <li>Start ejabberd.</li> <li>Check the log files (ejabberd.log and sasl.log), is there any error message? <ul> <li>If there are errors, show here in a comment.</li> <li>If no errors, then continue: <ol> <li>Try to create an account using a Jabber client, port 5222, without encryption. Does it succeed? <ul> <li>If creation does not succeed, then check if there is any error message in the log files: <ul> <li>If there are errors, show here in a comment. </li> <li>If there aren't error messages, abort this test. </li> </ul> </li> <li>If creation succeeds, now try to login, using 5222 without encryption as before. Can you login? <ul> <li>If you can't login, check the log files, is there any error message? <ul> <li>If there are errors, show here in a comment. </li> <li>If there aren't error messages, abort this test. </li> </ul> </li> <li>If you can login, continue. </li> </ul> </li> </ul> </li> <li>If you reached this step, it means you can create accounts and login to them using the port 5222 without encryption. Now you must check if you can use encrypted connections (STARTTLS in port 5222 and old SSL in port 5223). Configure a Jabber client to connect to port 5222 using encryption (it may be called STARTTLS or simply TLS in the Jabber client). Can you login? <ul> <li>If you can't login, check the log files, is there any error message? <ul> <li>If there are errors, show here in a comment. </li> <li>If there aren't error messages, abort this test. </li> </ul> </li> <li>If you can login, continue. </li> </ul> </li> <li>If you reached this step, it means you can create accounts and login to them using the port 5222 without encryption. You can also login using STARTTLS encryption in port 5222. Now you must check if you can login using SSL encryption in port 5223. Configure a Jabber client to connect to port 5223 using encryption (it may be called SSL in the Jabber client). Can you login? <ul> <li>If you can't login, check the log files, is there any error message? <ul> <li>If there are errors, show here in a comment. </li> <li>If there aren't error messages, abort this test. </li> </ul> </li> <li>If you can login, then your server works correctly!!! </li> </ul> </li> </ol> </li> </ul> </li> </ol> <p>If you find an error message in the log files, show it here, and also search in this site and in Internet. Quite probably other people saw the same error message and explained a solution. When you find one or several error messages in ejabberd log files, show all of them (unless they repeat constantly).</p> <p>If you suspect the problem is a syntax mistake in your ejabberd.cfg file, then show all your file (you can replace the private data with **** if you want). If you only modified a few lines in {listen, or in {modules, or similar; then you don't need to show all your configuration file: you can simply show the whole sections that got affected (the {listen ... } section, etc).</p> <p>If you aborted the test without success, it means you reached a pretty bad situation: something abnormal happens in your server but there isn't an error report or a crash file to investigate the problem. In that case:</p> <ol> <li>Try to uninstall ejabberd completely, install again and proceed with the test before doing any change in the ejabberd configuration. </li><li>If that also fails, try the same installation method in a different machine. </li><li>Or try to install ejabberd in your machine, with a different method (binary installer, operating system package, source code compilation, ...) </li></ol> <p>If you are lost, you can start a thread explaining your problem. In such case, provide meaningful and summarized information of your setup. Some of the information that you can provide:</p> <ul> <li>What abnormal behaviour do you see in ejabberd </li><li>How did you install ejabberd </li><li>What version of ejabberd. </li><li>If you installed Erlang, mysql, pgsql, additional librearies because they were needed, please detail how did you install them, and which version. </li><li>If you made changes in ejabberd.cfg, or the ejabberd start script. </li><li>What Jabber clients did you try. </li><li>Your operating system, version, CPU architecture, kernel version and kernel architecture. </li><li>If you made additional tests in other machines, or with other versions of ejabberd, etc: please also mention that information. </li><li>Can you reproduce the problem in your machine, or in several of your machines? </li><li>Can your problem be reproduced in other machines? That means: do you know how I can reproduce the same problem in my machine? This is important when the problem is a bug in ejabberd. </li></ul> <p>If you don't know some of this data, or you consider it isn't important, don't worry. If later it seems important, it will be requested and you can provide in another comment.</p> <p>Note that the people that try to help in the forums and mailing lists spends time for free. This means that they only invest a part of their spare time. So, sometimes you get a response in 5 hours, and sometimes you get a response in 5 days. Some problems are easier to answer than others, and not all the people know the answer to all problems. Maybe some questions get a lot of responses fast, and other questions only get a response after several days. If your question did not receive any response after a full week, quite probably the people that read the forum doesn't know the answer and can't help.</p> Sat, 02 Feb 2008 11:59:31 +0000 mfoss comment 51725 at https://www.ejabberd.im It looks like the init https://www.ejabberd.im/node/2804#comment-51723 <p>It looks like the init system was starting up ejabberd, which I stopped. There aren't any errors at the moment, but it looks like SSL isn't working, nor are TLS or even plaintext. I'm shooting for port 5223 SSL like I had with Jabberd2 until it started getting segfaults whenever I ran it. This is just to register a user, too:<br /> <div class="codeblock"><code># grep -E &#039;(ssl|tls)&#039; -A2 -B2 /etc/jabber/ejabberd.cfg <br /> [{5222, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s}, {shaper, c2s_shaper},<br /> &nbsp;&nbsp;&nbsp; {max_stanza_size, 65536},<br /> &nbsp;&nbsp;&nbsp; starttls, {certfile, &quot;/etc/jabber/kenji-m.zapto.org.pem&quot;}]},<br />&nbsp; {5223, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s},<br /> &nbsp;&nbsp;&nbsp; {max_stanza_size, 65536},<br /> &nbsp;&nbsp;&nbsp; tls, {certfile, &quot;/etc/jabber/kenji-m.zapto.org&quot;}]},<br />&nbsp; % Use these two lines instead if TLS support is not compiled<br />&nbsp; %{5222, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s}, {shaper, c2s_shaper}]},<br />&nbsp; %{5223, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s}, ssl, {certfile, &quot;/etc/jabber/kenji-m.zapto.org.pem&quot;}]},<br />&nbsp; {5269, ejabberd_s2s_in,&nbsp; [{shaper, s2s_shaper},<br /> &nbsp;&nbsp;&nbsp; {max_stanza_size, 131072}<br />--</code></div></p> <p>% Use STARTTLS+Dialback for S2S connections<br />{s2s_use_starttls, false}.<br />%{s2s_use_starttls, true}.<br />%{s2s_certfile, &quot;./ssl.pem&quot;}.<br />%{domain_certfile, &quot;example.org&quot;, &quot;./example_org.pem&quot;}.<br />%{domain_certfile, &quot;example.com&quot;, &quot;./example_com.pem&quot;}. </p> Fri, 01 Feb 2008 18:19:32 +0000 takeshita_kenji comment 51723 at https://www.ejabberd.im ejabberd already running? https://www.ejabberd.im/node/2804#comment-51689 <div class="quote-msg"> <div class="quote-author"><em>takeshita_kenji</em> wrote:</div> <p>which ejabberd gets whenever I run it: </p> <div class="codeblock"><code>{error_logger,{{2008,1,22},{16,3,39}},&quot;Protocol: ~p: register error: ~p~n&quot;,<br />[&quot;inet_tcp&quot;,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},<br />...</code></div> <p>What does this error message mean? What can I do to fix it?</p></div> <p>Take a look at this page: <noindex><a href="/error/duplicate_name" rel="nofollow" >error, duplicate_name</a></noindex>, and let's hope it solves your problem.</p> <div class="quote-msg"> <div class="quote-author"><em>takeshita_kenji</em> wrote:</div> <p>I'm trying to use PostgreSQL as my database backend, using ODBC (which is compiled into both ejabberd and Erlang).<br /> I've also bzcat'd the ejabberd schema into Postgres.</p></div> <p>I think this is not related.</p> <p>Offtopic: if you use pgsql also for authentication, once you get ejabberd running maybe you find another problem: accounts are created in the Pgsql DB, but you are not allowed to login.<br /> This bug is present in the pgsql Erlang driver from ejabberd-modules SVN, and also in the ejabberd-2.0.0-beta and -rc1 binary installers.</p> <p>Tracked here: <noindex><a href="https://support.process-one.net/browse/EJAB-511" rel="nofollow" >Authentication with pgsql driver is broken</a></noindex></p> <p>A fixed version: <noindex><a href="http://tkabber.jabber.ru/files/badlop/pgsql_util.beam" title="http://tkabber.jabber.ru/files/badlop/pgsql_util.beam" rel="nofollow" >http://tkabber.jabber.ru/files/badlop/pgsql_util.beam</a></noindex></p> Sat, 26 Jan 2008 19:39:37 +0000 mfoss comment 51689 at https://www.ejabberd.im