我在 AWS 的 EC2 实例中使用 docker-compose 配置了 MongooseIM 服务器。
我打算通过以下方式通过端口 5222(mongooseim 的模块 ejabberd_c2s)上的 ELB(AWS)使用 SSL 访问一些移动客户端:
SSL (Secure TCP) -> 5222 -> TCP -> 5222 (EC2 Instance Port)
在 ejabberd_c2s 模块配置中,我有以下内容:
{ 5222, ejabberd_c2s, [
%%
%% If TLS is compiled in and you installed a SSL
%% certificate, specify the full path to the
%% file and uncomment this line:
%%
{certfile, "priv/ssl/fake_server.pem"}, starttls,
%%{zlib, 10000},
%% https://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
%% {ciphers, "DEFAULT:!EXPORT:!LOW:!SSLv2"},
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536},
{protocol_options, ["no_sslv3"]}
]},
但是客户无法连接,我在服务器上得到的唯一消息是:
mongooseim_server_dev | 10:58:25.885 [info] (#Port<0.27608>) Accepted connection {{10,0,17,246},42571} -> {{172,18,0,2},5222}
mongooseim_server_dev | 10:58:25.885 [debug] Received XML on stream = "���yw�\��.ndEt�;�����fn�A>� n:�=5��</A
"ngooseim_server_dev | ��kj98����g@32ED�(#
mongooseim_server_dev | 10:58:25.885 [debug] Send XML on stream = <<"<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2B421BCD2D077161' from='localhost' version='1.0'>">>
mongooseim_server_dev | 10:58:25.886 [debug] Send XML on stream = <<"<stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>">>
mongooseim_server_dev | 10:58:25.886 [debug] Send XML on stream = <<"</stream:stream>">>
Mongoose 文档没有为我提供任何解决方案,我没有看到任何人出现此错误。
任何帮助或线索?