2017-04-12 112 views
0

Heyo,ejabberd:似乎無法實現流管理

我有一個有點頭疼試圖讓流管理(XEP-0198)在ejabberd 17.04工作在Ubuntu 16.10中,雖然我已經自ejabberd 17.03以來一直存在這個問題,儘管在任何地方搜索,但我似乎無法找到一個明確的答案,除了明確地將stream_management: true添加到我的配置或將其忽略並讓該設置默認爲true。但是,其中任何一個似乎都沒有取得任何成功。

我唯一的跡象表明,流管理目前無法正常工作是通過Android應用程序對話,其中列出的擴展名爲Unavailable,儘管應用程序從另一臺服務器撿起擴展就好了。我似乎無法在ejabberd的日誌中看到任何錯誤,除非有一次我導致了一個語法錯誤,這個錯誤從那以後就被糾正了。

這是我目前的配置(是的,我知道,它的改編形式的樣本,我需要清理一些垃圾了):

## 
###    ejabberd configuration file 
###   Archipel Sample default condiguration 

define_macro: 
    'CERT_LOCATION': "/certs/live/social.diskseven.com/ejabberd.pem" 
    'DH_PARAMS':  "/certs/live/social.diskseven.com/dhparams.pem" 

###  ========= 
###  DEBUGGING 

# Increase this if you want sone insane erlang debug 
loglevel: 3 

###  ================ 
###  SERVED HOSTNAMES 

# Change it for you FQDN 
hosts: 
    - "xmpp.diskseven.com" 

###  =============== 
###  LISTENING PORTS 

listen: 
    - 
     #it's a good idea to put xmlrpc behing a reverse proxy 
     #because you can't use tls directly, make it listen to localhost 
     ip: "::1" 
     # and read the Security section on the wiki 
     port: 4560 
     module: ejabberd_xmlrpc 
     access_commands: 
      xmlrpcaccess: 
       all : [] 


## ejabberd c2s 
    - 
     ip: "::" 
     port: 5222 
     stream_management: true 
     module: ejabberd_c2s 
     resend_on_timeout: if_offline 

     ## 
     ## If you installed a SSL 
     ## certificate, specify the full path to the 
     ## file and uncomment this line: 
     ## 

     certfile: 'CERT_LOCATION' 
     starttls: true 
     starttls_required: true 
     ciphers: "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH" 
     protocol_options: 
     - "no_sslv2" 
     - "no_sslv3" 
     - "no_tlsv1" 
     - "no_tlsv1_1" 
     max_stanza_size: 65536000 
     shaper: c2s_shaper 
     access: c2s 

## ejabbed s2s 
    - 
     ip: "::" 
     port: 5269 
     module: ejabberd_s2s_in 
     max_stanza_size: 65536000 

## ejabberd http/s and websocket/s 
    - 
     ip: "::" 
     port: 5280 
     module: ejabberd_http 
     request_handlers: 
     "/xmpp": ejabberd_http_ws 
     # if you want to use starttls with websock 
     # the URI will be wss:// 
     # please be sure that the certificate belong 
     # to a trusted AC in your browser 
     certfile: 'CERT_LOCATION' 
     dhfile: 'DH_PARAMS' 
     # tls: true 
     web_admin: true 
     http_bind: true 

###  === 
###  S2S 
s2s_access: all 
s2s_use_starttls: required 
s2s_certfile: 'CERT_LOCATION' #concantinated cert. 
s2s_dhfile: 'DH_PARAMS' 
s2s_ciphers: "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH" 
s2s_protocol_options: 
- "no_sslv2" 
- "no_sslv3" 
- "no_tlsv1" 
- "no_tlsv1_1" 


## domain_certfile: Specify a different certificate for each served hostname. 
## 
##host_config: 
## "xmpp.diskseven.com": 
##  domain_certfile: 'CERT_LOCATION' 
## "conference.xmpp.diskseven.com": 
##  domain_certfile: 'CERT_LOCATION' 

###  ============== 
###  AUTHENTICATION 

auth_method: internal 

###  =============== 
###  TRAFFIC SHAPERS 

shaper: 
    # in B/s 
    normal: 1000 
    fast: 50000000 

###  ==================== 
###  ACCESS CONTROL LISTS 

acl: 
    admin: 
     user: 
      - "admin": "xmpp.diskseven.com" 
    local: 
     user_regexp: "" 


###  ============ 
###  ACCESS RULES 

access: 
    max_user_sessions: 
     all: 5 
    local: 
     local: allow 
    c2s: 
     blocked: deny 
     all: allow 
    c2s_shaper: 
     admin: none 
     all: fast 
    s2s_shaper: 
     all: fast 
    s2s_access: 
     all: allow 
    announce: 
     admin: allow 
    configure: 
     admin: allow 
    muc_admin: 
     admin: allow 
    muc_create: 
     local: allow 
    muc: 
     all: allow 
    pubsub_createnode: 
     all: allow 
    register: 
     all: deny 
    xmlrpcaccess: 
     admin : allow 

### Frequency of account registration 
registration_timeout: 600 

###  ================ 
###  DEFAULT LANGUAGE 

language: "en" 

###  ======= 
###  MODULES 

modules: 
    mod_adhoc: [] 
    mod_announce: 
     access: announce 
    mod_blocking: [] 
    mod_caps: [] 
    mod_client_state: [] 
    mod_carboncopy: [] 
    mod_configure: [] 
    mod_disco: [] 
    mod_http_bind: 
     max_inactivity: 400 # timeout valie for BOSH usefull for a large number of VM 
    mod_http_upload: [] 
    mod_irc: [] 
    mod_last: [] 
    mod_mam: [] 
    mod_muc: 
     host: "[email protected]@" 
     access: all 
     access_create: muc_create 
     access_persistent: muc_create 
     access_admin: muc_admin 
    mod_offline: [] 
    mod_privacy: [] 
    mod_private: [] 
    mod_pubsub: 
     access_createnode: pubsub_createnode 
     ignore_pep_from_offline: true 
     last_item_cache: false 
     max_items_node: 1000 
     plugins: 
      - "flat" 
      - "hometree" 
      - "pep" 
     pep_mapping: 
      "urn:xmpp:microblog:0": "mb" 
    mod_ping: 
     send_pings: true 
     ping_interval: 60 
     ping_ack_timeout: 30 
     timeout_action: kill 
    mod_register: 
     access: register 
    mod_roster: 
     versioning: true 
    mod_shared_roster: [] 
    mod_time: [] 
    mod_vcard: [] 
    mod_version: [] 
    mod_admin_extra: [] 
# mod_fail2ban: 
#  c2s_auth_ban_lifetime: 1300 
#  c2s_max_auth_failures: 5 
+0

android客戶端也啓用流管理?如果沒有,那麼你必須啓用它的客戶端也。 –

+0

我還沒有發現切換流管理的應用程序中的任何設置,我想應用程序的開發人員已經啓用它,因爲它正在完全不同的服務器上正好接收擴展(正在運行的服務器別人)沒有任何輸入到我的應用程序。 –

回答

0

在ejabberd 17.03+流管理作爲單獨的模塊來實現: mod_stream_mgmt。你應該已經閱讀發佈說明;)

+0

或者ejabberd的開發人員可以更新文檔以反映新安裝的情況。雖然你的不必要的居高臨下的反應被注意到。 :^) –