Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2831

NoMethodError: undefined method `empty?' for nil:NilClass

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Stack trace from a production environment that started having issues. I don't have any data on what happened to the database at this time.

      Service had to be restarted.

      NoMethodError: undefined method `empty?' for nil:NilClass
      
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 287:in `refresh_peers'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 178:in `block in refresh'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 289:in `call'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 289:in `block in refresh_peers'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 288:in `each'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 288:in `refresh_peers'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 178:in `block in refresh'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 185:in `each'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 185:in `refresh'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 135:in `nodes'
      …undle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cluster.rb: 246:in `with_secondary'
      …by/1.9.1/gems/moped-1.4.2/lib/moped/session/context.rb: 104:in `with_node'
      …bundle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cursor.rb: 137:in `load_docs'
      …bundle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/cursor.rb:  25:in `each'
      …/bundle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/query.rb:  76:in `each'
      …/bundle/ruby/1.9.1/gems/moped-1.4.2/lib/moped/query.rb:  76:in `each'
      …9.1/gems/mongoid-3.1.0/lib/mongoid/contextual/mongo.rb: 118:in `block in each'
      …9.1/gems/mongoid-3.1.0/lib/mongoid/contextual/mongo.rb: 612:in `selecting'
      …9.1/gems/mongoid-3.1.0/lib/mongoid/contextual/mongo.rb: 117:in `each'
      …uby/1.9.1/gems/mongoid-3.1.0/lib/mongoid/contextual.rb:  19:in `each'
      …/ruby/1.9.1/gems/mongoid-3.1.0/lib/mongoid/criteria.rb: 510:in `entries'
      …/ruby/1.9.1/gems/mongoid-3.1.0/lib/mongoid/criteria.rb: 510:in `method_missing'
      …1/gems/mongoid_slug-2.0.1/lib/mongoid/slug/criteria.rb:  86:in `execute_or_raise_for_slugs'
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            dblock Daniel Doubrovkine
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: