quakejs icon indicating copy to clipboard operation
quakejs copied to clipboard

Failing to run dedicated server

Open kgruszka opened this issue 5 years ago • 10 comments

Hi, I've followed the instruction to run a dedicated server on Ubuntu 16.04 and couldn't have it running. The server seems to be started and trying to send heartbeat to the master server. The output of running node build/ioq3ded.js +set fs_game baseq3 +set dedicated 2 +exec server.cfg:

WARNING: using emscripten GL emulation. This is a collection of limited workarounds, do not expect it to work.
WARNING: using emscripten GL emulation unsafe opts. If weirdness happens, try -s GL_UNSAFE_OPTS=0
ioq3 1.36_GIT_4f7d7bf-2014-02-01 emscripten- Feb 23 2014
----- FS_Startup -----
generated crc32 for /base/baseq3/pak0.pk3 in 0.36 seconds
generated crc32 for /base/baseq3/pak1.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak2.pk3 in 0.06 seconds
generated crc32 for /base/baseq3/pak3.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak4.pk3 in 0.08 seconds
generated crc32 for /base/baseq3/pak5.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak6.pk3 in 0.05 seconds
generated crc32 for /base/baseq3/pak7.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak8.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak100.pk3 in 0.12 seconds
generated crc32 for /base/baseq3/pak101.pk3 in 0.02 seconds
(node:3824) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Current search path:
/base/baseq3
/base/baseq3/pak8.pk3 (9 files)
    in the manifest
/base/baseq3/pak7.pk3 (4 files)
    in the manifest
/base/baseq3/pak6.pk3 (64 files)
    in the manifest
/base/baseq3/pak5.pk3 (7 files)
    in the manifest
/base/baseq3/pak4.pk3 (272 files)
    in the manifest
/base/baseq3/pak3.pk3 (4 files)
    in the manifest
/base/baseq3/pak2.pk3 (148 files)
    in the manifest
/base/baseq3/pak101.pk3 (41 files)
    in the manifest
/base/baseq3/pak100.pk3 (324 files)
    in the manifest
/base/baseq3/pak1.pk3 (26 files)
    in the manifest
/base/baseq3/pak0.pk3 (1387 files)
    in the manifest

----------------------
2286 files in pk3 files
execing default.cfg
execing q3config_server.cfg
couldn't exec autoexec.cfg
fs_game is write protected.
Hunk_Clear: reset the hunk ok
^3Couldn't write (null)/ioq3_server.pid.
Com_RandomBytes: using weak randomization
--- Common Initialization Complete ---
Hostname: emscripten
IP: 172.29.1.0
Opening IP socket: 0.0.0.0:27960
ignoring setsockopt command
execing server.cfg
sv_maxclients will be changed upon restarting.
------ Server Initialization ------
Server: q3dm7
Hunk_Clear: reset the hunk ok
----- FS_Startup -----
generated crc32 for /base/baseq3/pak0.pk3 in 0.34 seconds
generated crc32 for /base/baseq3/pak1.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak2.pk3 in 0.06 seconds
generated crc32 for /base/baseq3/pak3.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak4.pk3 in 0.08 seconds
generated crc32 for /base/baseq3/pak5.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak6.pk3 in 0.06 seconds
generated crc32 for /base/baseq3/pak7.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak8.pk3 in 0.00 seconds
generated crc32 for /base/baseq3/pak100.pk3 in 0.12 seconds
generated crc32 for /base/baseq3/pak101.pk3 in 0.02 seconds
Current search path:
/base/baseq3
/base/baseq3/pak8.pk3 (9 files)
    in the manifest
/base/baseq3/pak7.pk3 (4 files)
    in the manifest
/base/baseq3/pak6.pk3 (64 files)
    in the manifest
/base/baseq3/pak5.pk3 (7 files)
    in the manifest
/base/baseq3/pak4.pk3 (272 files)
    in the manifest
/base/baseq3/pak3.pk3 (4 files)
    in the manifest
/base/baseq3/pak2.pk3 (148 files)
    in the manifest
/base/baseq3/pak101.pk3 (41 files)
    in the manifest
/base/baseq3/pak100.pk3 (324 files)
    in the manifest
/base/baseq3/pak1.pk3 (26 files)
    in the manifest
/base/baseq3/pak0.pk3 (1387 files)
    in the manifest

