Complete C# server cutover
This commit is contained in:
@@ -4,44 +4,40 @@
|
||||
|
||||
ERROR: "Only one usage of each socket address ... is normally permitted"
|
||||
|
||||
This means port 7777 is already in use by another process.
|
||||
TCP port 7777 is already in use by another process.
|
||||
|
||||
QUICK FIXES:
|
||||
============
|
||||
QUICK FIX
|
||||
=========
|
||||
|
||||
Option 1: Use fix-port.bat / fix-port.sh (Recommended)
|
||||
------------------------------------------------------
|
||||
Windows: double-click fix-port.bat
|
||||
Linux / macOS: ./fix-port.sh
|
||||
Windows:
|
||||
fix-port.bat
|
||||
|
||||
Then choose an option:
|
||||
- Press 1 to kill the blocking process and restart
|
||||
- Press 2 to use a different port
|
||||
- Press 3 to cancel
|
||||
Linux / macOS:
|
||||
./fix-port.sh
|
||||
|
||||
Option 2: Manually change the port
|
||||
-----------------------------------
|
||||
1. Open commonwealth-server.json in a text editor
|
||||
2. Find the line: "port": 7777
|
||||
3. Change to a different port, e.g. "port": 8000
|
||||
4. Save the file
|
||||
5. Run start.bat (Windows) or ./start.sh (Linux / macOS) again
|
||||
Choose:
|
||||
1. Kill the process using TCP 7777 and restart
|
||||
2. Start on a different port
|
||||
3. Cancel
|
||||
|
||||
Option 3: Use the CLI with port override
|
||||
-----------------------------------------
|
||||
Open a terminal in the server folder and run:
|
||||
MANUAL PORT OVERRIDE
|
||||
====================
|
||||
|
||||
# Windows
|
||||
.venv\Scripts\python.exe -u consumer_server_cli.py serve --config commonwealth-server.json --port 8000
|
||||
Published Windows server:
|
||||
CommonwealthOnline.Server.exe serve --config commonwealth-server.json --port 8000
|
||||
|
||||
# Linux / macOS
|
||||
.venv/bin/python -u consumer_server_cli.py serve --config commonwealth-server.json --port 8000
|
||||
Published Linux server:
|
||||
./CommonwealthOnline.Server serve --config commonwealth-server.json --port 8000
|
||||
|
||||
If .venv does not exist yet, run start.bat / ./start.sh once first.
|
||||
Source checkout:
|
||||
dotnet run --project CommonwealthOnline.Server.csproj -- serve --config commonwealth-server.json --port 8000
|
||||
|
||||
Option 4: Find and kill the blocking process manually
|
||||
------------------------------------------------------
|
||||
Windows (Command Prompt as Administrator):
|
||||
You can also change "port" in commonwealth-server.json and restart.
|
||||
|
||||
FIND THE BLOCKING PROCESS
|
||||
=========================
|
||||
|
||||
Windows, Administrator Command Prompt:
|
||||
netstat -aon | find ":7777"
|
||||
taskkill /PID <PID> /F
|
||||
|
||||
@@ -49,22 +45,17 @@ Linux / macOS:
|
||||
lsof -i :7777
|
||||
kill -9 <PID>
|
||||
|
||||
CHECKING DIFFERENT PORTS:
|
||||
=========================
|
||||
GNS NOTE
|
||||
========
|
||||
|
||||
Common available ports:
|
||||
- 8000
|
||||
- 8080
|
||||
- 9000
|
||||
- 9999
|
||||
When GameNetworkingSockets is enabled, the server uses the same numeric game
|
||||
port over UDP. TCP and UDP are separate transports, but firewalls and router
|
||||
rules must allow the protocol you intend to use.
|
||||
|
||||
Choose any port between 1024 and 65535 that isn't in use.
|
||||
REMOTE HOSTING
|
||||
==============
|
||||
|
||||
FORWARDING FOR REMOTE CONNECTIONS:
|
||||
===================================
|
||||
|
||||
If using a non-standard port (not 7777), remember to:
|
||||
1. Forward that port on your router
|
||||
2. Tell remote players to connect to your_ip:port_number
|
||||
If you change the game port, update firewall/router rules and tell players the
|
||||
new host:port. Do not expose the localhost admin port (default TCP 7779).
|
||||
|
||||
================================================================================
|
||||
|
||||
Reference in New Issue
Block a user