[Bug]: lgsm don't update node_modules only by remove the folder it redownload it lol
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The failure surfaces when the monitor command installs and invokes gamedig under lgsm/node_modules; start by reading the gamedig install/download path used by the monitor command and by update-lgsm, then compare how each decides whether the module tree is current. The report shows a stale nested dependency (fast-xml-builder expecting xml-naming) that only a full reinstall fixed, so the likely gap is a version/integrity check rather than a re-download. Done means a documented rule for when node_modules is refreshed and a manual path to reproduce the stale tree on a test box.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Severity
severity: critical
Reproducibility
reproducible: unable
Regression
regression: unknown
Affects latest release
latest-release: yes
User story
update-lgsm need to check if node_modules are up to date lol
Script name
ns2server
Game
Natural Selection 2
Linux distro
Ubuntu 26.04
Command
command: monitor
Expected behavior
i used monitor over crontab and it should restart the server when it's dead or hang xD
Actual behavior
i used monitor over crontab and server keep restarting all 5 mins and no error what the Problem is :(
Further information
found that in the logs:
Nov 13 11:17:51.184 ns2server: START: INFO: LinuxGSM version: v26.6.0
Nov 13 11:17:51.210 ns2server: START: PASS: core_exit.sh exiting with code: 0
Nov 13 11:20:01.881 ns2server: CORE: PASS: Using cached IP as public IP address
Nov 13 11:20:02.692 ns2server: MONITOR: PASS: Using cached IP as public IP address
Nov 13 11:20:04.977 ns2server: MONITOR: PASS: Using cached IP as public IP address
Nov 13 11:20:06.608 ns2server: MONITOR: INFO: Checking session: CHECKING
Nov 13 11:20:06.844 ns2server: MONITOR: PASS: Checking session: OK
Nov 13 11:20:08.457 ns2server: MONITOR: INFO: Querying port: gamedig: 192.168.178.20:27051 : 1 : QUERYING
Nov 13 11:20:08.806 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 1 : FAIL
Nov 13 11:20:10.418 ns2server: MONITOR: INFO: Querying port: gamedig: 178.201.208.119:27051 : 1 : QUERYING
Nov 13 11:20:10.770 ns2server: MONITOR: WARN: Querying port: gamedig: 178.201.208.119:27051 : 1 : FAIL
Nov 13 11:20:30.499 ns2server: MONITOR: INFO: Querying port: gamedig: 192.168.178.20:27051 : 2 : QUERYING
Nov 13 11:20:30.853 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 2 : FAIL
Nov 13 11:20:32.465 ns2server: MONITOR: INFO: Querying port: gamedig: 178.201.208.119:27051 : 2 : QUERYING
Nov 13 11:20:32.809 ns2server: MONITOR: WARN: Querying port: gamedig: 178.201.208.119:27051 : 2 : FAIL
Nov 13 11:20:52.550 ns2server: MONITOR: INFO: Querying port: gamedig: 192.168.178.20:27051 : 3 : QUERYING
Nov 13 11:20:52.891 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 3 : FAIL
Nov 13 11:20:54.502 ns2server: MONITOR: INFO: Querying port: gamedig: 178.201.208.119:27051 : 3 : QUERYING
Nov 13 11:20:54.848 ns2server: MONITOR: WARN: Querying port: gamedig: 178.201.208.119:27051 : 3 : FAIL
Nov 13 11:21:14.581 ns2server: MONITOR: INFO: Querying port: gamedig: 192.168.178.20:27051 : 4 : QUERYING
Nov 13 11:21:14.934 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 4 : FAIL
Nov 13 11:21:16.547 ns2server: MONITOR: INFO: Querying port: gamedig: 178.201.208.119:27051 : 4 : QUERYING
Nov 13 11:21:16.889 ns2server: MONITOR: WARN: Querying port: gamedig: 178.201.208.119:27051 : 4 : FAIL
Nov 13 11:21:36.630 ns2server: MONITOR: INFO: Querying port: gamedig: 192.168.178.20:27051 : 5 : QUERYING
Nov 13 11:21:36.971 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 5 : FAIL
Nov 13 11:21:37.181 ns2server: MONITOR: WARN: Querying port: gamedig: 192.168.178.20:27051 : 5 : FAIL
Nov 13 11:21:37.412 ns2server: MONITOR: WARN: Query port: Port 27051/udp is open by the game server (server_linux) but it did not answer; the server may be hung, or the query port or type may not match
Nov 13 11:21:37.692 ns2server: MONITOR: PASS: Using cached IP as public IP address
Nov 13 11:21:37.707 ns2server: MONITOR: INFO: Sending alert: Unable to query ns2server. Game server has been restarted
Nov 13 11:21:39.559 ns2server: MONITOR: PASS: Sending Discord alert
Nov 13 11:21:40.427 ns2server: RESTART: PASS: Using cached IP as public IP address
Nov 13 11:21:41.249 ns2server: RESTART: PASS: Using cached IP as public IP address
Nov 13 11:21:42.136 ns2server: STOP: PASS: Using cached IP as public IP address
Nov 13 11:21:42.570 ns2server: STOP: PASS: Using cached IP as public IP address
Nov 13 11:21:43.805 ns2server: STOP: INFO: Graceful: CTRL+c
Nov 13 11:21:44.230 ns2server: STOP: PASS: Graceful: CTRL+c: OK: 1 seconds
Nov 13 11:21:45.463 ns2server: START: PASS: Using cached IP as public IP address
Nov 13 11:21:46.298 ns2server: START: PASS: Using cached IP as public IP address
Nov 13 11:21:46.932 ns2server: START: INFO: Rotating log files
because i don't saw any errors i disabled monitor in crontab -e, then i checked today manually the monitor command and get this error
ns2server@homeserver:~$ ./ns2server m
[ OK ] Monitoring ns2server: Checking session ... OK
[ .... ] Monitoring ns2server: Querying port: gamedig: 192.168.178.20:27051 : 0/1 ... QUERYINGnode:internal/modules/helpers:81
internalFsBinding.legacyMainResolve(pkgPath, main, base),
^
Error: Cannot find package '/home/ns2server/lgsm/node_modules/fast-xml-builder/node_modules/xml-naming/index.js' imported from /home/ns2server/lgsm/node_modules/fast-xml-builder/src/orderedJs2Xml.js
at legacyMainResolve (node:internal/modules/helpers:81:23)
at Object.loaderMethodWrapper [as legacyMainResolve] (node:internal/modules/helpers:123:12)
at legacyMainResolve (node:internal/modules/esm/resolve:171:40)
at packageResolve (node:internal/modules/esm/resolve:763:12)
at moduleResolve (node:internal/modules/esm/resolve:840:18)
at defaultResolve (node:internal/modules/esm/resolve:973:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:708:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:728:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:766:56)
at #resolve (node:internal/modules/esm/loader:690:17) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v26.13.1
[ .... ] Monitoring ns2server: Querying port: gamedig: 178.201.208.119:27051 : 0/1 ... QUERYINGnode:internal/modules/helpers:81
internalFsBinding.legacyMainResolve(pkgPath, main, base),
^
Error: Cannot find package '/home/ns2server/lgsm/node_modules/fast-xml-builder/node_modules/xml-naming/index.js' imported from /home/ns2server/lgsm/node_modules/fast-xml-builder/src/orderedJs2Xml.js
at legacyMainResolve (node:internal/modules/helpers:81:23)
at Object.loaderMethodWrapper [as legacyMainResolve] (node:internal/modules/helpers:123:12)
at legacyMainResolve (node:internal/modules/esm/resolve:171:40)
at packageResolve (node:internal/modules/esm/resolve:763:12)
at moduleResolve (node:internal/modules/esm/resolve:840:18)
at defaultResolve (node:internal/modules/esm/resolve:973:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:708:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:728:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:766:56)
at #resolve (node:internal/modules/esm/loader:690:17) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v26.13.1
[ FAIL ] Monitoring ns2server: Querying port: gamedig: 178.201.208.119:27051 : 3/1 ... WAIT^C
then i remove /home/ns2server/lgsm/node_modules over winscp and use the monitor command again and then everything worked again lol
ns2server@homeserver:~$ ./ns2server m
[ .... ] Monitoring ns2server:
Installing Gamedig
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 746 100 746 0 0 15822 0 0
npm warn deprecated [email protected]: Use promise-toolbox/fromEvent instead
npm warn deprecated [email protected]: See https://github.com/mvdan/sh/issues/1145
added 66 packages in 734ms
25 packages are looking for funding
run npm fund for details
[ OK ] Monitoring ns2server: Checking session ... OK
[ OK ] Monitoring ns2server: Querying port: gamedig: 192.168.178.20:27051 : 0/1 ... OK
update-lgsm should check that /lgsm/node_modules as well ?
Pre-checks
- I ran update and validate before reporting this issue.
Relevant log output
Steps to reproduce
idk how to reproduce it i just Updated from Ubuntu Server 24.04.5 LTS to Ubuntu Server 26.04.1 LTS, and first time no Problems just yesterday i got that Problem.
- Ngôn ngữ chính
- Shell
- Star
- 4.9k
- Fork
- 866
- Merge trung bình
- 17 giờ 58 phút
- Pull request đã merge (30 ngày)
- 100
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GameServerManagers/LinuxGSM
-
command: update-lgsm distro: Debian engine: source2 game: Counter-Strike 2 regression: yes reproducible: always severity: low type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
GameServerManagers/LinuxGSM#5242 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
distro: Debian distro: Ubuntu engine: spark game: Natural Selection 2 priority: high scope: single game type: feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
GameServerManagers/LinuxGSM#5241 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
command: send distro: Ubuntu engine: spark game: Natural Selection 2 priority: high scope: single game type: feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
GameServerManagers/LinuxGSM#5240 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
engine: null game: Teamspeak 3
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 66/100
GameServerManagers/LinuxGSM#5237 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
command: install command: monitor command: start priority: medium scope: all servers type: feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
GameServerManagers/LinuxGSM#5204 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của GameServerManagers/LinuxGSM
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
nolte/claude-goose#18 ·
-
gated_tree trusts assume-unchanged entries, and can leave its temporary directory on a signalĐang mởdecision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
btclib-org/claude-process#609 · 1 bình luận ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
varnish/helm-varnish#173 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bump version [nginx2root]Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100