Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. Bright
  3. Posts
  • Profile
  • More
    • Continue chat with Bright
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

Posts made by Bright

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

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

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

@coco 自托管

posted in Questions & Help • 14 Oct 2021, 02:22
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 • 14 Oct 2021, 01:58
[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 • 13 Oct 2021, 08:55
RE: Colyseus中文技术支持论坛

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

posted in 中文 • 13 Oct 2021, 08:47

© 2023 Endel Dreyer