title: ejabberd: can't seem to enable Stream Management
body: <p>Heyo,</p>
  
  <p>I'm having a bit of a headache trying to get Stream Management (XEP-0198) working in ejabberd 17.04 in Ubuntu 16.10, though I've had this problem since ejabberd 17.03, and in spite of searching just about everywhere, I can't seem to get find a straight answer beyond either explicitly adding <code>stream_management: true</code> to my config or leaving it out and letting that setting default to <code>true</code>. None of which seem to be offering any success, however.</p>
  
  <p>My only indication that Stream Management isn't working at the moment is via the Android app Conversations, which lists the extension as <code>Unavailable</code>, though the app picks up the extension from another server just fine. I can't seem to see any errors in ejabberd's logs either, barring the one time I caused a syntax error that's since been corrected.</p>
  
  <p>This is my current config (yes, I know, it's adapted form a sample and I need to clean some junk out):</p>
  
  <pre><code>##
  ###             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: "conference.@HOST@"
          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
  </code></pre>