Pomelo Learning-chat Chat Example [Server "Gate-server-1" "Gate" Register Master failed] Error resolution

Source: Internet
Author: User

Pomele related

Official website: http://pomelo.netease.com/

Pomelo club:http://nodejs.netease.com/

Pomelo Introduction: Introduction and Installation

Pomelo Helloworld:hello World Example

Pomelo Chat:github Demo

1. Clone the project from GitHub and switch to the corresponding branch

git clone https://github.com/netease/chatofpomelo-websocket.gitgit checkout tutorial-starter

2. Create a new Pomelo project

mkdir CHAT_DEMOCD Chat_demopomelo Init
Npm-install.bat

3. Created here is just an empty project, you can start the server and the client to test the success of the creation

CD Chat_demo // Service Side CD Game_serverpomelo start // Client CD Web_servernode app

To access http://127.0.0.1:3001 through a browser, click Test Game Server and a prompt will normally appear.

4. Copy all files under Clone project Game_server and Web_server to Game_server and Web_server of the Chat_demo project, respectively

5. Start the service

CD Chat_demo // Service Side CD Game_serverpomelo StartCD. // Client CD Web_servernode app

Note: It is possible to start the server "xxxx" "XXX" Register Master failed error, which will be said after the workaround.

6. Access http://127.0.0.1:3001/index.html, the login screen will appear, enter the name and channel as required to enter the chat interface, as

server "xxxx" "XXX" Register Master failed problem resolution

Reason:

Chat Service end is divided into three parts connector, chat, gate, in a distributed deployment environment, these three types of servers to communicate, each server will hold a token as a validation string, In the config directory, Adminserver.json is adding tokens for each type of server, and only connector is created by default, which is why "chat" and "gate" registrations fail and "connector" The reason for the success of the registration, it is easy to know the reason for resolution.

Workaround:

In the config directory , add the Adminserver.json of chat and gate two server types, such as

Pomelo Learning-chat Chat Example [Server "Gate-server-1" "Gate" Register Master failed] Error resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.