Problem with distributed deployment of pomelo

Hi,

I checked the following links, and tried distributed deployment of pomelo, but failed.

My environment information is below:

  • Middleware versions
    • pomelo 1.0.0
    • node.js 0.10.22
  • Server machines (Each server is built individually in the AWS EC2 instance, and IP address is assigned to each server.)
    • 5 connector servers
    • 4 chat servers
    • 1 gate server
    • 1 master server
  • Configurations

    • servers.json

      {
          "production":
                 "connector":[
                   {"id":"connector-server-1", "host":"connector1", "domain": "production.com", "port":4050, "clientPort": 3050, "frontend": true},
                   {"id":"connector-server-2", "host":"connector2", "domain": "production.com", "port":4050, "clientPort": 3051, "frontend": true},
                   {"id":"connector-server-3", "host":"connector3", "domain": "production.com", "port":4050, "clientPort": 3052, "frontend": true},
                   {"id":"connector-server-4", "host":"connector4", "domain": "production.com", "port":4050, "clientPort": 3053, "frontend": true},
                   {"id":"connector-server-5", "host":"connector5", "domain": "production.com", "port":4050, "clientPort": 3054, "frontend": true}
               ],
              "chat":[
                   {"id":"chat-server-1", "host":"chat1", "port":6050},
                   {"id":"chat-server-2", "host":"chat2", "port":6050},
                   {"id":"chat-server-3", "host":"chat3", "port":6050},
                   {"id":"chat-server-4", "host":"chat4", "port":6050}
              ],
              "gate":[
                 {"id": "gate-server-1", "host": "gate1", "clientPort": 3014, "frontend": true}
              ]
          }
      }
      
    • master.json

      {
          "production":{
              "id":"master-server-1",
              "host":"master1",
              "port":3005
          }
      }
      
  • Problem

    • I'm trying to start pomelo with the above server configuration, but it will not start with an error. I confirmed to be able to start up in an all-in-one environment.

      • An error occurred when preparing the same source with the same directory structure on all servers and executing the following command on master server.

        cd game-server && ./node_modules/pomelo/bin/pomelo start -D -e production
        
      • The error that occurred is as follows.

        fail to operate component, method: start, err: "Error: connect EINVAL
            at errnoException (net.js:901:11)
            at connect (net.js:764:19)
            at net.js:842:9
            at asyncCallback (dns.js:68:16)
            at Object.onanswer [as oncomplete] (dns.js:121:9)"
        
      • In monitor.prototype.startConsole at this.monitorConsole.start in monitor.js I understand that it seems that an error has occurred, but even if I follow the source I could not confirm where an error occurred.

        Monitor.prototype.startConsole = function(cb) {
          moduleUtil.loadModules(this, this.monitorConsole);
          var self = this;
          this.monitorConsole.start(function(err) {
            if (err) {
              utils.invokeCallback(cb, err);
              return;
            }
            moduleUtil.startModules(self.modules, function(err) {
              utils.invokeCallback(cb, err);
              return;
            });
          });
          this.monitorConsole.on('error', function(err) {
            if(!!err) {
              logger.error('monitorConsole encounters with error: %j', err.stack);
              return;
            }
          });
        };
        

I have some questions:

  • Do settings of servers.json and master.json have any problems?
  • In a multi-server environment, I recognize that if I start up the master server, other servers will be started. Is it correct?
    • If it is not correct, I would like to know the correct server startup procedure.
  • SSH ports from the master server to each server are opened, and I confirmed that telnet can be done via 3005 port from the master server to the master server.
  • I would like to know the cause and the occurrence point of the above error.
标签: pomelo
konot 在 4-21 11:02发布 分享到 weibo
回到顶部