Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-440

errors when using localhost

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.3
    • Component/s: Cluster Management
    • Environment:
      MacBookPro laptop running Mac OS X 10.6.8, MongoDB 2.0.0 from machomebrew, mongo-java-driver-2.6.3.jar

      Console output at the end.

      Running MongoDB locally, bound to localhost. The client keeps logging ReplicaSetStatus updates - that's problem #1.

      Then the client gets a connection refused from my NIC IP address - why is it trying to connect that way? Problem #2.

      Then, it thinks the replicaset master (there is no replica set, mind you) has moved from localhost to localhost, but thinks that server is down. That's problems #3 and #4.

      Then, it thinks the server is down from that point forward. My app will fail until I restart the app. Then this whole process starts over just a couple of minutes later.

      Running our app from Ant eventually gives me the following output:

      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Sep 29, 2011 12:50:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen up: localhost:27017
      [java] Starting IDM Server on port 3002
      [java] Sep 29, 2011 12:55:19 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen down: localhost:27017
      [java] java.io.IOException: couldn't connect to [kevinw-mbp/10.180.131.72:27017] bc:java.net.ConnectException: Connection refused
      [java] at com.mongodb.DBPort._open(DBPort.java:206)
      [java] at com.mongodb.DBPort.go(DBPort.java:94)
      [java] at com.mongodb.DBPort.go(DBPort.java:75)
      [java] at com.mongodb.DBPort.findOne(DBPort.java:129)
      [java] at com.mongodb.DBPort.runCommand(DBPort.java:138)
      [java] at com.mongodb.ReplicaSetStatus$Node.update(ReplicaSetStatus.java:162)
      [java] at com.mongodb.ReplicaSetStatus$Node.update(ReplicaSetStatus.java:156)
      [java] at com.mongodb.ReplicaSetStatus.ensureMaster(ReplicaSetStatus.java:311)
      [java] at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:393)
      [java] at com.mongodb.ReplicaSetStatus$Updater.run(ReplicaSetStatus.java:292)
      [java] Sep 29, 2011 12:55:19 PM com.mongodb.DBTCPConnector _set
      [java] WARNING: Master switching from localhost:27017 to localhost:27017
      [java] Sep 29, 2011 12:55:29 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen down: localhost:27017
      [java] Sep 29, 2011 12:55:59 PM com.mongodb.ReplicaSetStatus$Node update
      [java] WARNING: Server seen down: localhost:27017

        1. Test2.java
          0.6 kB
        2. Test.java
          0.5 kB

            Assignee:
            antoine Antoine Girbal
            Reporter:
            kevwil Kevin Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: