Meteor cluster not starting, help needed urgently


#1

Based on the simple implementation of Meteor Cluster MicroServices the doc I have this implementation for 2 services to communicate.

AppUI

export default CLUSTER_DISCOVERY_URL="mongodb://localhost:3001/meteor";
 Cluster.connect(CLUSTER_DISCOVERY_URL);
 Cluster.register('appui_service');
 loggerService = Cluster.discoverConnection('logger_service');

LoggerService

export default CLUSTER_DISCOVERY_URL="mongodb://localhost:3301/meteor";
Cluster.connect(CLUSTER_DISCOVERY_URL);
Cluster.register('logger_service');
loggerService = Cluster.discoverConnection('appui_service');

This is the start.sh file. My platorm is METEOR@1.7.0.3

export ROOT_URL='http://127.0.0.1:3000'
meteor $1 --port 3000

The Meteor cluster has refused to start completely. Stopped at this …

I20180719-16:43:22.071(1)? Cluster: connect 'mongodb' discovery backend
I20180719-16:43:22.072(1)? Cluster: with options:  undefined

Please, urgent help is needed as I need to submit this project in the shortest period of time. My question now is that does it mean Cluster only works with external MondoDB? Please, Meteor experts, an urgent help is needed. @abernix, @arunoda, @rafaelfaria


#2

Can you try with options in connect ?

var connectOptions = {
  // Value of 0 to 1, mentioning which portion of requestes to process here or proxy
  // If 1, all the requests allocated to this host will get processed
  // If 0.5 half of the requsted allocated to this host will get processed, others will get proxied
  // If 0, only do proxying 
  selfWeight: 1 // optional
};
Cluster.connect("mongodb://mongo-url", connectOptions)

and in register

var options = {
  endpoint: "a direct url to the instance",
  balancer: "balancer URL, if this is a balancer" // optional
  uiService: "service to proxy UI" // (optional) read to the end for more info
};

Cluster.register("serviceName", options);

is there a typo in your loggerservice here : localhost:3301 ?


#3

Thanks, @lc3t35, I have tried that before and it gave the same result I am trying to curb. Anyway, I have decided to DDP.connect implementation. It suffices for what I want to do for now until I want to start scaling.


#4

@ken4ward
This is not the right way to do things! Your post broke a few cardinal riles.

@arunoda is gone, and you shouldn’t ping abernix unless it’s related to the core AND you should (most likely) do it as a github issue.

Finally, technically you should use a load balancer (e.g. Elastic Beanstalk). Clusters is no longer developed (likely because it’s a lousy solution, we tried it before and hated it … hack on top of hack)


#5

@ramez Thanks for calling me to order. Appreciate this. I’ll keep to the rules next time. I’ll try as you suggested.