BOSH over HTTPS in Ubuntu

I am having difficulty making a connection to the BOSH URL over HTTPS in Ubuntu. I have not seen the problem in CentOS. I am using ejabberd 2.1.10, the binary installer available from www.ejabberd.im.

Here is the listener section of my ejabberd.cfg file:

%%% ===============
%%% LISTENING PORTS

%%
%% listen: Which ports will ejabberd listen, which service handles it
%% and what options to start it with.
%%
{listen,
[

{5222, ejabberd_c2s, [
{certfile, "/opt/ejabberd-2.1.10/conf/server.pem"}, starttls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},

%%
%% To enable the old SSL connection method in port 5223:
%%
%%{5223, ejabberd_c2s, [
%% {certfile, "/opt/ejabberd-2.1.10/conf/server.pem"}, tls,
%% {access, c2s},
%% {shaper, c2s_shaper},
%% {max_stanza_size, 65536}
%% ]},

{5269, ejabberd_s2s_in, [
{shaper, s2s_shaper},
{max_stanza_size, 131072}
]},

%%
%% ejabberd_service: Interact with external components (transports...)
%%
%%{8888, ejabberd_service, [
%% {access, all},
%% {shaper_rule, fast},
%% {ip, {127, 0, 0, 1}},
%% {hosts, ["icq.example.org", "sms.example.org"],
%% [{password, "secret"}]
%% }
%% ]},

{5280, ejabberd_http, [
%%{request_handlers, [
%% {["web"], mod_http_fileserver}
%%]},
captcha,
http_poll,
web_admin
]},

{80, ejabberd_http, [
http_bind
]},

{443, ejabberd_http, [
http_bind,
tls, {certfile, "/opt/ejabberd-2.1.10/conf/server.pem"}
]}

]}.

Here are the erlang.log file errors that are reported when trying to connect on port 443 in any browser:

=CRASH REPORT==== 13-Mar-2012::13:59:40 ===
crasher:
pid: <0.881.0>
registered_name: []
exception error: no case clause matching {error,{open_error,-10}}
in function tls:tcp_to_tls/2
in call from ejabberd_http:init/2
initial call: ejabberd_http:init({gen_tcp,#Port<0.503>},
[inet,http_bind,tls,
{certfile,
"/opt/ejabberd-2.1.10/conf/server.pem"},
{ip,{0,0,0,0}}])
ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
messages: []
links: [<0.250.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 23
reductions: 145
neighbours:

=SUPERVISOR REPORT==== 13-Mar-2012::13:59:40 ===
Supervisor: {local,ejabberd_http_sup}
Context: child_terminated
Reason: {case_clause,{error,{open_error,-10}}}
Offender: [{pid,<0.881.0>},
{name,undefined},
{mfa,
{ejabberd_http,start_link,
[{gen_tcp,#Port<0.503>},
[inet,http_bind,tls,
{certfile,"/opt/ejabberd-2.1.10/conf/server.pem"},
{ip,{0,0,0,0}}]]}},
{restart_type,temporary},
{shutdown,brutal_kill},
{child_type,worker}]

=CRASH REPORT==== 13-Mar-2012::13:59:40 ===
crasher:
pid: <0.882.0>
registered_name: []
exception error: no case clause matching {error,{open_error,-10}}
in function tls:tcp_to_tls/2
in call from ejabberd_http:init/2
initial call: ejabberd_http:init({gen_tcp,#Port<0.504>},
[inet,http_bind,tls,
{certfile,
"/opt/ejabberd-2.1.10/conf/server.pem"},
{ip,{0,0,0,0}}])
ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
messages: []
links: [<0.250.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 23
reductions: 145
neighbours:

=SUPERVISOR REPORT==== 13-Mar-2012::13:59:40 ===
Supervisor: {local,ejabberd_http_sup}
Context: child_terminated
Reason: {case_clause,{error,{open_error,-10}}}
Offender: [{pid,<0.882.0>},
{name,undefined},
{mfa,
{ejabberd_http,start_link,
[{gen_tcp,#Port<0.504>},
[inet,http_bind,tls,
{certfile,"/opt/ejabberd-2.1.10/conf/server.pem"},
{ip,{0,0,0,0}}]]}},
{restart_type,temporary},
{shutdown,brutal_kill},
{child_type,worker}]

Connecting to BOSH over ordinary HTTP works absolutely fine.

Could somebody point out how I might find why these errors are happening and perhaps how to debug?

Thanks in anticipation.

Syndicate content