----------------------
2286 files in pk3 files
Loading vm file vm/qagame.qvm...
File "vm/qagame.qvm" found in "/base/baseq3/pak8.pk3"
VM file qagame compiled in 527 milliseconds
qagame loaded in 2683840 bytes on the hunk
------- Game Initialization -------
gamename: baseq3
gamedate: Sep 30 2002
------------------------------------------------------------
InitGame: \fs_cdn\content.quakejs.com\fs_manifest\linuxq3ademo-1.11-6.x86.gz.sh@857908472@49292197 linuxq3apoint-1.32b-3.x86.run@296843703@30914987 baseq3/pak100.pk3@2388798635@16401505 baseq3/pak101.pk3@2206768903@2652817\version\ioq3 1.36_GIT_4f7d7bf-2014-02-01 emscripten- Feb 23 2014\com_gamename\Quake3Arena\com_protocol\71\dmflags\0\fraglimit\25\timelimit\15\g_gametype\0\mapname\q3dm7\sv_privateClients\0\sv_hostname\pearman\sv_maxclients\12\sv_minRate\0\sv_maxRate\0\sv_dlRate\100\sv_minPing\0\sv_maxPing\0\sv_floodProtect\1\sv_allowDownload\0\gamename\baseq3\g_maxGameClients\0\capturelimit\8\g_needpass\0
info_firstplace doesn't have a spawn function
info_secondplace doesn't have a spawn function
info_thirdplace doesn't have a spawn function
0 teams with 0 entities
20 items registered
-----------------------------------
------- BotLib Initialization -------
loaded weapons.c
loaded items.c
loaded syn.c
loaded rnd.c
loaded match.c
loaded rchat.c
------------ Map Loading ------------
trying to load maps/q3dm7.aas
loaded maps/q3dm7.aas
camp spot at 1180.0 -148.0 188.0 in solid
found 67 level items
-------------------------------------
6 bots parsed
38 arenas parsed
AAS initialized.
-----------------------------------
Hitch warning: 3013 msec frame time
Resolving master.quakejs.com (IPv4)
master.quakejs.com resolved to 172.29.2.0:27950
Sending heartbeat to master.quakejs.com

kgruszka avatar Aug 19 '18 11:08 kgruszka

I have same issue

a2kas avatar Sep 21 '18 17:09 a2kas

@kgruszka @a2kas: I fixed it like this:

diff --git a/build/ioq3ded.js b/build/ioq3ded.js
index 61c2ab7..9135870 100644
--- a/build/ioq3ded.js
+++ b/build/ioq3ded.js
@@ -10037,9 +10037,9 @@ function copyTempDouble(ptr) {
           if (ENVIRONMENT_IS_NODE) {
             peer.socket.on('open', handleOpen);
             peer.socket.on('message', function(data, flags) {
-              if (!flags.binary) {
-                return;
-              }
+              // if (!flags.binary) {
+              //   return;
+              // }
               handleMessage((new Uint8Array(data)).buffer);  // copy from node Buffer -> ArrayBuffer
             });
             peer.socket.on('error', handleClose);

and this

diff --git a/package.json b/package.json
index dd4dcc8..e9b2e3e 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
     "optimist": "~0.6.0",
     "ejs": "~0.8.4",
     "ws": "~0.4.29",
-    "winston": "~0.7.2",
+    "winston": "2.4.4",
     "wrench": "~1.5.4",
     "buffer-crc32": "~0.2.1",
     "send": "~0.2.0"

Hologos avatar Nov 15 '18 12:11 Hologos

thanks a lot! @Hologos I'll test it, also can share terraform script to run in on EC2 in AWS

kgruszka avatar Jul 08 '19 12:07 kgruszka

@kgruszka could you please share the terraform script?

psteinroe avatar Mar 23 '20 13:03 psteinroe

@Hologos this does not work for me. Still stuck at sending heartbeat to server

psteinroe avatar Mar 23 '20 18:03 psteinroe

@Hologos this does not work for me. Still stuck at sending heartbeat to server

Hi, the comment is year and a half old, the code has changed a lot.

Hologos avatar Mar 23 '20 18:03 Hologos

Hi, do you have any other idea why it stucks there?

psteinroe avatar Mar 23 '20 21:03 psteinroe

I haven't been following this project for a year, sorry.

Hologos avatar Mar 23 '20 21:03 Hologos

@steinroe @Hologos I have it running if you want to email me. Email is in my profile.

ghost avatar Apr 05 '20 00:04 ghost

Or you could just use Docker: https://github.com/treyyoder/quakejs-docker

treyyoder avatar Apr 19 '20 22:04 treyyoder