Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant run Client.js #5

Open
ixayldz opened this issue Jun 30, 2021 · 13 comments
Open

Cant run Client.js #5

ixayldz opened this issue Jun 30, 2021 · 13 comments

Comments

@ixayldz
Copy link

ixayldz commented Jun 30, 2021

[root@localhost client]# node client.js
16:19:32.835 INFO [SYSTEM] App running
16:19:32.854 INFO [SOCKET] New client connected! ID: s0WzwRdGATxs2sO4AAAD
16:19:32.878 INFO [SOCKET] New client connected! ID: s0WzwRdGATxs2sO4AAAD
16:19:32.880 FATAL [SOCKET] Connection failed!
[root@localhost client]# 16:19:33.389 INFO [SOCKET] Client disconnected! ID: s0WzwRdGATxs2sO4AAAD
[root@localhost client]# node client.js
16:26:21.721 INFO [SYSTEM] App running
16:26:21.745 INFO [SOCKET] New client connected! ID: exY9LTuQRyZD0GZVAAAE
16:26:21.764 INFO [SOCKET] New client connected! ID: exY9LTuQRyZD0GZVAAAE
16:26:21.765 FATAL [SOCKET] Connection failed!
16:26:22.275 INFO [SOCKET] Client disconnected! ID: exY9LTuQRyZD0GZVAAAE
[root@localhost client]#

@ixayldz
Copy link
Author

ixayldz commented Jun 30, 2021

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node client.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-30T20_19_25_417Z-debug.log

@glenndehaan
Copy link
Owner

Seems to me like either the server is offline. Or the IP/Hostname is incorrect in the config file

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

you talking about csgo gameserver config files ? or we copy in client and server config file ?

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

[root@localhost server]# npm start

[email protected] start /home/mm/server
node server.js

05:10:03.076 INFO [DATABASE] Ready!
05:10:03.082 INFO [SYSTEM] Socket.IO started on: 213.238.166.207:3500
05:10:03.082 INFO [SERVERS] Init complete!
05:10:03.084 INFO [MATCHMAKING] Started the matchmaking service!
05:10:03.084 INFO [SYSTEM] App running

this is when i npm start in server folder

i make (npm start%) for let it work in backround
than i go client folder and i make npm start than i get thoso errors..

@glenndehaan
Copy link
Owner

Yeah oke. But now we are talking about a public ip now. Are you sure the firewall settings are correct? And that port is open for clients to connect. As an example I would first try localhost or 127.0.0.1 to see if that works

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

[root@localhost server]# (npm start&)
[root@localhost server]#

[email protected] start /home/mm/server
node server.js

05:47:39.149 INFO [DATABASE] Ready!
05:47:39.155 INFO [SYSTEM] Socket.IO started on: 213.238.166.207:3500
05:47:39.155 INFO [SERVERS] Init complete!
05:47:39.157 INFO [MATCHMAKING] Started the matchmaking service!
05:47:39.157 INFO [SYSTEM] App running
npm test

[email protected] test /home/mm/server
nyc --reporter=html --reporter=text mocha -R spec --recursive

  1. Uncaught error outside test suite
    Database
    ✓ Should exists on filesystem
    ✓ Should write to DB
    ✓ Should delete from DB

Socket
2) Should connect to Socket.IO server
3) Should receive connect init data
4) Should receive index and user data
5) Should receive update (step 1, ready)
6) Should receive update (step 2, not ready)

Server
✓ Should give a server
✓ Should reserve a server

Matchmaking
7) Should contain our player
8) Should create a group
9) Should return a server

5 passing (16s)
9 failing

  1. Uncaught error outside test suite:
    Uncaught Error: listen EADDRINUSE: address already in use 213.238.166.207:3500
    at Server.setupListenHandle [as _listen2] (net.js:1320:16)
    at listenInCluster (net.js:1368:12)
    at doListen (net.js:1505:7)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)

  2. Socket
    Should connect to Socket.IO server:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  3. Socket
    Should receive connect init data:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  4. Socket
    Should receive index and user data:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  5. Socket
    Should receive update (step 1, ready):
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  6. Socket
    Should receive update (step 2, not ready):
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  7. Matchmaking
    Should contain our player:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  8. Matchmaking
    Should create a group:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

  9. Matchmaking
    Should return a server:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

module.exports = {
application: {
logLevel: "info", // trace, debug, info, warn, error or fatal
host: "127.0.0.0",
port: 3500
},
servers: [
{
ip: "213.238.166.207",
port: 27015,
password: "123",
default_map: "de_dust2"
},
{
ip: "213.238.166.207",
port: 27016,
password: "123",
default_map: "de_mirage"
}
]
};

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

host was right 127.0.0.1 also i tried i dont know whats wrong? btw can u add this very simple front end ? no need look good just buttons if u add we can edit all that

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

[root@localhost server]# firewall-cmd --permanent --add-port=3500/tcp
Warning: ALREADY_ENABLED: 3500:tcp
success

@glenndehaan
Copy link
Owner

I just cloned the project. Used the example config files as config. And it works out of the box. So the problem must be on your side

image

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

when i run server.js its says
[root@localhost client]# 12:13:20.805 INFO [MATCHMAKING] Number of players found for matches: 0
12:13:30.817 INFO [MATCHMAKING] Number of players found for matches: 0
12:13:40.819 INFO [MATCHMAKING] Number of players found for matches: 0

i think i have problem in client side..

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

[root@localhost client]# npm start

[email protected] start /home/mm/client
node client.js

12:18:41.717 INFO [SYSTEM] App running
12:18:41.736 INFO [SOCKET] New client connected! ID: TY0gUEtzIjWhAXeUAAAE
12:18:41.756 INFO [SOCKET] New client connected! ID: TY0gUEtzIjWhAXeUAAAE
12:18:41.755 FATAL [SOCKET] Connection failed!
12:18:42.264 INFO [SOCKET] Client disconnected! ID: TY0gUEtzIjWhAXeUAAAE
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node client.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-01T16_18_42_311Z-debug.log
[root@localhost client]# 12:18:43.389 INFO [MATCHMAKING] Number of players found for matches: 0
12:18:53.399 INFO [MATCHMAKING] Number of players found for matches: 0
12:19:03.410 INFO [MATCHMAKING] Number of players found for matches: 0

@ixayldz
Copy link
Author

ixayldz commented Jul 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants