通过 AWS ELB 进行 MongooseIM SSL 连接

通过 AWS ELB 进行 MongooseIM SSL 连接

我在 AWS 中的 EC2 实例中使用 docker-compose 配置了 MongooseIM 服务器。

我打算通过端口 5222(mongooseim 的 ejabberd_c2s 模块)上的 ELB(AWS)以以下方式向某些移动客户端提供 SSL 访问权限:

(忽略 5285 SSL 配置,它适用于 BOSH 模块并且运行良好)

弹性负载均衡器 (ELB)

在 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 文档没有提供任何解决方案,而且我也没有看到任何人遇到此错误。

有任何帮助或线索吗?

相关内容