Giter Club home page Giter Club logo

Comments (8)

senssei avatar senssei commented on July 17, 2024 1

Hi,

based on log it looks like Docker have no access to scripts files during setup first Replica Set called mongo-cnf-setup_1 .

mongo-cnf-setup_1    | standard_init_linux.go:178: exec user process caused "no such file or directory"

I know two Docker related reasons for that:

  1. check line-ending in those files init_shard.sh, setup.sh, setup_cnf.sh - the patch is prepared #4 or change them manually to LF, also global git config can mess this up - for example autocrlf=true
  2. add your disk to Shared Drives in Docker - https://forums.docker.com/t/volume-mounts-in-windows-does-not-work/10693/9

Drop me a line, if this covers your case. Cheers.

from mongo-cluster-docker.

dukuo avatar dukuo commented on July 17, 2024 1

I think changing the lines to LF did the trick. Noob question, which instance should I use as the master from my app? mongo1-1 ? Thanks!

from mongo-cluster-docker.

dukuo avatar dukuo commented on July 17, 2024 1

Now it's working. Apparently I had to open it with sudo -i. My apologies.

Thank you!

from mongo-cluster-docker.

senssei avatar senssei commented on July 17, 2024

I would use mongo-router as main entry point from read and write concern. It is a little bit confusing, because in this setup I use both Replication and Sharding together.

You could think about this like RAID 1+0. I've purposefully avoided to called any node master, because Mongo don't have multi-master https://docs.mongodb.com/manual/core/master-slave/.

Whole set is sharded environment, that's why on any databases and any collection you can create setup to share/split data across different ReplicaSets.

Additionally mongo-1-1 is main entry point for ReplicaSet1 and mongo-2-1 is main entry point for ReplicaSet2. Each ReplicaSets can elect their master and act as a fallback (with additional help from connection string options).

For more info, please referrer to https://docs.mongodb.com/manual/sharding/

from mongo-cluster-docker.

dukuo avatar dukuo commented on July 17, 2024

Clear as water. Thank you very much! I'm still learning replicating and sharding, and this is an excellent resource. Cheers

from mongo-cluster-docker.

dukuo avatar dukuo commented on July 17, 2024

i'm having the same issue again, but this time using elementary OS (16.04). Tried changing the files to LF but it didn't work. Do I need to mount any volumes? and if so, how could I do it?

Thanks for the help so far

from mongo-cluster-docker.

senssei avatar senssei commented on July 17, 2024

Do you have +x chmod on scripts ?

from mongo-cluster-docker.

dukuo avatar dukuo commented on July 17, 2024

from mongo-cluster-docker.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.