Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not save data to mongodb #1

Open
backdooooor opened this issue Jul 20, 2013 · 1 comment
Open

not save data to mongodb #1

backdooooor opened this issue Jul 20, 2013 · 1 comment

Comments

@backdooooor
Copy link

# encoding: UTF-8

# This is the Vines XMPP server configuration file. Restart the server with
# 'vines restart' after updating this file.

Vines::Config.configure do
  # Set the logging level to debug, info, warn, error, or fatal. The debug
  # level logs all XML sent and received by the server.
  log :info

  # Set the directory in which to look for virtual hosts' TLS certificates.
  # This is optional and defaults to the conf/certs directory created during
  # `vines init`.
  certs 'conf/certs'

  # Each host element below is a virtual host domain name that this server will
  # service. Hosts can share storage configurations or use separate databases.
  # TLS encryption is mandatory so each host must have a <domain>.crt and
  # <domain>.key file in the conf/certs directory. A self-signed certificate can
  # be generated for a virtual host domain with the 'vines cert <domain.tld>'
  # command. Change the example, 'xcity.in', domain name to your actual
  # domain.
  #
  # The vines gem is distributed with a single 'fs' filesystem storage backend.
  # Additional database support is provided by the vines-sql, vines-redis,
  # vines-couchdb, and vines-mongodb gems.
  #
  # The private_storage attribute allows clients to store XML fragments
  # on the server, using the XEP-0049 Private XML Storage feature.
  #
  # The pubsub attribute defines the XEP-0060 Publish-Subscribe services hosted
  # at these virtual host domains. In the example below, pubsub services are
  # available at games.xcity.in and scores.xcity.in as well as
  # games.verona.lit and scores.verona.lit.
  #
  # Shared storage example:
  # host 'verona.lit', 'xcity.in' do
  #   private_storage false
  #   cross_domain_messages false
  #   storage 'fs' do
  #     dir 'data'
  #   end
  #   components 'tea'  => 'secr3t',
  #              'cake' => 'passw0rd'
  #   pubsub 'games', 'scores'
  # end

  host 'xcity.in' do
    cross_domain_messages false
    private_storage false
   ## storage 'fs' do
   ##   dir 'data'
   ## end

   storage 'mongodb' do
 host 'localhost', 27017
 host 'localhost', 27018 # optional, connects to replica set
  database 'jabber_server'
 tls true
 username 'jabber'
  password 'jabber'
 pool 5
 end
  # ldap 'ldap.xcity.in', 636 do
  #     dn 'cn=Directory Manager'
  #     password 'secr3t'
  #      basedn 'dc=xcity,dc=in'
  #     groupdn 'cn=chatters,dc=xcity,dc=in' # optional
  #     object_class 'person'
  #     user_attr 'uid'
  #     name_attr 'cn'
  #     tls true
  #   end
    # components 'tea'  => 'secr3t',
    #            'cake' => 'passw0rd'
    # pubsub 'games', 'scores'
  end

  # Hosts can use LDAP authentication that overrides the authentication
  # provided by a storage database. If LDAP is in use, passwords are not
  # saved or validated against the storage database. However, all other user
  # information, like rosters, is still saved in the storage database.
  #
  # host 'xcity.in' do
  #   cross_domain_messages false
  #   private_storage false
  #   storage 'fs' do
  #     dir 'data'
  #   end
  #   ldap 'ldap.xcity.in', 636 do
  #     dn 'cn=Directory Manager'
  #     password 'secr3t'
  #     basedn 'dc=wonderland,dc=lit'
  #     groupdn 'cn=chatters,dc=wonderland,dc=lit' # optional
  #     object_class 'person'
  #     user_attr 'uid'
  #     name_attr 'cn'
  #     tls true
  #   end
  #   components 'tea'  => 'secr3t',
  #              'cake' => 'passw0rd'
  # end

  # Configure the client-to-server port. The max_resources_per_account attribute
  # limits how many concurrent connections one user can have to the server.
  client '0.0.0.0', 5222 do
    max_stanza_size 65536
    max_resources_per_account 5
  end

  # Configure the server-to-server port. The max_stanza_size attribute should be
  # much larger than the setting for client-to-server. Add domain names to the
  # 'hosts' white-list attribute to allow those servers to connect. Any connection
  # attempt from a host not in this list will be denied.
  server '0.0.0.0', 5269 do
    max_stanza_size 131072
    hosts []
  end

  # Configure the built-in HTTP server that serves static files and responds to
  # XEP-0124 BOSH requests. This allows HTTP clients to connect to
  # the XMPP server.
  #
  # The root attribute defines the web server's document root (default 'web/').
  # It will only serve files out of this directory.
  #
  # The bind attribute defines the URL to which BOSH clients must POST their
  # XMPP stanza requests (default /xmpp).
  #
  # The vroute attribute defines the value of the vroute cookie sent in each
  # response that uniquely identifies this HTTP server. Reverse proxy servers
  # (nginx/apache) can use this cookie to implement sticky sessions. This is
  # only needed if the server is clustered behind a reverse proxy.
  http '0.0.0.0', 5280 do
    bind '/xmpp'
    max_stanza_size 65536
    max_resources_per_account 5
    root 'web'
    vroute ''
  end

  # Configure the XEP-0114 external component port. Component sub-domains and
  # their passwords are defined with their virtual host entries above.
  component '0.0.0.0', 5347 do
    max_stanza_size 131072
  end

  # Configure the redis connection used to form a cluster of server instances,
  # serving the same chat domains across many different machines.
  #cluster do
  #  host 'redis.xcity.in'
  #  port 6379
  #  database 0
  #  password ''
  #end
