【发布时间】:2019-02-07 22:28:25
【问题描述】:
我尝试使用 mariadb-server 在我的带有 Debian 9 的 VPS 上安装 ejabberd。
从 aptitude (16.09-4) 安装的 ejabberd。
我指的是:https://docs.ejabberd.im/admin/databases/mysql/
我下载了 MySQL 架构:wget https://raw.githubusercontent.com/processone/ejabberd/master/sql/mysql.sql
以下是我的 ejabberd.yml conf 文件:(我删除了所有以 ### 开头的注释行)
loglevel: 4
log_rotate_size: 0
log_rotate_date: ""
log_rate_limit: 100
hosts:
- "XXXXX.com"
- "YYYYY.com"
- "ZZZZZ.de"
listen:
-
port: 5222
ip: "::"
module: ejabberd_c2s
certfile: "/etc/ejabberd/CCCCCCCCCCCCCCCCC.pem"
starttls_required: true
protocol_options:
- "no_sslv3"
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
zlib: true
resend_on_timeout: if_offline
-
port: 5269
ip: "::"
module: ejabberd_s2s_in
-
port: 5281
ip: "::"
module: ejabberd_http
web_admin: true
http_bind: true
tls: true
certfile: "/etc/ejabberd/CCCCCCC.pem"
s2s_use_starttls: optional
s2s_certfile: "/etc/ejabberd/ejabberd.pem"
s2s_protocol_options:
- "no_sslv3"
auth_password_format: scram
auth_method: sql
sql_type: mysql
sql_server: "localhost"
sql_database: "ejabberd"
sql_username: "MYNAME"
sql_password: "PASSWORD"
sql_port: 3306
shaper:
normal: 1000
fast: 50000
max_fsm_queue: 1000
acl:
admin:
user:
- "MYNAME@localhost"
local:
user_regexp: ""
loopback:
ip:
- "127.0.0.0/8"
shaper_rules:
max_user_sessions: 10
max_user_offline_messages:
- 5000: admin
- 100
c2s_shaper:
- none: admin
- normal
s2s_shaper: fast
access_rules:
local:
- allow: local
c2s:
- deny: blocked
- allow
announce:
- allow: admin
configure:
- allow: admin
muc_create:
- allow: local
pubsub_createnode:
- allow: local
register:
- allow
trusted_network:
- allow: loopback
language: "en"
modules:
default_db: sql
mod_adhoc: {}
mod_admin_extra: {}
mod_announce: # recommends mod_adhoc
access: announce
mod_blocking: {} # requires mod_privacy
mod_caps: {}
mod_carboncopy: {}
mod_client_state: {}
mod_configure: {} # requires mod_adhoc
mod_disco: {}
mod_echo: {}
mod_irc: {}
mod_http_bind: {}
mod_last: {}
mod_muc:
access:
- allow
access_admin:
- allow: admin
access_create: muc_create
access_persistent: muc_create
mod_muc_admin: {}
mod_offline:
access_max_user_messages: max_user_offline_messages
mod_ping: {}
mod_privacy: {}
mod_private: {}
mod_pubsub:
access_createnode: pubsub_createnode
ignore_pep_from_offline: true
last_item_cache: false
plugins:
- "flat"
- "hometree"
- "pep" # pep requires mod_caps
mod_roster:
versioning: true
mod_shared_roster: {}
mod_stats: {}
mod_time: {}
mod_vcard:
search: false
mod_version: {}
allow_contrib_modules: true
按照文档中的要求,它在编辑 SQL 部分后停止工作:
auth_password_format: scram
auth_method: sql
sql_type: mysql
sql_server: "localhost"
sql_database: "ejabberd"
sql_username: "MYNAME"
sql_password: "PASSWORD"
sql_port: 3306
当然已经加载了架构。
重新启动 ejabberd 时,我在 ejabberd.log 中收到此报告失败:感谢您提供的任何帮助或提示...
2018-09-02 20:24:29.684 [info] 应用程序 lager 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.692 [info] 应用程序加密在节点 ejabberd@vps574962
上启动 2018-09-02 20:24:29.696 [info] 应用程序 sasl 在节点 ejabberd@vps574962
上启动 2018-09-02 20:24:29.702 [info] 应用程序 asn1 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.703 [info] 应用程序 public_key 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.708 [info] 应用程序 ssl 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.713 [info] 应用程序 fast_yaml 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.723 [info] 应用程序 fast_tls 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.729 [info] 应用程序 fast_xml 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.735 [info] 应用程序 stringprep 在节点 ejabberd@vps574962
上启动 2018-09-02 20:24:29.739 [info] 应用程序 cache_tab 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:29.834 [info] 应用程序 mnesia 在节点 ejabberd@vps574962 上启动
2018-09-02 20:24:30.228 [info] 应用程序 inets 在节点 ejabberd@vps574962
上启动 2018-09-02 20:24:30.245 [错误] 崩溃报告进程 有 0 个邻居退出,原因是:没有匹配列表的函数子句:application_master 中的映射(#Fun,sql)第 1238 行:init/4 第 134 行
2018-09-02 20:24:30.245 [info] 应用程序 ejabberd 退出原因:没有匹配列表的函数子句:map(#Fun, sql) 第 1238 行
【问题讨论】:
-
请编辑您的错误跟踪,使其更具可读性。
-
感谢 Andrey 的快速反应,我在上面编辑了日志报告。
-
为了更完整,我的 ejabberd.yml 使用 auth_method: sql 和 sql_port: 3306,加上端口:5281 用于 https admin(这部分在尝试 mariadb 之前有效)
-
如果你只是在配置文件中更改了几行,现在启动时报错,那么可能是配置文件有问题。什么ejabberd版本?还要编辑你的帖子,并把所有破坏 ejabberd 的配置行放在开始。
-
嗨,Badlop,已使用所需信息编辑帖子,感谢您的帮助 :)