我正嘗試在VPS服務器(Digital Ocean,FreeBSD droplet)上設置ejabberd XMPP服務器。我已經啓動了ejabberd服務,並能夠登錄到開發者控制檯,註冊用戶並登錄。現在我遇到的問題是,我無法「添加好友」或啓動任何s2s連接,因爲我得到了503-服務不可用錯誤。Ejabberd:嘗試添加好友時獲取503服務不可用響應
這是我的調試輸出試圖給我的朋友帳戶發送好友請求(我取代他真正的手柄,「把手」):
([email protected])1> 13:46:03.468 [debug] Received XML on stream = <<"<presence to='[email protected]' type='subscribe'/>">>
13:46:03.471 [debug] sending to process <0.1148.0>
13:46:03.473 [debug] route
from {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"push4236684536">>},{<<"type">>,<<"set">>}],[{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:roster">>}],[{xmlel,<<"item">>,[{<<"ask">>,<<"subscribe">>},{<<"subscription">>,<<"none">>},{<<"jid">>,<<"[email protected]">>}],[{xmlel,<<"group">>,[],[{xmlcdata,<<"Buddies">>}]}]}]}]}
13:46:03.473 [debug] local route
from {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"push"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
13:46:03.473 [debug] session manager
from {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"push"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
13:46:03.473 [debug] sending to process <0.1148.0>
13:46:03.473 [debug] route
from {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
to {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
packet {xmlel,<<"presence">>,[{<<"to">>,<<"[email protected]">>},{<<"type">>,<<"subscribe">>}],[]}
13:46:03.474 [debug] s2s manager
from {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
to {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
packet {xmlel,<<"presence">>,[{<<"to">>,<<"blac"...>>},{<<"type">>,<<...>>}],[]}
13:46:03.474 [debug] Finding connection for {<<"vsydorov.me">>,<<"jabb3r.org">>}
13:46:03.474 [debug] route
from {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"presence">>,[{<<"type">>,<<"error">>},{<<"from">>,<<"[email protected]">>}],[{xmlel,<<"error">>,[{<<"code">>,<<"503">>},{<<"type">>,<<"cancel">>}],[{xmlel,<<"service-unavailable">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],[]}]}]}
13:46:03.475 [debug] local route
from {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"presence">>,[{<<"type">>,<<"erro"...>>},{<<"from">>,<<...>>}],[{xmlel,<<...>>,...}]}
13:46:03.475 [debug] session manager
from {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"presence">>,[{<<"type">>,<<"erro"...>>},{<<"from">>,<<...>>}],[{xmlel,<<...>>,...}]}
13:46:03.475 [debug] session manager
from {jid,<<"HANDLE">>,<<"jabb3r.org">>,<<>>,<<"HANDLE">>,<<"jabb3r.org">>,<<>>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
packet {xmlel,<<"presence">>,[{<<"type">>,<<"erro"...>>},{<<"from">>,<<...>>}],[{xmlel,<<...>>,...}]}
13:46:03.475 [debug] sending to process <0.1148.0>
13:46:03.476 [debug] broadcast
{item,{<<"HANDLE">>,<<"jabb3r.org">>,<<>>},none}
13:46:03.476 [debug] roster changed for <<"admin">>
13:46:03.476 [debug] Send XML on stream = <<"<iq from='[email protected]' to='[email protected]/12836165211442403246588688' id='push4236684536' type='set'><query xmlns='jabber:iq:roster'><item ask='subscribe' subscription='none' jid='[email protected]'><group>Buddies</group></item></query></iq>">>
13:46:03.477 [debug] Send XML on stream = <<"<presence from='[email protected]' to='[email protected]/12836165211442403246588688' type='error'><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence>">>
13:46:03.512 [debug] Received XML on stream = <<"<iq type='result' id='push4236684536'/>">>
13:46:03.513 [debug] route
from {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"type">>,<<"result">>},{<<"id">>,<<"push4236684536">>}],[]}
13:46:03.513 [debug] local route
from {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"type">>,<<"resu"...>>},{<<"id">>,<<...>>}],[]}
13:46:03.513 [debug] session manager
from {jid,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>,<<"admin">>,<<"vsydorov.me">>,<<"12836165211442403246588688">>}
to {jid,<<"admin">>,<<"vsydorov.me">>,<<>>,<<"admin">>,<<"vsydorov.me">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"type">>,<<"resu"...>>},{<<"id">>,<<...>>}],[]}
起初,我以爲我的DNS表錯了,但我再次檢查並重新檢查它 - 這是正確的。
_xmpp-client._tcp.vsydorov.me. 1800 IN SRV 5 0 5222 vsydorov.me.
_xmpp-server._tcp.vsydorov.me. 1800 IN SRV 5 0 5269 vsydorov.me.
_jabber._tcp.vsydorov.me. 1800 IN SRV 5 0 5269 vsydorov.me.
我不能谷歌的解決方案我自己 - 我一直在嘗試它兩天了。
這裏是ejabberd服務器的.yml配置:
loglevel: 5
log_rotate_size: 10485760
log_rotate_date: ""
log_rotate_count: 1
log_rate_limit: 100
hosts:
route_subdomains: s2s
listen:
-
port: 5222
module: ejabberd_c2s
certfile: "/usr/local/etc/ejabberd/ejabberd.pem"
starttls: true
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
-
port: 5269
module: ejabberd_s2s_in
-
port: 8888
module: ejabberd_service
access: all
shaper_rule: fast
ip: "127.0.0.1"
hosts:
"icq.example.org":
password: "secret"
"sms.example.org":
password: "secret"
-
port: 3478
transport: udp
module: ejabberd_stun
-
port: 4560
module: ejabberd_xmlrpc
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
web_admin: true
http_bind: true
captcha: true
s2s_use_starttls: optional
s2s_certfile: "/usr/local/etc/ejabberd/ejabberd.pem"
host_config:
"vsydorov.me":
domain_certfile: "/usr/local/etc/ejabberd/ejabberd.pem"
s2s_access: s2s
outgoing_s2s_families:
- ipv4
- ipv6
outgoing_s2s_timeout: 10000
auth_method: internal
auth_password_format: scram
shaper:
normal: 1000
fast: 50000
max_fsm_queue: 1000
acl:
admin:
user:
- "admin": "vsydorov.me"
local:
user_regexp: ""
loopback:
ip:
- "127.0.0.0/8"
access:
max_user_sessions:
all: 10
max_user_offline_messages:
admin: 5000
all: 100
local:
local: allow
c2s:
blocked: deny
all: allow
c2s_shaper:
admin: none
all: normal
s2s_shaper:
all: fast
announce:
admin: allow
configure:
admin: allow
muc_admin:
admin: allow
muc_create:
local: allow
muc:
all: allow
pubsub_createnode:
local: allow
register:
all: allow
trusted_network:
loopback: allow
language: "en"
modules:
mod_adhoc: {}
mod_announce: # recommends mod_adhoc
access: announce
mod_blocking: {} # requires mod_privacy
mod_caps: {}
mod_carboncopy: {}
mod_client_state:
drop_chat_states: true
queue_presence: false
mod_configure: {} # requires mod_adhoc
mod_disco: {}
mod_irc: {}
mod_http_bind: {}
mod_last: {}
mod_muc:
access: muc
access_create: muc_create
access_persistent: muc_create
access_admin: 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_register:
welcome_message:
subject: "Welcome!"
body: |-
Hi.
Welcome to Vlad's XMPP server.
ip_access: trusted_network
access: register
mod_roster: {}
mod_shared_roster: {}
mod_stats: {}
mod_time: {}
mod_vcard: {}
mod_version: {}
在我看來,你的聯繫人名單中本地添加。這是遠程服務器似乎正在返回的存在。 –
@MickaëlRémond,謝謝你向我解釋日誌消息,我不知道他們應該如何在工作服務器上看起來像。我對ejabberd和整個XMPP都很陌生,不幸的是我不知道如何解決這個問題。你知道我應該改變什麼來遠程添加名冊嗎? – wuzwm
主要問題是:您確定此聯繫人有效嗎? –