Sql server Azure SQL Server出现ejabberd错误

Sql server Azure SQL Server出现ejabberd错误,sql-server,azure,ejabberd,Sql Server,Azure,Ejabberd,我在Azure虚拟机Ubuntu14.04上运行ejabberd 16.06节点,并使用odbc实现大部分功能 问题是,几天后,ejabberd失去了与数据库的连接,似乎无法正确恢复,所以我必须手动重新启动ejabberd本身 错误: 2016-12-28 16:43:40.084 [error] <0.24869.2>@ejabberd_sql:check_error:1033 SQL query 'Q9525209' at {sql_queries,145} failed: &l

我在Azure虚拟机Ubuntu14.04上运行ejabberd 16.06节点,并使用odbc实现大部分功能

问题是,几天后,ejabberd失去了与数据库的连接,似乎无法正确恢复,所以我必须手动重新启动ejabberd本身

错误:

2016-12-28 16:43:40.084 [error] <0.24869.2>@ejabberd_sql:check_error:1033 SQL query 'Q9525209' at {sql_queries,145} failed: <<"[FreeTDS][SQL Server]Communication link failure SQLSTATE$

如果您从配置中删除注释,它将被删除shorter@juergend完成:)badlop,ejabberd的主要维护者,刚刚在github上标记了这个问题
loglevel: 4

log_rotate_size: 10485760
log_rotate_date: ""
log_rotate_count: 1

log_rate_limit: 100

hosts:
  - "SOME.IP.NUMBER.A"

listen:
  -
    port: 5222
    module: ejabberd_c2s
    certfile: "/opt/ejabberd-16.06/conf/server.pem"
    starttls: true

    protocol_options:
      - "no_sslv3"
    ##   - "no_tlsv1"
    max_stanza_size: 65536
    shaper: c2s_shaper
    access: c2s
  -
    port: 5269
    module: ejabberd_s2s_in
    max_stanza_size: 131072
    shaper: s2s_shaper

  -
    port: 5280
    module: ejabberd_http
    request_handlers:
      "/websocket": ejabberd_http_ws
      "/api": mod_http_api
      "/oauth": ejabberd_oauth
    ##  "/pub/archive": mod_http_fileserver
    web_admin: true
    http_bind: true
    ## register: true
    captcha: false
  -
    port: 5285
    module: ejabberd_http
    request_handlers:
       "/rest": mod_rest



auth_method: odbc


sql_type: odbc
sql_server: "DSN=ejabberd;UID=#####@####-#####;PWD=#####"


sql_pool_size: 50


sql_keepalive_interval: 60

###.  ===============
###'  TRAFFIC SHAPERS

shaper:
  ##
  ## The "normal" shaper limits traffic speed to 1000 B/s
  ##
  normal: 1000

  ##
  ## The "fast" shaper limits traffic speed to 50000 B/s
  ##
  fast: 50000


max_fsm_queue: 1000

default_db: sql



acl:

  admin:
    user:
      - "anuser@SOME.IP.NUMBER.A"


  local:
    user_regexp: ""


  loopback:
    ip:
      - "127.0.0.0/8"


access:
  configure:
    admin: allow

###.  ============
###'  SHAPER RULES

shaper_rules:
  ## Maximum number of simultaneous sessions allowed for a single user:
  max_user_sessions: 10
  ## Maximum number of offline messages that users can have:
  max_user_offline_messages:
    - 5000: admin
    - 100
  ## For C2S connections, all users except admins use the "normal" shaper
  c2s_shaper:
    - none: admin
    - normal
  ## All S2S connections use the "fast" shaper
  s2s_shaper: fast

###.  ============
###'  ACCESS RULES
access_rules:
  ## This rule allows access only for local users:
  local:
    - allow: local
  ## Only non-blocked users can use c2s connections:
  c2s:
    - deny: blocked
    - allow
  ## Only admins can send announcement messages:
  announce:
    - allow: admin
  ## Only admins can use the configuration interface:
  configure:
    - allow: admin
  ## Only accounts of the local ejabberd server can create rooms:
  muc_create:
    - allow: local
  ## Only accounts on the local ejabberd server can create Pubsub nodes:
  pubsub_createnode:
    - allow: local
  ## In-band registration allows registration of any possible username.
  ## To disable in-band registration, replace 'allow' with 'deny'.
  register:
    - allow
  ## Only allow to register from localhost
  trusted_network:
    - allow: loopback


language: "en"


modules:
  mod_adhoc: {}
  mod_admin_extra: {}
  mod_announce: # recommends mod_adhoc
    access: announce
  mod_blocking: {} # requires mod_privacy
  mod_caps: {}
  mod_carboncopy:
    db_type: mnesia
  mod_client_state: {}
  mod_configure: {} # requires mod_adhoc
  mod_disco: {}
  ## mod_echo: {}
  mod_http_bind: {}
  ## mod_http_fileserver:
  ##   docroot: "/var/www"
  ##   accesslog: "/opt/ejabberd-16.06/logs/access.log"
  ## mod_irc: {}
  mod_last: {}
  mod_muc:
    ## host: "conference.@HOST@"
    access:
      - allow
    access_admin:
      - allow: admin
    access_create: muc_create
    access_persistent: muc_create
  mod_muc_admin: {}
  ## mod_muc_log: {}
  ## mod_multicast: {}
  mod_offline:
    access_max_user_messages: max_user_offline_messages
    db_type: odbc
  mod_ping: {}
  ## mod_pres_counter:
  ##   count: 5
  ##   interval: 60
  mod_privacy: {}
  mod_private: {}
  ## mod_proxy65: {}
  mod_pubsub:
    access_createnode: pubsub_createnode
    ## reduces resource comsumption, but XEP incompliant
    ignore_pep_from_offline: true
    ## XEP compliant, but increases resource comsumption
    ## ignore_pep_from_offline: false
    last_item_cache: false
    plugins:
      - "flat"
      - "hometree"
      - "pep" # pep requires mod_caps
  mod_register:

    welcome_message:
      subject: "Welcome!"
      body: |-
        Hi.
        Welcome to this XMPP server.

    ip_access: trusted_network

    access: register
  mod_roster:
   db_type: sql
  mod_shared_roster: {}
  ## mod_stats: {}
  ## mod_time: {}
  mod_vcard:
    search: false
  mod_version: {}
  mod_rest:
    allowed_ips:
     - "all"
    access_commands:
      restaccess:
        - registered_users
        - connected_users
  mod_mam:
    db_type: mnesia
    default: always
  mod_offline_post:
    auth_token: "veryverylongkey"
    post_url: "http://SOME.IP.NUMBER.A:3000/offline"

allow_contrib_modules: true

commands_admin_access: configure
commands:
  - add_commands:
    - status
    - register
    - unregister
    - change_password
    - add_rosteritem
oauth_expire: 950400
oauth_access: all