eJabberD TLS 驱动程序错误

发布于 2024-10-09 14:13:55 字数 413 浏览 0 评论 0原文

我正在尝试让 ejabberd 服务器运行以用作 Android 应用程序中的实时聊天。

我已经使用 32 位二进制文​​件安装了服务器,并将其配置为可以使用 Web 界面登录。不过,我在与客户端连接时遇到问题。服务器返回的错误是 {open_error,-10},这应该是尝试读取 tls_drv.so 文件时发生的错误。

网上搜索了一下,有人和我有同样的问题,但我似乎找不到具体的解决方案。 这里的这个线程 http://www.ejabberd.im/node/4200 提到了完全相同的问题正如我所拥有的,OP似乎已经使用更新版本的驱动程序修复了它们。但我不知道如何或在哪里获得这些驱动程序。

这里有人可以帮我解决这个问题吗?谢谢。

I'm trying to get an ejabberd server running to use as a real time chat in an android application.

I have installed the server using a 32bit binary and configured it to a point that I can log in using the web interface. I have issues connecting to it with a client though. The error returned by the server is an {open_error,-10}, which is supposed to be an error when trying to read the tls_drv.so file.

Some searches on the web revealed that there are people with the same issue as me but I can't seem to find a concrete solution.
This thread here http://www.ejabberd.im/node/4200 mentions the exact same problems as I'm having and the OP seemed to have fixed them using a newer version of the drivers. I don't know how or where to get those drivers though.

Can anyone here please help me fix this? Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

颜漓半夏 2024-10-16 14:13:55

非常感谢 ldd 命令!它解决了我的问题:-D

事情是这样的:显然 tls_drv.so 正在寻找 libssl.so.0.9.8 和 libcrypto.so.0.9.8,而 ejabberd 包含 0.9.7。我碰巧安装了 libssl.so.0.9.8e 和 libcrypto.so.0.9.8e,tls_drv.so 找不到(因为“e”?)。

我所做的是创建一个指向 0.9.8e 的符号链接,命名为 0.9.8。瞧!成功了!

以下是更多信息:

  • Centos 5.5,32 位
  • ejabberd 2.1.8
  • 我直接从 www.process-one.net (www.ejabberd.im) 下载了二进制安装程序
  • ,除了主机名和管理员用户之外,我仍然保留默认配置,这是安装程序所需的。
  • 来自 jabber 客户端的连接似乎在没有 TLS 的情况下工作正常。当我将客户端配置为在可用时加密连接时,问题就出现了。

这是修复之前抱怨的 erlang 日志:

=CRASH REPORT==== 12-Sep-2011::22:48:56 ===
  crasher:
    pid: <0.372.0>
    registered_name: []
    exception exit: {{case_clause,{error,{open_error,-10}}},
                     [{tls,tcp_to_tls,2},
                      {ejabberd_socket,starttls,3},
                      {ejabberd_c2s,wait_for_feature_request,2},
                      {p1_fsm,handle_msg,10},
                      {proc_lib,init_p,5}]}
      in function  p1_fsm:terminate/7
    initial call: gen:init_it(p1_fsm,<0.258.0>,<0.258.0>,ejabberd_c2s,
                              [{ejabberd_socket,
                                   {socket_state,gen_tcp,#Port<0.406>,
                                       <0.371.0>}},
                               [inet,
                                {certfile,
                                    "/opt/ejabberd-2.1.8/conf/server.pem"},
                                starttls,
                                {access,c2s},
                                {shaper,c2s_shaper},
                                {max_stanza_size,65536},
                                {ip,{0,0,0,0}}]],
                              [])
    ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.36.0>]
    messages: []
    links: [<0.258.0>]
    dictionary: [{'$internal_queue_len',0}]
    trap_exit: false
    status: running
    heap_size: 987
    stack_size: 23
    reductions: 3258
  neighbours:

