原 各种游戏汇总
|-原 關鍵報錯 WOW 服務器
root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# docker logs --tail 30 ac-authserver
root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# docker logs --tail 30 ac-worldserver
查看所有被監聽的端口
sudo ss -tulnp
各参数含义
-t TCP
-u UDP
-l 正在 监听 的套接字(listen)
-n 不把端口解析成服务名,直接显示数字
-p 显示占用该端口的进程 PID 与名称(需要 root 才能看到所有进程)
如果你想看得更“全”一点(包括 UNIX 域套接字、RAW、分组接口等),可以再加 -a:
sudo ss -tulnap
老机器上没有 ss 时,可退而求其次用 netstat:
sudo netstat -tulnp
只想快速扫一遍“哪些 TCP/UDP 端口处于 LISTEN 状态”,也可以:
sudo lsof -i -P -n | grep LISTEN
总结:
推荐 → sudo ss -tulnp
兼容老系统 → sudo netstat -tulnp
關鍵報錯
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-71-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro System information as of Wed Oct 8 13:54:14 UTC 2025 System load: 0.88 Processes: 205 Usage of /: 21.4% of 153.94GB Users logged in: 1 Memory usage: 51% IPv4 address for eth0: 137.184.177.199 Swap usage: 0% IPv4 address for eth0: 10.48.0.5 Expanded Security Maintenance for Applications is not enabled. 16 updates can be applied immediately. To see these additional updates run: apt list --upgradable 6 additional security updates can be applied with ESM Apps. Learn more about enabling ESM Apps service at https://ubuntu.com/esm *** System restart required *** Last login: Wed Oct 8 13:35:21 2025 from 218.18.207.209 root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:~# mysql -uroot -p acore_auth -e "UPDATE realmlist SET port = 3780 WHERE id = 1;" Enter password: root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:~# ac root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# docker compose up -d --force-recreate ac-worldserver [+] Running 3/3 ✔ Container ac-worldserver Started 3.4s ✔ Container ac-client-data-init Exited 0.7s ✔ Container ac-db-import Exited 1.7s root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# docker logs -f --tail 30 ac-authserver & docker logs -f --tail 30 ac-worldserver & [1] 165309 [2] 165310 root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# Started auth database connection pool. Loading IP Location Database... Added realm "AzerothCore" at 137.184.177.199:3780. SQL(p): DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP() [ERROR]: [2013] Lost connection to MySQL server during query Lost the connection to the MySQL server! Attempting to reconnect to the MySQL server... Connected to MySQL database at host.docker.internal Successfully reconnected to acore_auth @host.docker.internal:3306 (asynchronous). SQL(p): SELECT id, name, address, localAddress, localSubnetMask, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE flag <> 3 ORDER BY name [ERROR]: [2013] Lost connection to MySQL server during query Lost the connection to the MySQL server! Attempting to reconnect to the MySQL server... Connected to MySQL database at host.docker.internal Successfully reconnected to acore_auth @host.docker.internal:3306 (synchronous). SQL(p): SELECT id, name, address, localAddress, localSubnetMask, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE flag <> 3 ORDER BY name [ERROR]: [2013] Lost connection to MySQL server during query Lost the connection to the MySQL server! Attempting to reconnect to the MySQL server... Could not connect to MySQL database at host.docker.internal: Can't connect to MySQL server on 'host.docker.internal:3306' (111) Attempting to reconnect to the MySQL server... Connected to MySQL database at host.docker.internal Successfully reconnected to acore_auth @host.docker.internal:3306 (synchronous). SQL(p): DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP() [ERROR]: [2013] Lost connection to MySQL server during query Lost the connection to the MySQL server! Attempting to reconnect to the MySQL server... Connected to MySQL database at host.docker.internal Successfully reconnected to acore_auth @host.docker.internal:3306 (asynchronous). Deleting Expired Bans... Calculate Next Daily Quest Reset Time... Calculate Next Weekly Quest Reset Time... Calculate Next Monthly Quest Reset Time... Calculate Random Battleground Reset Time... Calculate Deletion Of Old Calendar Events Time... Calculate Guild Cap Reset Time... Load Petitions... >> Loaded 0 Petitions! Load Petition Signs... >> Loaded 0 Petition signs! Load Stored Loot Items... >> Loaded 0 stored items! Load Channel Rights... >> Loaded 0 Channel Rights! Load Channels... >> Loaded 0 channels. DB table `channels` is empty. Loading AntiDos opcode policies >> Loaded 102 AntiDos Opcode Policies in 0 ms WORLD: World Initialized In 0 Minutes 8 Seconds AzerothCore rev. 2c5aab9ed287+ 2025-10-07 09:41:15 +0200 (master branch) (Unix, RelWithDebInfo, Static) (worldserver-daemon) ready... AC> Calendar deletion of old events. ss -lntp | grep :3306^C root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# ll total 184 drwxr-xr-x 16 root root 4096 Oct 8 13:43 ./ drwxr-xr-x 6 root root 4096 Oct 8 01:28 ../ drwxr-xr-x 2 root root 4096 Oct 8 00:31 .devcontainer/ -rw-r--r-- 1 root root 219 Oct 8 00:31 .dockerignore -rw-r--r-- 1 root root 325 Oct 8 00:31 .editorconfig -rw-r--r-- 1 www www 366 Oct 8 13:52 .env drwxr-xr-x 8 root root 4096 Oct 8 00:31 .git/ -rw-r--r-- 1 root root 2264 Oct 8 00:31 .git_commit_template.txt -rw-r--r-- 1 root root 894 Oct 8 00:31 .gitattributes drwxr-xr-x 5 root root 4096 Oct 8 00:31 .github/ -rw-r--r-- 1 root root 1249 Oct 8 00:31 .gitignore -rw-r--r-- 1 root root 14 Oct 8 00:31 .suppress.cppcheck drwxr-xr-x 2 root root 4096 Oct 8 00:31 .vscode/ -rw-r--r-- 1 root root 3093 Oct 8 00:31 AUTHORS -rw-r--r-- 1 root root 4835 Oct 8 00:31 CMakeLists.txt -rw-r--r-- 1 root root 34520 Oct 8 00:31 LICENSE -rw-r--r-- 1 root root 908 Oct 8 00:31 PreLoad.cmake -rw-r--r-- 1 root root 92 Oct 8 00:31 acore.json -rwxr-xr-x 1 root root 159 Oct 8 00:31 acore.sh* drwxr-xr-x 19 root root 4096 Oct 8 00:31 apps/ drwxr-xr-x 2 root root 4096 Oct 8 00:31 bin/ drwxr-xr-x 3 root root 4096 Oct 8 00:31 conf/ drwxr-xr-x 3 root root 4096 Oct 8 00:31 data/ drwxr-xr-x 23 root root 4096 Oct 8 00:31 deps/ drwxr-xr-x 3 root root 4096 Oct 8 00:31 doc/ -rw-r--r-- 1 root root 7844 Oct 8 01:21 docker-compose.bak.yml -rw-r--r-- 1 root root 6886 Oct 8 13:52 docker-compose.yml drwxr-xr-x 4 root root 4096 Oct 8 00:31 env/ -rw-r--r-- 1 root root 1582 Oct 8 00:31 flake.lock -rw-r--r-- 1 root root 864 Oct 8 00:31 flake.nix -rwxr-xr-x 1 root root 149 Oct 8 00:31 install.sh* drwxr-xr-x 2 root root 4096 Oct 8 00:31 modules/ -rw-r--r-- 1 root root 3183 Oct 8 00:31 pull_request_template.md drwxr-xr-x 8 root root 4096 Oct 8 00:31 src/ drwxr-xr-x 6 root root 4096 Oct 8 00:31 var/ root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# ss -lntp | grep :3306 LISTEN 0 150 0.0.0.0:3306 0.0.0.0:* users:(("mysqld",pid=161356,fd=59)) root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# sudo ufw allow from 172.17.0.0/16 to any port 3306 sudo ufw reload Rule added Firewall reloaded root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 109 Server version: 5.7.44-log Source distribution Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> -- 1. 收回“全网”钥匙 mysql> REVOKE ALL ON *.* FROM 'acore'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> mysql> -- 2. 只开 3 个库 + 只给容器网段 mysql> GRANT ALL PRIVILEGES ON acore_auth.* TO 'acore'@'172.17.%.%'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> GRANT ALL PRIVILEGES ON acore_world.* TO 'acore'@'172.17.%.%'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON acore_characters.* TO 'acore'@'172.17.%.%'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> DROP USER 'root'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> -- 只留本地 mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> exit Bye root@ubuntu-s-2vcpu-8gb-160gb-intel-sfo3-01:/opt/azerothcore-wotlk#
20251008 2210 ...
浏览更多内容请先登录。
立即注册
更新于:2025-10-09 00:22:07
推荐内容