ejabberd - Comments for "TSL Connect Failure" https://www.ejabberd.im/node/2692 en Noust 64 bit https://www.ejabberd.im/node/2692#comment-52221 <p>I'm seeing the problem with 32 bit as well. Erlang 12b2.</p> Mon, 21 Apr 2008 14:39:36 +0000 Mahlon E. Smith comment 52221 at https://www.ejabberd.im Erlang issue? https://www.ejabberd.im/node/2692#comment-51892 <p>I think i might have isolated the issue.<br /> Those that didn't work are on Erlang 12, the one that worked in on Erlang 11</p> <p>Have not managed to verify for sure.</p> Wed, 27 Feb 2008 03:58:56 +0000 mikechoo comment 51892 at https://www.ejabberd.im same problem on FreeBSD https://www.ejabberd.im/node/2692#comment-51569 <p>I use FreeBSD 6.2 AMD64 (64 bit version) and I have the same issues.<br /> I cannot use TLS or STARTTL, same issue as discussed here. When using STARTTLS, I can connect once, and after the client disconnects, I cannot connect again without restarting ejabberd.</p> <p>The same config worked fine on FreeBSD 6.2 I386 (32 bit version).<br /> In fact I migrated my working ejabberd configuration files from the 32bit version over the 64bit version.</p> <p>So it's not a config file issue, something is broken with SSL on 64bit platforms.</p> Fri, 04 Jan 2008 16:47:26 +0000 mikechoo comment 51569 at https://www.ejabberd.im Problem reading tls_drv.so https://www.ejabberd.im/node/2692#comment-51278 <div class="quote-msg"> <div class="quote-author"><em>dirkniblick</em> wrote:</div> <p>The ejabberd.cfg is as follows:</p> <p>Am I doing something wrong here?</p></div> <p>The syntax of your config file seems correct. For that reason ejabberd can start correctly.</p> <p>I installed ejabberd svn, created a certificate and everything worked fine. Then, I started to delete files, change permissions, and I annotated the error messages reported by ejabberd. Here they are:</p> <ul> <li>If the pem file does not exist:<br /> <pre>** Reason for termination = ** {{badmatch,{error,"SSL_CTX_use_certificate_file failed: error:02001002:system library:fopen:No such file or directory"}}, [{ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre></li> <li>If the permissions to read the pem file are insufficient:<br /> <pre>** Reason for termination = ** {{badmatch,{error,"SSL_CTX_use_certificate_file failed: error:0200100D:system library:fopen:Permission denied"}}, [{ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre></li> <li>If the pem file doesn't have the correct format:<br /> <pre>** Reason for termination = ** {{badmatch,{error,"SSL_CTX_use_certificate_file failed: error:0906D06C:PEM routines:PEM_read_bio:no start line"}}, [{ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre><pre>** Reason for termination = ** {{badmatch,{error,"SSL_CTX_use_certificate_file failed: error:0906D066:PEM routines:PEM_read_bio:bad end line"}}, [{ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre><pre>** Reason for termination = ** {{badmatch,{error,"SSL_CTX_use_PrivateKey_file failed: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag"}}, [{ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre></li> <li>If the tls_drv.so is not readable (doesn't exist, or has wrong file read permission):<br /> <pre>** Reason for termination = ** {{case_clause,{error,{open_error,-10}}}, [{tls,tcp_to_tls,2}, {ejabberd_socket,starttls,3}, {ejabberd_c2s,wait_for_feature_request,2}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}</pre></li> </ul> <div class="quote-msg"> <div class="quote-author"><em>dirkniblick</em> wrote:</div> <p>I have created a new cert (newserver.pem) and migrated my data to a MySQL database. The server starts up just fine but I am getting a different error when clients try to connect:</p> <div class="codeblock"><code>=CRASH REPORT==== 15-Nov-2007::14:59:55 ===<br />&nbsp; crasher:<br />&nbsp;&nbsp;&nbsp; pid: &lt;0.312.0&gt;<br />&nbsp;&nbsp;&nbsp; registered_name: []<br />&nbsp;&nbsp;&nbsp; error_info: {{case_clause,{error,{open_error,-10}}},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{tls,tcp_to_tls,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ejabberd_c2s,wait_for_feature_request,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {gen_fsm,handle_msg,7},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {proc_lib,init_p,5}]}</code></div> </div> <p>As you can see, the problem is probably that tls_drv.so is not readable. </p> <p>I think we already tried all the possibilities, and that you are doing the things correctly. So the problem may be a bug in the installer, or an incompatibility with your operating system or system libraries. </p> <p>I've reported this issue in the bug tracher: <noindex><a href="https://support.process-one.net/browse/EJAB-431" rel="nofollow" >open_error in 64bit installer when client logs using starttls</a></noindex>. Once the problem is inspected, maybe there is a new solution that you should try to verify if it solves the problem.</p> Wed, 21 Nov 2007 17:41:18 +0000 mfoss comment 51278 at https://www.ejabberd.im Above??? https://www.ejabberd.im/node/2692#comment-51241 <p>Check out my reply that's probably up above titled "More Help?". I've pasted my entire config and a different error.</p> Fri, 16 Nov 2007 14:34:13 +0000 dirkniblick comment 51241 at https://www.ejabberd.im Syntax error in ejabberd.cfg https://www.ejabberd.im/node/2692#comment-51240 <div class="quote-msg"> <div class="quote-author"><em>dirkniblick</em> wrote:</div> <p>This is the error that appears in logs/sasl.log:</p> <pre> =CRASH REPORT==== 13-Nov-2007::10:30:30 === crasher: pid: &lt;0.36.0&gt; registered_name: [] error_info: {bad_return,{{ejabberd_app,start,[normal,[]]}, {'EXIT',["118", 58, 32, ["syntax error before: ",["'{'"]]]}}} initial_call: {application_master, init, [&lt;0.5.0&gt;, &lt;0.35.0&gt;, </pre><p> Does the "syntax error" refer to the config file? ...or somewhere else?</p></div> <p>Yes, the error message is probably related to a syntax error in ejabberd.cfg. I see a similar message if I put:</p> <pre> {5223, ejabberd_c2s, [{access, c2s} {max_stanza_size, 65536}]},</pre><p>Note that in this example, I removed a comma after 'c2s}'. The small pieces of config you pasted here are correct. The syntax error may be were you put those lines.</p> Fri, 16 Nov 2007 10:42:57 +0000 mfoss comment 51240 at https://www.ejabberd.im More help? https://www.ejabberd.im/node/2692#comment-51238 <p>I have created a new cert (newserver.pem) and migrated my data to a MySQL database. The server starts up just fine but I am getting a different error when clients try to connect:</p> <div class="codeblock"><code>=CRASH REPORT==== 15-Nov-2007::14:59:55 ===<br />&nbsp; crasher:<br />&nbsp;&nbsp;&nbsp; pid: &lt;0.312.0&gt;<br />&nbsp;&nbsp;&nbsp; registered_name: []<br />&nbsp;&nbsp;&nbsp; error_info: {{case_clause,{error,{open_error,-10}}},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{tls,tcp_to_tls,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ejabberd_c2s,wait_for_feature_request,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {gen_fsm,handle_msg,7},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {proc_lib,init_p,5}]}<br />&nbsp;&nbsp;&nbsp; initial_call: {gen,init_it,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [gen_fsm,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;0.235.0&gt;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ejabberd_c2s,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{gen_tcp,#Port&lt;0.321&gt;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{access,c2s},<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; {max_stanza_size,65536},<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; {shaper,c2s_shaper},<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; starttls,<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; {certfile,&quot;/opt/ejabberd-1.1.4/conf/newserver.pem&quot;}]],<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []]}<br />&nbsp;&nbsp;&nbsp; ancestors: [&lt;0.235.0&gt;,ejabberd_listeners,ejabberd_sup,&lt;0.37.0&gt;]<br />&nbsp;&nbsp;&nbsp; messages: []<br />&nbsp;&nbsp;&nbsp; links: []<br />&nbsp;&nbsp;&nbsp; dictionary: []<br />&nbsp;&nbsp;&nbsp; trap_exit: false<br />&nbsp;&nbsp;&nbsp; status: running<br />&nbsp;&nbsp;&nbsp; heap_size: 987<br />&nbsp;&nbsp;&nbsp; stack_size: 21<br />&nbsp;&nbsp;&nbsp; reductions: 1295<br />&nbsp; neighbours:</code></div> <p>The ejabberd.cfg is as follows:</p> <div class="codeblock"><code>{acl, admin, {user, &quot;admin&quot;}}.<br />{acl, local, {user_regexp, &quot;&quot;}}.<br />{access, pubsub_createnode, [{allow, all}]}.<br />{access, configure, [{allow, admin}]}.<br />{access, register, [{allow, all}]}.<br />{welcome_message, none}.<br />{access, announce, [{allow, admin}]}.<br />{access, c2s, [{deny, blocked},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {allow, all}]}.<br />{shaper, normal, {maxrate, 1000}}.<br />{shaper, fast, {maxrate, 50000}}.<br />{access, c2s_shaper, [{none, admin},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {normal, all}]}.<br />{access, s2s_shaper, [{fast, all}]}.<br />{access, muc_admin, [{allow, admin}]}.<br />{access, muc, [{allow, all}]}.<br />{access, local, [{allow, local}]}.<br />{hosts, [&quot;j2.alegent.org&quot;]}.<br />{max_user_sessions, 10}.<br />{auth_method, odbc}.<br />{odbc_server, {mysql, &quot;localhost&quot;, &quot;ejabberd&quot;, &quot;ejabberd&quot;, &quot;XMPP&quot;}}.<br />{language, &quot;en&quot;}.<br />{listen, [<br />{5222, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}, starttls, {certfile, &quot;/opt/ejabberd-1.1.4/conf/newserver.pem&quot;}]},<br />{5223, ejabberd_c2s,&nbsp;&nbsp;&nbsp;&nbsp; [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}, tls, {certfile, &quot;/opt/ejabberd-1.1.4/conf/newserver.pem&quot;}]},<br />{5280, ejabberd_http,&nbsp;&nbsp;&nbsp; [http_poll, web_admin, tls, {certfile, &quot;/opt/ejabberd-1.1.4/conf/newserver.pem&quot;}]}<br />&nbsp; ]}.<br />{outgoing_s2s_port, 5269}.<br />{modules,<br /> [<br />&nbsp; {mod_register,&nbsp;&nbsp; [{access, register}]},<br />&nbsp; {mod_roster_odbc,&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_privacy,&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_adhoc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_configure,&nbsp; []}, % Depends on mod_adhoc<br />&nbsp; {mod_configure2, []},<br />&nbsp; {mod_disco,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_stats,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_vcard_odbc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{search, true}, {matches, infinity}, {allow_return_all, true}]},<br />&nbsp; {mod_offline_odbc,&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_announce,&nbsp;&nbsp; [{access, announce}]}, % Depends on mod_adhoc<br />&nbsp; {mod_echo,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{host, &quot;echo.j2.alegent.org&quot;}]},<br />&nbsp; {mod_private,&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_muc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{access, muc}, {access_create, muc}, {access_admin, muc_admin}, {history_size, 10}]},<br />&nbsp; {mod_shared_roster, []},<br />&nbsp; {mod_pubsub,&nbsp;&nbsp;&nbsp;&nbsp; [{access_createnode, pubsub_createnode}]},<br />&nbsp; {mod_time,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_last_odbc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []},<br />&nbsp; {mod_version,&nbsp;&nbsp;&nbsp; []}<br /> ]}.</code></div> <p>Am I doing something wrong here?</p> Thu, 15 Nov 2007 21:07:33 +0000 dirkniblick comment 51238 at https://www.ejabberd.im This is the error that https://www.ejabberd.im/node/2692#comment-51224 <p>This is the error that appears in logs/sasl.log:</p> <pre> =CRASH REPORT==== 13-Nov-2007::10:30:30 === crasher: pid: &lt;0.36.0&gt; registered_name: [] error_info: {bad_return,{{ejabberd_app,start,[normal,[]]}, {'EXIT',["118", 58, 32, ["syntax error before: ",["'{'"]]]}}} initial_call: {application_master, init, [&lt;0.5.0&gt;, &lt;0.35.0&gt;, {appl_data, ejabberd, [ejabberd, ejabberd_sup, ejabberd_auth, ejabberd_router, ejabberd_sm, ejabberd_s2s, ejabberd_local, ejabberd_listeners, ejabberd_iq_sup, ejabberd_service_sup, ejabberd_s2s_out_sup, ejabberd_s2s_in_sup, ejabberd_c2s_sup, ejabberd_mod_roster, ejabberd_mod_echo, ejabberd_mod_pubsub, ejabberd_mod_irc, ejabberd_mod_muc, ejabberd_offline, random_generator], undefined, {ejabberd_app,[]}, [acl, configure, cyrsasl, cyrsasl_digest, cyrsasl_plain, ejabberd, ejabberd_app, ejabberd_auth, ejabberd_c2s, ejabberd_config, ejabberd_listener, ejabberd_logger_h, ejabberd_local, ejabberd_router, ejabberd_s2s, ejabberd_s2s_in, ejabberd_s2s_out, ejabberd_service, ejabberd_sm, ejabberd_sup, ejabberd_tmp_sup, gen_iq_handler, gen_mod, jd2ejd, jlib, mod_configure, mod_disco, mod_echo, mod_last, mod_offline, mod_private, mod_register, mod_roster, mod_stats, mod_time, mod_vcard, mod_version, randoms, sha, shaper, translate, xml, xml_stream], [], infinity, infinity}, normal]} ancestors: [&lt;0.35.0&gt;] messages: [] links: [&lt;0.35.0&gt;,&lt;0.37.0&gt;,&lt;0.5.0&gt;] dictionary: [] trap_exit: true status: running heap_size: 610 stack_size: 21 reductions: 99 neighbours: </pre><p> Does the "syntax error" refer to the config file? ...or somewhere else? As far as the installer goes, I used the one here...<br /> <noindex><a href="http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4_2-linux-x86_64-installer.bin" title="http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4_2-linux-x86_64-installer.bin" rel="nofollow" >http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4_2-lin...</a></noindex><br /> ...which I would assume is for a 64-bit server. Here is the ls you asked for showing the tls_drv.so:</p> <pre> [root@tardis ejabberd-1.1.4]# ls /opt/ejabberd-1.1.4/lib/ejabberd-1.1.4/priv/linux-amd64/lib/ ejabberd_zlib_drv.so expat_erl.so iconv_erl.so stringprep_drv.so tls_drv.so </pre><p> As far as the cert goes, it works okay with SSL so I would think it would work for TLS. Maybe not so I'll try to create a new one but maybe the error above can shed some light on my problem who's more familiar with the working of ejabberd. Thanks for your help.</p> Tue, 13 Nov 2007 16:39:04 +0000 dirkniblick comment 51224 at https://www.ejabberd.im Three possible errors https://www.ejabberd.im/node/2692#comment-51222 <div class="quote-msg"> <div class="quote-author"><em>dirkniblick</em> wrote:</div> <p>If I configure the port like you said...</p> <pre> {5222, ejabberd_c2s, [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}, starttls, {certfile, "/opt/ejabberd-1.1.4/conf/server.pem"}]}, </pre><p>...and my clients get "Read Error" when they try to connect.</p> <p>My question is: How do I find out what is wrong with the "starttls" potion of ejabberd and what I can I do to fix it?</p></div> <p>You didn't mention what error messages report ejabberd when you set 'starttls'.</p> <p>With the information you provided, I consider several possibilities to explain the error:</p> <ul> <li>You mention 'Red Hat Enterprise Linux 5 x64', and you installed 'the Linux .bin file'. Since ejabberd includes some binary drivers, they must be compiled to your CPU architecture. Did you use the correct installer? If you have a i386 or a x64 Linux, use the correct installer. </li><li>There could be a bug in the installer, and the file tls_drv.so is not installed in the correct path, or is not installed at all. Can you check if it is in the directory, with the other drivers?<br /> <pre>$ ls /opt/ejabberd-1.1.4/lib/ejabberd-1.1.4/priv/linux-x86/lib ejabberd_zlib_drv.so expat_erl.so iconv_erl.so stringprep_drv.so tls_drv.so</pre></li><li>Maybe the cert file is not readable: a wrong path is specified in the config, or the file permissions are not apropiate. Since it was generated by the installer, this would be a bug in it. </li></ul> Tue, 13 Nov 2007 08:24:26 +0000 mfoss comment 51222 at https://www.ejabberd.im Problem persists https://www.ejabberd.im/node/2692#comment-51219 <p>I wasn't trying to make weird experiments but was only trying anything I could think of to get the server to work. Here's what I see happening. If I configure the port like this (unmodified from the sample config)...</p> <pre> {5222, ejabberd_c2s, [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}]}, </pre><p> ...my clients can connect. If I configure the port like you said...</p> <pre> {5222, ejabberd_c2s, [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}, starttls, {certfile, "/opt/ejabberd-1.1.4/conf/server.pem"}]}, </pre><p> ...and my clients get "Read Error" when they try to connect. If I change it slightly to...</p> <pre> {5222, ejabberd_c2s, [{access, c2s}, {max_stanza_size, 65536}, {shaper, c2s_shaper}, ssl, {certfile, "/opt/ejabberd-1.1.4/conf/server.pem"}]}, </pre><p> ...and change my clients to use SSL, they connect just fine. My question is: How do I find out what is wrong with the "starttls" potion of ejabberd and what I can I do to fix it?</p> Mon, 12 Nov 2007 20:02:43 +0000 dirkniblick comment 51219 at https://www.ejabberd.im Summary of STARTTLS, TLS and SSL options. https://www.ejabberd.im/node/2692#comment-51214 <div class="quote-msg"> <div class="quote-author"><em>dirkniblick</em> wrote:</div> <p>I have been successful in configuring ejabberd in every way except using the TSL connection at all. I have been able to connect via SSL on port 5222 and 5223 with Linux and Windows versions of Pidgin. If I configure port 5222 (or any other port for that matter) like so...</p></div> <p>Jabber/XMPP propose three encryption methods:</p> <ul> <li>plain </li><li>SSL: old, defined in Jabber several years ago </li><li>STARTTLS, also called TLS: a reworked method, similar to the old SSL, but better. </li></ul> <p>As defined in ejabberd Guide, ejabberd allows those options when defining a listening socket:</p> <ul> <li>nothing </li><li>starttls: This option specifies that STARTTLS encryption is available on connections to the port. </li><li>starttls_required: This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. </li><li>ssl: This option specifies that traffic on the port will be encrypted using SSL. </li><li>tls: This option specifies that traffic on the port will be encrypted using SSL immediately after connecting. </li></ul> <p>As you can see, the option 'tls' in ejabberd is used to set a SSL connection, not STARTTLS. This obviously leads to confusion. However, ejabberd.cfg.example is quite clear to this respect:</p> <pre>{listen, [{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}, {max_stanza_size, 65536}, starttls, {certfile, "./ssl.pem"}]}, {5223, ejabberd_c2s, [{access, c2s}, {max_stanza_size, 65536}, tls, {certfile, "./ssl.pem"}]}, % Use these two lines instead if TLS support is not compiled %{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]}, %{5223, ejabberd_c2s, [{access, c2s}, ssl, {certfile, "./ssl.pem"}]},</pre><p> Please follow this example and don't make weird experiments like putting 'tls' in the port 5222. Probably that will solve your problem.</p> Mon, 12 Nov 2007 11:05:57 +0000 mfoss comment 51214 at https://www.ejabberd.im