=SUPERVISOR REPORT==== 12-Sep-2011::22:48:56 ===
     Supervisor: {local,ejabberd_c2s_sup}
     Context:    child_terminated
     Reason:     {{case_clause,{error,{open_error,-10}}},
                  [{tls,tcp_to_tls,2},
                   {ejabberd_socket,starttls,3},
                   {ejabberd_c2s,wait_for_feature_request,2},
                   {p1_fsm,handle_msg,10},
                   {proc_lib,init_p,5}]}
     Offender:   [{pid,<0.372.0>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_c2s,start_link,
                          [{ejabberd_socket,
                               {socket_state,gen_tcp,#Port<0.406>,<0.371.0>}},
                           [inet,
                            {certfile,"/opt/ejabberd-2.1.8/conf/server.pem"},
                            starttls,
                            {access,c2s},
                            {shaper,c2s_shaper},
                            {max_stanza_size,65536},
                            {ip,{0,0,0,0}}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

这是修复它的过程:

root@mail [/opt/ejabberd-2.1.8]# find . -name tls_drv.so
./lib/ejabberd-2.1.8/priv/linux-x86/lib/tls_drv.so
root@mail [/opt/ejabberd-2.1.8]# cd lib/ejabberd-2.1.8/priv/linux-x86/lib/
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]# ldd tls_drv.so 
linux-gate.so.1 =>  (0x00f9c000)
libssl.so.0.9.8 => not found
libcrypto.so.0.9.8 => not found
libc.so.6 => /lib/libc.so.6 (0x00d9c000)
/lib/ld-linux.so.2 (0x00943000)
root@mail [/lib]# cd /lib
root@mail [/lib]# ll libcrypto.so.* libssl.so.*
-rwxr-xr-x 1 root root 1296964 Mar  6  2011 libcrypto.so.0.9.8e*
lrwxrwxrwx 1 root root      14 Nov 24  2009 libcrypto.so.4 -> libcrypto.so.6*
lrwxrwxrwx 1 root root      19 Apr 26 11:06 libcrypto.so.6 -> libcrypto.so.0.9.8e*
-rwxr-xr-x 1 root root  293044 Mar  6  2011 libssl.so.0.9.8e*
lrwxrwxrwx 1 root root      11 Nov 24  2009 libssl.so.4 -> libssl.so.6*
lrwxrwxrwx 1 root root      16 Apr 26 11:06 libssl.so.6 -> libssl.so.0.9.8e*
root@mail [/lib]# ln -s libcrypto.so.0.9.8e libcrypto.so.0.9.8
root@mail [/lib]# ln -s libssl.so.0.9.8e libssl.so.0.9.8
root@mail [/lib]# cd -
/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]# ldd tls_drv.so 
./tls_drv.so: /lib/libcrypto.so.0.9.8: no version information available (required by ./tls_drv.so)
./tls_drv.so: /lib/libssl.so.0.9.8: no version information available (required by ./tls_drv.so)
linux-gate.so.1 =>  (0x0088c000)
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00110000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00ebf000)
libc.so.6 => /lib/libc.so.6 (0x00252000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x008ef000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00ae0000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x0077c000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00527000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00158000)
libdl.so.2 => /lib/libdl.so.2 (0x0016c000)
libz.so.1 => /usr/lib/libz.so.1 (0x00a67000)
/lib/ld-linux.so.2 (0x00943000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00df3000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00e2a000)
libselinux.so.1 => /lib/libselinux.so.1 (0x008cc000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00171000)
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]#

我重新启动了 ejabberd,就是这样!

我真的希望它对其他人有帮助,因为谷歌搜索让我找到了很多有同样问题的人,但没有一个解决方案。

问候!

马加纳普

Thanks a lot for that ldd command! It solved my issue :-D

Here's the thing: apparently tls_drv.so is looking for libssl.so.0.9.8 and libcrypto.so.0.9.8, and ejabberd includes 0.9.7. I happened to have installed libssl.so.0.9.8e and libcrypto.so.0.9.8e, which tls_drv.so couldn't find (because of the 'e'?).

What I did was creating a symbolic link to 0.9.8e, named 0.9.8. And voilà! It worked!

Here's some more info:

  • Centos 5.5, 32 bit
  • ejabberd 2.1.8
  • I downloaded the binary installer directly from www.process-one.net (www.ejabberd.im)
  • I still have the default configuration, except for the hostname and the admin user, which are required by the installer.
  • The connection from a jabber client seems to work fine without TLS. The problem came when I configured my client to encrypt connection when available.

Here's the erlang log complaining before the fix:

=CRASH REPORT==== 12-Sep-2011::22:48:56 ===
  crasher:
    pid: <0.372.0>
    registered_name: []
    exception exit: {{case_clause,{error,{open_error,-10}}},
                     [{tls,tcp_to_tls,2},
                      {ejabberd_socket,starttls,3},
                      {ejabberd_c2s,wait_for_feature_request,2},
                      {p1_fsm,handle_msg,10},
                      {proc_lib,init_p,5}]}
      in function  p1_fsm:terminate/7
    initial call: gen:init_it(p1_fsm,<0.258.0>,<0.258.0>,ejabberd_c2s,
                              [{ejabberd_socket,
                                   {socket_state,gen_tcp,#Port<0.406>,
                                       <0.371.0>}},
                               [inet,
                                {certfile,
                                    "/opt/ejabberd-2.1.8/conf/server.pem"},
                                starttls,
                                {access,c2s},
                                {shaper,c2s_shaper},
                                {max_stanza_size,65536},
                                {ip,{0,0,0,0}}]],
                              [])
    ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.36.0>]
    messages: []
    links: [<0.258.0>]
    dictionary: [{'$internal_queue_len',0}]
    trap_exit: false
    status: running
    heap_size: 987
    stack_size: 23
    reductions: 3258
  neighbours:

=SUPERVISOR REPORT==== 12-Sep-2011::22:48:56 ===
     Supervisor: {local,ejabberd_c2s_sup}
     Context:    child_terminated
     Reason:     {{case_clause,{error,{open_error,-10}}},
                  [{tls,tcp_to_tls,2},
                   {ejabberd_socket,starttls,3},
                   {ejabberd_c2s,wait_for_feature_request,2},
                   {p1_fsm,handle_msg,10},
                   {proc_lib,init_p,5}]}
     Offender:   [{pid,<0.372.0>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_c2s,start_link,
                          [{ejabberd_socket,
                               {socket_state,gen_tcp,#Port<0.406>,<0.371.0>}},
                           [inet,
                            {certfile,"/opt/ejabberd-2.1.8/conf/server.pem"},
                            starttls,
                            {access,c2s},
                            {shaper,c2s_shaper},
                            {max_stanza_size,65536},
                            {ip,{0,0,0,0}}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

Here's the process to fix it:

root@mail [/opt/ejabberd-2.1.8]# find . -name tls_drv.so
./lib/ejabberd-2.1.8/priv/linux-x86/lib/tls_drv.so
root@mail [/opt/ejabberd-2.1.8]# cd lib/ejabberd-2.1.8/priv/linux-x86/lib/
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]# ldd tls_drv.so 
linux-gate.so.1 =>  (0x00f9c000)
libssl.so.0.9.8 => not found
libcrypto.so.0.9.8 => not found
libc.so.6 => /lib/libc.so.6 (0x00d9c000)
/lib/ld-linux.so.2 (0x00943000)
root@mail [/lib]# cd /lib
root@mail [/lib]# ll libcrypto.so.* libssl.so.*
-rwxr-xr-x 1 root root 1296964 Mar  6  2011 libcrypto.so.0.9.8e*
lrwxrwxrwx 1 root root      14 Nov 24  2009 libcrypto.so.4 -> libcrypto.so.6*
lrwxrwxrwx 1 root root      19 Apr 26 11:06 libcrypto.so.6 -> libcrypto.so.0.9.8e*
-rwxr-xr-x 1 root root  293044 Mar  6  2011 libssl.so.0.9.8e*
lrwxrwxrwx 1 root root      11 Nov 24  2009 libssl.so.4 -> libssl.so.6*
lrwxrwxrwx 1 root root      16 Apr 26 11:06 libssl.so.6 -> libssl.so.0.9.8e*
root@mail [/lib]# ln -s libcrypto.so.0.9.8e libcrypto.so.0.9.8
root@mail [/lib]# ln -s libssl.so.0.9.8e libssl.so.0.9.8
root@mail [/lib]# cd -
/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]# ldd tls_drv.so 
./tls_drv.so: /lib/libcrypto.so.0.9.8: no version information available (required by ./tls_drv.so)
./tls_drv.so: /lib/libssl.so.0.9.8: no version information available (required by ./tls_drv.so)
linux-gate.so.1 =>  (0x0088c000)
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00110000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00ebf000)
libc.so.6 => /lib/libc.so.6 (0x00252000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x008ef000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00ae0000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x0077c000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00527000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00158000)
libdl.so.2 => /lib/libdl.so.2 (0x0016c000)
libz.so.1 => /usr/lib/libz.so.1 (0x00a67000)
/lib/ld-linux.so.2 (0x00943000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00df3000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00e2a000)
libselinux.so.1 => /lib/libselinux.so.1 (0x008cc000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00171000)
root@mail [/opt/ejabberd-2.1.8/lib/ejabberd-2.1.8/priv/linux-x86/lib]#

I restarted ejabberd, and that was it!

I really hope it helps someone else, since googling made me find a lot of people with the same issue, but not a single solution.

Regards!

maganap

物价感观 2024-10-16 14:13:55

最新的安装程序将解决对 ejabberd 的依赖。

感谢您的举报!

Latest installer will solve this dependancy on ejabberd.

Thank you for reporting it !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文