Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:15:15+00:00 2026-06-04T08:15:15+00:00

I am running MongoDb before on Windows and my Java app was connecting perfectly.

  • 0

I am running MongoDb before on Windows and my Java app was connecting perfectly. Now I switch the MongoDb to Linux, and started simply as “./mongod”. But whenever I try to connect to Mongo, I got the following exception.

Caused by: com.mongodb.MongoException: can't find a master
    at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:434)
    at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:209)
    at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)
    at com.mongodb.DBCollection.findOne(DBCollection.java:647)
    at com.mongodb.DBCollection.findOne(DBCollection.java:626)
    at com.mongodb.DBApiLayer$MyCollection.createIndex(DBApiLayer.java:364)
    at com.mongodb.DBCollection.createIndex(DBCollection.java:436)
    at com.mongodb.DBCollection.ensureIndex(DBCollection.java:515)
    at com.google.code.morphia.DatastoreImpl.ensureIndex(DatastoreImpl.java:245)
    at com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:310)
    at com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:279)
    at com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:340)
    at com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:333)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:15:16+00:00Added an answer on June 4, 2026 at 8:15 am

    Sounds like your configs are different between linux and windows mongo servers. Ensure your linux server has joined the replica set properly , and is not firewalled off from the other servers. All the documentation is here: http://www.mongodb.org/display/DOCS/Replica+Sets

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having performance issues with MongoDB. Running on: MongoDB 2.0.1 Windows 2008 R2
I'm running MongoDB on Windows. I have 1 or more threads that drop and
I am running a sharded mongodb environment - 3 mongod shards, 1 mongod config,
I'm running NodeJS and MongoDB on a linux cloud server. I need to give
I'm running write intensive MongoDB for a web app and I'm getting extraordinarily poor
I've successfully installed MongoDB on Windows (on a local machine) as a service, but
I am developing an application that will use MongoDB running on Windows Azure. This
I have mongodb running and using morphia. Having a Collection of BatchData Documents and
I need to connect to a MongoDB instance from my EJB3 application, running on
I am running some unit test that persist documents into the MongoDb database. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.