end

/conf/config.rb
logs

[2013-07-20T12:45:34Z]  INFO -- vines: XMPP server started
[2013-07-20T12:45:34Z]  INFO -- vines: Accepting client connections on 0.0.0.0:5222
[2013-07-20T12:45:34Z]  INFO -- vines: Accepting server connections on 0.0.0.0:5269
[2013-07-20T12:45:34Z]  INFO -- vines: Accepting http connections on 0.0.0.0:5280
[2013-07-20T12:45:34Z]  INFO -- vines: Accepting component connections on 0.0.0.0:5347
[2013-07-20T12:45:36Z]  INFO -- vines: Stream connected:      173.195.5.142:43693 -> 5.187.2.109:5222
[2013-07-20T12:45:36Z]  INFO -- vines: Stream connected:      173.195.5.142:43694 -> 5.187.2.109:5222
[2013-07-20T12:45:36Z]  INFO -- vines: Stream connected:      173.195.5.142:43695 -> 5.187.2.109:5222
[2013-07-20T12:45:36Z]  INFO -- vines: Stream connected:      173.195.5.142:43696 -> 5.187.2.109:5222
[2013-07-20T12:45:37Z]  INFO -- vines: Stream connected:      173.195.5.142:43697 -> 5.187.2.109:5222
[2013-07-20T12:45:38Z]  INFO -- vines: Stream connected:      173.195.5.142:43698 -> 5.187.2.109:5222
[2013-07-20T12:45:38Z]  INFO -- vines: Stream connected:      173.195.5.142:43699 -> 5.187.2.109:5222
[2013-07-20T12:45:38Z]  INFO -- vines: Stream connected:      173.195.5.142:43700 -> 5.187.2.109:5222
[2013-07-20T12:45:39Z]  INFO -- vines: Stream connected:      173.195.5.142:43701 -> 5.187.2.109:5222
[2013-07-20T12:45:39Z]  INFO -- vines: Stream connected:      173.195.5.142:43702 -> 5.187.2.109:5222
[2013-07-20T12:45:39Z]  INFO -- vines: Stream connected:      173.195.5.142:43703 -> 5.187.2.109:5222
[2013-07-20T12:45:40Z]  INFO -- vines: Stream connected:      173.195.5.142:43705 -> 5.187.2.109:5222
[2013-07-20T12:45:42Z]  INFO -- vines: Stream connected:      173.195.5.142:43706 -> 5.187.2.109:5222
[2013-07-20T12:45:42Z]  INFO -- vines: Stream connected:      173.195.5.142:43707 -> 5.187.2.109:5222
[2013-07-20T12:45:42Z]  INFO -- vines: Stream connected:      173.195.5.142:43708 -> 5.187.2.109:5222
[2013-07-20T12:45:42Z]  INFO -- vines: Stream connected:      173.195.5.142:43709 -> 5.187.2.109:5222
[2013-07-20T12:45:43Z]  INFO -- vines: Stream connected:      173.195.5.142:43710 -> 5.187.2.109:5222
[2013-07-20T12:45:43Z]  INFO -- vines: Stream connected:      173.195.5.142:43711 -> 5.187.2.109:5222
[2013-07-20T12:45:46Z]  INFO -- vines: Stream connected:      173.195.5.142:43712 -> 5.187.2.109:5222
[2013-07-20T12:46:52Z]  INFO -- vines: Stream connected:      173.195.5.142:43719 -> 5.187.2.109:5222
[2013-07-20T12:46:52Z]  INFO -- vines: Stream connected:      173.195.5.142:43720 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43693 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43694 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43695 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43696 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43697 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43698 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43699 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43700 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43701 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43702 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43703 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43705 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43706 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43707 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43708 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43709 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43710 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43711 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43712 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43719 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0
[2013-07-20T12:46:57Z]  INFO -- vines: Stream disconnected:   173.195.5.142:43720 -> 5.187.2.109:5222
[2013-07-20T12:46:57Z]  INFO -- vines: Streams connected: 0

help me pls.
the second week I can not get to work xmpp-server

@dgraham
Copy link
Member

dgraham commented Jul 20, 2013

Try setting log :debug so you can see the full protocol messages. Also try setting tls false on the mongodb connector. Development instances of mongo might not be configured for tls encryption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants