Navigation

    Colyseus
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. Bright
    B

    Bright

    @Bright

    Chat Follow Unfollow
    0
    Reputation
    7
    Posts
    237
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with Bright
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    Bright Follow

    Posts made by Bright

    RE: [C]pm2 + @colyseus/proxy Has been Error: socket hang up who can help me?

    @coco 这个参数叫什么名字 我查一下

    posted in Questions & Help •
    RE: [C]pm2 + @colyseus/proxy Has been Error: socket hang up who can help me?

    @coco 自托管

    posted in Questions & Help •
    RE: [C]pm2 + @colyseus/proxy Has been Error: socket hang up who can help me?

    Yes using PM2
    ecosystem.js content:

    //******************************************************************//
    const os = require('os');
    module.exports = {
        error_file: 'logs/err.log',
        out_file: 'logs/out.log',
        log_file: 'logs/combined.log',
        time: true,
        apps: [
            {
                name        : "game",
                script      : "cd game &&  node dist/main.js",
                watch       : true,
                instances   : os.cpus().length,
                exec_mode   : 'fork',
    			env: {
    				PORT:xxxx, //proxy port
                    DEBUG: "colyseus:errors",
                    NODE_ENV: "production"
                }
    		},
            {
                name        : "proxy",
    			script      : "cd proxy/proxy  && npx ts-node proxy.ts",
                //script      : "cd proxy && node proxy.js",
                watch       : true,
                instances   : 1,
                exec_mode   : 'fork',
    			env: {
    				PORT: xxxx,
    				IP:"10.70.28.139",
    				REDIS_URL: "redis://xx.xx.xx.xx:2007/01",
                    NODE_ENV: "production"
                }
            }
        ]
    }
    //******************************************************************//
    

    Version number of Colyseus I use:

    "Colyseus" : "^ 0.12.3",
    "Colyseus. Js", "^ 0.13.1",
    "@ colyseus/proxy", "0.12.6",
    
    posted in Questions & Help •
    [C]pm2 + @colyseus/proxy Has been Error: socket hang up who can help me?

    Error: socket hang up
    1|proxy | at createHangUpError (_http_client.js:332:15)
    1|proxy | at Socket.socketCloseListener (_http_client.js:373:25)
    1|proxy | at Socket.emit (events.js:203:15)
    1|proxy | at Socket.EventEmitter.emit (domain.js:448:20)
    1|proxy | at TCP._handle.close (net.js:607:12)
    1|proxy | Proxy error during: /matchmake/joinById/HiYt0Y_8o
    1|proxy | Error: socket hang up
    1|proxy | at createHangUpError (_http_client.js:332:15)
    1|proxy | at Socket.socketCloseListener (_http_client.js:373:25)
    1|proxy | at Socket.emit (events.js:203:15)
    1|proxy | at Socket.EventEmitter.emit (domain.js:448:20)
    1|proxy | at TCP._handle.close (net.js:607:12)

    posted in Questions & Help •
    RE: Colyseus中文技术支持论坛

    有没有大佬帮我解决一下 这个问题
    https://discuss.colyseus.io/topic/520/pm2-colyseus-proxy-the-game-runs-with-this-problem-all-the-time

    posted in 中文 •