无法在 EC2 实例上 运行 ejabberd
cant run ejabberd on EC2 instance
我在 ec2 实例上安装了 ejabberd,但是我遇到了多个问题 运行使用它
- 当我使用 ip/5280/admin 或 ip/5280 时,我没有收到回复。
我的 conf 文件中的另一件事是我选择了我的主机:ip (xx.xxx.xx.xx)。
当我检查 ejabberd 的状态时,我收到 ejabberd@localhost 是
开始状态:开始
- 另一件事,当我 运行 netstat 时,我看不到 ejabberd 已连接或 运行ning
- 最后我检查了 ejabberd 日志文件。它有以下错误:找不到匹配 'pubsub.ip-xxx-xx-xx-xxx.ec2.internal' 的证书:严格配置的客户端或服务器将拒绝与该主机的连接;从任何受信任的 CA 获取此(子)域的证书,例如 Let's Encrypt (www.letsencrypt.org)
如有任何帮助,我们将不胜感激。我正在 运行 使用最新版本的 ejabberd
- finally I check ejabberd log file. It has the following error: No certificate found matching
别担心,这是一个警告,我也明白了,它不会破坏 ejabberd。
重要的是要有这样的东西:
...
12:33:00.546 [info] ejabberd 18.04.107 is started in the node ejabberd@localhost in 8.10s
12:33:00.551 [info] Start accepting TCP connections at [::]:5280 for ejabberd_http
12:33:00.551 [info] Start accepting TCP connections at [::]:5269 for ejabberd_s2s_in
12:33:00.552 [info] Start accepting TCP connections at [::]:5222 for ejabberd_c2s
12:33:00.552 [info] Application ejabberd started on node ejabberd@localhost
- The other thing when I run netstat I cant see that ejabberd is connected or running
也许您正在查看已建立的连接,而不是侦听端口?这是我连接到远程服务器的客户端:
$ netstat | grep xmpp
tcp 0 0 192.168.1.14:39299 cookie.ziri:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:41867 lb.jabb.im:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:33063 ec2-52-50-2:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:39769 cookie.ziri:xmpp-client ESTABLISHED
这就是你想看到的,这是 ejabberd 侦听 xmpp 连接:
$ netstat -l | grep xmpp
tcp6 0 0 [::]:xmpp-client [::]:* LISTEN
tcp6 0 0 [::]:xmpp-server [::]:* LISTEN
- when I use my ip/5280/admin or ip/5280 i dont recieve a response. The other thing in my conf file i chose my host: ip (xx.xxx.xx.xx).
是主机:port/admin,不是主机/port/admin。参见:
$ wget -S --user=user1@localhost --password=mypass11 http://localhost:5280/admin/
--2018-06-28 12:39:19-- http://localhost:5280/admin/
S'està resolent localhost (localhost)... 127.0.0.1
S'està connectant a localhost (localhost)|127.0.0.1|:5280... conectat.
HTTP: s'ha enviat la petició, s'està esperant una resposta...
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=utf-8
Content-Length: 333
WWW-Authenticate: basic realm="ejabberd"
Authentication selected: basic realm="ejabberd"
S'està reutilitzant la connexió a localhost:5280.
HTTP: s'ha enviat la petició, s'està esperant una resposta...
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1803
Mida: 1803 (1,8K) [text/html]
S'està desant a: «index.html»
index.html 100%[==================================================>] 1,76K --.-KB/s in 0s
2018-06-28 12:39:19 (85,8 MB/s) - s'ha desat «index.html» [1803/1803]
$ head index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http....
我在 ec2 实例上安装了 ejabberd,但是我遇到了多个问题 运行使用它
- 当我使用 ip/5280/admin 或 ip/5280 时,我没有收到回复。 我的 conf 文件中的另一件事是我选择了我的主机:ip (xx.xxx.xx.xx)。 当我检查 ejabberd 的状态时,我收到 ejabberd@localhost 是 开始状态:开始
- 另一件事,当我 运行 netstat 时,我看不到 ejabberd 已连接或 运行ning
- 最后我检查了 ejabberd 日志文件。它有以下错误:找不到匹配 'pubsub.ip-xxx-xx-xx-xxx.ec2.internal' 的证书:严格配置的客户端或服务器将拒绝与该主机的连接;从任何受信任的 CA 获取此(子)域的证书,例如 Let's Encrypt (www.letsencrypt.org)
如有任何帮助,我们将不胜感激。我正在 运行 使用最新版本的 ejabberd
- finally I check ejabberd log file. It has the following error: No certificate found matching
别担心,这是一个警告,我也明白了,它不会破坏 ejabberd。 重要的是要有这样的东西:
...
12:33:00.546 [info] ejabberd 18.04.107 is started in the node ejabberd@localhost in 8.10s
12:33:00.551 [info] Start accepting TCP connections at [::]:5280 for ejabberd_http
12:33:00.551 [info] Start accepting TCP connections at [::]:5269 for ejabberd_s2s_in
12:33:00.552 [info] Start accepting TCP connections at [::]:5222 for ejabberd_c2s
12:33:00.552 [info] Application ejabberd started on node ejabberd@localhost
- The other thing when I run netstat I cant see that ejabberd is connected or running
也许您正在查看已建立的连接,而不是侦听端口?这是我连接到远程服务器的客户端:
$ netstat | grep xmpp
tcp 0 0 192.168.1.14:39299 cookie.ziri:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:41867 lb.jabb.im:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:33063 ec2-52-50-2:xmpp-client ESTABLISHED
tcp 0 0 192.168.1.14:39769 cookie.ziri:xmpp-client ESTABLISHED
这就是你想看到的,这是 ejabberd 侦听 xmpp 连接:
$ netstat -l | grep xmpp
tcp6 0 0 [::]:xmpp-client [::]:* LISTEN
tcp6 0 0 [::]:xmpp-server [::]:* LISTEN
- when I use my ip/5280/admin or ip/5280 i dont recieve a response. The other thing in my conf file i chose my host: ip (xx.xxx.xx.xx).
是主机:port/admin,不是主机/port/admin。参见:
$ wget -S --user=user1@localhost --password=mypass11 http://localhost:5280/admin/
--2018-06-28 12:39:19-- http://localhost:5280/admin/
S'està resolent localhost (localhost)... 127.0.0.1
S'està connectant a localhost (localhost)|127.0.0.1|:5280... conectat.
HTTP: s'ha enviat la petició, s'està esperant una resposta...
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=utf-8
Content-Length: 333
WWW-Authenticate: basic realm="ejabberd"
Authentication selected: basic realm="ejabberd"
S'està reutilitzant la connexió a localhost:5280.
HTTP: s'ha enviat la petició, s'està esperant una resposta...
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1803
Mida: 1803 (1,8K) [text/html]
S'està desant a: «index.html»
index.html 100%[==================================================>] 1,76K --.-KB/s in 0s
2018-06-28 12:39:19 (85,8 MB/s) - s'ha desat «index.html» [1803/1803]
$ head index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http....