nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
130 stars 93 forks source link

WSL2 Linux Hosting #1786

Open Darsiniux opened 1 week ago

Darsiniux commented 1 week ago

I'm able to host the server correctly on the windows end using the standalone server. I'm having a issue hosting on my WSL instance because when I launch the server from the terminal the port keeps changing. (hid ip address)

Server: Module loaded I [14:19:51] [NWNX_Weapon] [Weapon.cpp:469] Set Devastating Critical Event Script to dev_crit I [14:19:54] [NWNX_ServerLogRedirector] [ServerLogRedirector.cpp:41] (Server) {Masterserver Advisory} Server is visible on public listing with address 00.000.000.000:64983. Your claimed port (5121) differs from the actual port (64983). {Masterserver Advisory} Server is visible on public listing with address 00.000.000.000:64983. Your claimed port (5121) differs from the actual port (64983).

My settings from nano run-server.sh are...

LD_PRELOAD=~/unified/Binaries/NWNX_Core.so \ ./nwserver-linux \ -module "Irrelevant" \ -maxclients 30 \ -minlevel 1 \ -maxlevel 40 \ -pauseandplay 0 \ -pvp 2 \ -servervault 1 \ -elc 1 \ -ilr 1 \ -gametype 3 \ -oneparty 0 \ -difficulty 3 \ -autosaveinterval 0 \ -playerpassword '' \ -dmpassword 'CheatModeEnabled' \ -servername 'Irrelevant' \ -publicserver 1 \ -reloadwhenempty 0 \ -port 5121

popd

Darsiniux commented 1 week ago

I've noticed that when I delete the -port 5121 setting I still get the same result. It's like that setting isn't doing anything whatsover. I'm really not sure what to do here. I've been at this for a long time trying to get this to work now. Somebody's gotta know something here. I've tried everything at this point on my end. There's something I must be missing that isn't documented about hosting on WSL2. It's probably something stupid that I overlooked. I can't find much documentation about hosting on WSL2 other than a couple pages.

I've even tried opening the port that it keeps jumping too and still no luck. I noticed that when I bring up the standalone server, the ip on the top matches the ip of my Ethernet adapter vEthernet (WSL (Hyper-V firewall)): However, the server runs off my IPv4 Address from the Wireless LAN adapter Wi-Fi: when I post it to the public server list. Both the windows & linux side run on the same IP address but the linux end keeps using the wrong port. I'm confident it would work fine if I could get the port to stick on 5121.

Not sure if that means anything but maybe it's something. Please help :)

Darsiniux commented 1 week ago

More info... This is what happens when I call the nwserver-linux directly without ./run-server.sh

cw174531@C3PO:~/server/bin/linux-x86$ ./nwserver-linux Neverwinter Nights Server Build: 8193.36-12 [05285dea] Copyright BioWare Corp 1998-2004 Registering crash signal handlers.

Server: Loading... Working Directory For Game Install Is: /home/cw174531/server Working Directory For Your Resources Is: /home/cw174531/.local/share/Neverwinter Nights Server: Running...

Server: Loading module "" Server: Unable to load module Server: Exiting...

Darsiniux commented 1 week ago

[Alias] MODELCOMPILER=/home/cw174531/.local/share/Neverwinter Nights/modelcompiler CACHE=/home/cw174531/.local/share/Neverwinter Nights/cache NWSYNC=/home/cw174531/.local/share/Neverwinter Nights/nwsync OLDSERVERVAULT=/home/cw174531/.local/share/Neverwinter Nights/servervault PATCH=/home/cw174531/.local/share/Neverwinter Nights/patch DEVELOPMENT=/home/cw174531/.local/share/Neverwinter Nights/development HD0=/home/cw174531/.local/share/Neverwinter Nights MODULES=/mnt/c/Users/cw174/Documents/Neverwinter Nights/modules SAVES=/home/cw174531/.local/share/Neverwinter Nights/saves OVERRIDE=/home/cw174531/.local/share/Neverwinter Nights/override HAK=/mnt/c/Users/cw174/Documents/Neverwinter Nights/hak SCREENSHOTS=/home/cw174531/.local/share/Neverwinter Nights/screenshots CURRENTGAME=/home/cw174531/.local/share/Neverwinter Nights/currentgame LOGS=/home/cw174531/.local/share/Neverwinter Nights/logs TEMP=/home/cw174531/.local/share/Neverwinter Nights/temp TEMPCLIENT=/home/cw174531/.local/share/Neverwinter Nights/tempclient LOCALVAULT=/home/cw174531/.local/share/Neverwinter Nights/localvault DMVAULT=/home/cw174531/.local/share/Neverwinter Nights/dmvault SERVERVAULT=/home/cw174531/.local/share/Neverwinter Nights/servervault DATABASE=/home/cw174531/.local/share/Neverwinter Nights/database PORTRAITS=/home/cw174531/.local/share/Neverwinter Nights/portraits AMBIENT=/home/cw174531/.local/share/Neverwinter Nights/ambient MOVIES=/home/cw174531/.local/share/Neverwinter Nights/movies MUSIC=/home/cw174531/.local/share/Neverwinter Nights/music TLK=/mnt/c/Users/cw174/Documents/Neverwinter Nights/tlk

Darsiniux commented 1 week ago

[Server Options] Game Port=5121 ServerDownTimer=180 CD Banned Behavior=0 [Banned Ips] 0= [Banned Players] 0= [Banned CD Keys] 0= [Profile] Group Room=274 [Login Information] Darsiniux=QRMA6EAM