nwnxee / unified

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

NWNX Setup problem #1531

Open navvator opened 2 years ago

navvator commented 2 years ago

Hello. I am setup nwnxee under windows 10 wsl ubuntu 18. my server starting, but without nwnx :(

` GNU nano 2.9.3 /home/skaye/.local/share/logs/mod-1655696846.txt
Working Directory For Game Install Is: /home/skaye/server Working Directory For Your Resources Is: /home/skaye/.local/share/Neverwinter Nights Neverwinter Nights Server Build: 8193.34 [8507d5a9] Copyright BioWare Corp 1998-2004 Registering crash signal handlers.

Server: Loading... Server: Running...

NWSync: You gave a url, but no hash. Fetching http://217.197.203.209:90/NWNSyncData/latest. NWSync: We're now advertising 21a843e0fb3756b8eed84ae28897fbc34d1710a4 Server: Loading module "nameless_lands2_2-35-00"............................................................................................................................................................................................$Server: Module loaded `

My run server script file:

`

!/bin/bash

Set the names for your server/module here

MODNAME=nameless_lands2_2-35-00

pushd home/skaye/server/bin/linux-x86

status=$(~/.local/share/Neverwinter\ Nights/mod-status.sh) if [ "$status" -eq "1" ]; then echo "$MODNAME is already running" exit; fi

if [ -f ~/.local/share/nwn/.mod-maintenance ]; then echo "$MODNAME maintenance in progress (.mod-maintenance file exists), not starting" exit; fi

Make a backup of all characters each time the server restarts

./mod-savechars.sh

pushd /home/skaye/server/bin/linux-x86

Log levels go from 2 (only fatal errors) to 7 (very verbose). 6 is recommended

export NWNX_CORE_SKIP_ALL=y export NWNX_CORE_LOAD_PATH=home/skaye/unified/Binaries export NWNX_CORE_LOG_LEVEL=7

export NWNX_SERVERLOGREDIRECTOR_SKIP=n export NWNX_SERVERLOGREDIRECTOR_LOG_LEVEL=7

These plugins should all work, enable when needed

You can check a plugin's README for additional environment variables you can set:

https://github.com/nwnxee/unified/tree/master/Plugins

export NWNX_ADMINISTRATION_SKIP=y export NWNX_APPEARANCE_SKIP=y export NWNX_AREA_SKIP=y export NWNX_CHAT_SKIP=y export NWNX_COMBATMODES_SKIP=y export NWNX_CREATURE_SKIP=y export NWNX_DAMAGE_SKIP=y export NWNX_DIALOG_SKIP=y export NWNX_ELC_SKIP=y export NWNX_EFFECT_SKIP=y export NWNX_ENCOUNTER_SKIP=y export NWNX_EVENTS_SKIP=y export NWNX_FEEDBACK_SKIP=y export NWNX_ITEM_SKIP=y export NWNX_ITEMPROPERTY_SKIP=y export NWNX_MAXLEVEL_SKIP=y export NWNX_NOSTACK_SKIP=y export NWNX_OBJECT_SKIP=y export NWNX_OPTIMIZATIONS_SKIP=y export NWNX_PLAYER_SKIP=y export NWNX_RACE_SKIP=y export NWNX_REGEX_SKIP=y export NWNX_RENAME_SKIP=y export NWNX_REVEAL_SKIP=y export NWNX_SKILLRANKS_SKIP=y export NWNX_THREADWATCHDOG_SKIP=y export NWNX_TILESET_SKIP=y export NWNX_TWEAKS_SKIP=y export NWNX_UTIL_SKIP=y export NWNX_VISIBILITY_SKIP=y export NWNX_WEAPON_SKIP=y export NWNX_WEBHOOK_SKIP=y

Advanced plugins most people won't use, so skip them by default.

export NWNX_JVM_SKIP=y export NWNX_MONO_SKIP=y export NWNX_THREADWATCHDOG_SKIP=y export NWNX_PROFILER_SKIP=y export NWNX_METRICS_INFLUXDB_SKIP=y export NWNX_RUBY_SKIP=y export NWNX_REDIS_SKIP=y export NWNX_LUA_SKIP=y export NWNX_SPELLCHECKER_SKIP=y export NWNX_TRACKING_SKIP=y

Set you DB connection info here

export NWNX_SQL_TYPE=mysql export NWNX_SQL_HOST=localhost export NWNX_SQL_USERNAME=nl_shard export NWNX_SQL_PASSWORD=nl_shard export NWNX_SQL_DATABASE=nl_shard export NWNX_SQL_QUERY_METRICS=true

#

Custom behavior tweaks from the NWNX_Tweaks plugin. Uncomment/modify to enable

#

HP players need to reach to be considered dead

export NWNX_TWEAKS_PLAYER_DYING_HP_LIMIT=-10

Disable pausing by players and DMs

export NWNX_TWEAKS_DISABLE_PAUSE=y

Disable DM quicksave ability

export NWNX_TWEAKS_DISABLE_QUICKSAVE=y

Stackable items can only be merged if all local variables are the same

export NWNX_TWEAKS_COMPARE_VARIABLES_WHEN_MERGING=y

Parry functions as per description, instead of blocking max 3 attacks per round

export NWNX_TWEAKS_PARRY_ALL_ATTACKS=y

Immunity to Critical Hits does not confer immunity to sneak attack

export NWNX_TWEAKS_SNEAK_ATTACK_IGNORE_CRIT_IMMUNITY=y

Items are not destroyed when they reach 0 charges

export NWNX_TWEAKS_PRESERVE_DEPLETED_ITEMS=y

Fix some intel crashes by disabling some shadows on areas

export NWNX_TWEAKS_DISABLE_SHADOWS=y

Keep all logs in this directory

LOGFILE=~/.local/share/logs/mod-date +%s.txt touch $LOGFILE rm ~/.local/share/logs/last ln -s $LOGFILE ~/.local/share/logs/last echo "Starting nameless_lands2_2-35-00.mod. Log is $LOGFILE"

Set game options below

LD_PRELOAD=home/skaye/unified/Binaries/NWNX_Core.so \ ./nwserver-linux \ -module "nameless_lands2_2-35-00" \ -maxclients 20 \ -minlevel 1 \ -maxlevel 40 \ -pauseandplay 0 \ -pvp 2 \ -servervault 1 \ -elc 0 \ -ilr 1 \ -gametype 3 \ -oneparty 0 \ -difficulty 3 \ -autosaveinterval 0 \ -nwsyncurl http://217.197.203.209:90/NWNSyncData \ -dmpassword '1234' \ -servername 'Nameless Lands RUS' \ -publicserver 1 \ -reloadwhenempty 0 \ -port 5121 \ "$@" >> $LOGFILE 2>&1 &

popd `

and my compiling NWNX log:

`root@DESKTOP-391CDF9:~/unified# ./Scripts/buildnwnx.sh ~/unified/build-nwnx ~/unified -- Found LuaJIT library: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so CMake Warning at Plugins/SQL/CMakeLists.txt:21 (message): Not compiling with PostgreSQL support, not found

-- Could NOT find SWIG: Found unsuitable version "3.0.12", but required is at least "4.0" (found /usr/bin/swig3.0) -- Could NOT find HUNSPELL (missing: HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR) -- Configuring done -- Generating done -- Build files have been written to: /home/skaye/unified/build-nwnx [ 4%] Built target distorm [ 7%] Built target funchook [ 15%] Built target NWNXLib [ 16%] Built target Core [ 16%] Built target Administration [ 17%] Built target Appearance [ 18%] Built target Area [ 18%] Built target Chat [ 19%] Built target Compiler [ 20%] Built target Creature [ 21%] Built target Damage [ 22%] Built target Diagnostics [ 22%] Built target Dialog [ 23%] Built target DotNET [ 24%] Built target ELC [ 25%] Built target Effect [ 26%] Built target Encounter [ 39%] Built target Events [ 41%] Built target Experimental [ 42%] Built target Feat [ 43%] Built target Feedback [ 43%] Built target Item [ 44%] Built target ItemProperty [ 45%] Built target Lua [ 46%] Built target MaxLevel [ 47%] Built target Metrics_InfluxDB [ 47%] Built target NoStack [ 48%] Built target Object [ 51%] Built target Optimizations [ 51%] Built target Player [ 56%] Built target Profiler [ 56%] Built target Race [ 65%] Built target tacopie [ 71%] Built target cpp_redis [ 74%] Built target Redis [ 74%] Built target Regex [ 75%] Built target Rename [ 76%] Built target Reveal [ 77%] Built target Ruby [ 78%] Built target SQL [ 79%] Built target ServerLogRedirector [ 80%] Built target SkillRanks [ 81%] Built target ThreadWatchdog [ 81%] Built target Tileset [ 82%] Built target Tracking [ 97%] Built target Tweaks [ 98%] Built target Util [ 99%] Built target Visibility [100%] Built target Weapon [100%] Built target WebHook ~/unified Zipping NWScripts...`

Where is my mistake?

urothis commented 2 years ago
Not compiling with PostgreSQL support, not found

-- Could NOT find SWIG: Found unsuitable version "3.0.12", but required is at least "4.0" (found /usr/bin/swig3.0)
-- Could NOT find HUNSPELL (missing: HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR)

Missing deps

navvator commented 2 years ago

Thank you! I think it is my problem.

navvator commented 2 years ago

Now i installing Ubunt 20 wsl and in compiling NWNX have same error: Could NOT find HUNSPELL (missing: HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR) But i have Hunspell 1.7.0 skaye@DESKTOP-391CDF9:~$ hunspell Hunspell 1.7.0

Whats the matter?

mtijanic commented 2 years ago

Hi @navvator. Unless you need those specific plugins, the missing deps are not relevant. From what I understand of your initial post, your issue is that no NWNX plugins are loaded at all?

I believe your issue is this line:

LD_PRELOAD=home/skaye/unified/Binaries/NWNX_Core.so

You're missing an extra / after =. It should be:

LD_PRELOAD=/home/skaye/unified/Binaries/NWNX_Core.so
navvator commented 2 years ago

Hello again! Sorry i was busy... Ok, nwnX in now running, but i got now, i think, the last problem: NWNX info:

Arvirago commented 2 years ago

Maybe you have the plugin disabled? This is my mysql config, in case it helps you:

# SQL plugin. Set you DB connection info here
export NWNX_SQL_TYPE=mysql
export NWNX_SQL_HOST=localhost
export NWNX_SQL_USERNAME=myuser
export NWNX_SQL_PASSWORD=mypasswd
export NWNX_SQL_DATABASE=aldor
export NWNX_SQL_QUERY_METRICS=true
export NWNX_SQL_CHARACTER_SET=utf8
export NWNX_SQL_USE_UTF8=y
export NWNX_SQL_LOG_LEVEL=5
navvator commented 2 years ago

I have this part of config for mysql:

Set you DB connection info here

export NWNX_SQL_TYPE=mysql export NWNX_SQL_HOST=localhost export NWNX_SQL_USERNAME=nl_shard export NWNX_SQL_PASSWORD=nl_shard export NWNX_SQL_DATABASE=nl_shard export NWNX_SQL_QUERY_METRICS=true export NWNX_SQL_CHARACTER_SET=utf8 export NWNX_SQL_USE_UTF8=y export NWNX_SQL_LOG_LEVEL=5

And i have my mysql table in utf8_general_ci. I can log in in phpmyadmin with my database login and password... Maybe it need more rights?

Daztek commented 2 years ago

But do you have export NWNX_SQL_SKIP=n somewhere?

navvator commented 2 years ago

No, i have not have export NWNX_SQL_SKIP=n anyway. i am tasted: my virtual linux have coonect to my mysql base:

skaye@DESKTOP-391CDF9:~$ telnet localhost 3306 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Y 5.5.5-10.4.24-MariaDB�Oc$'7}3#��-T]W{*Zeny5;gmysql_native_password

I think. its problem with NWNX, but i dont understand whats up...

Daztek commented 2 years ago

If you do not have export NWNX_SQL_SKIP=n in your startup script it will not load the SQL plugin.

navvator commented 2 years ago

I set now in runtime script Export NWN_SQL_SKIP=n and nothing changed.. It wrote to me: NWNX info:

navvator commented 2 years ago

What i can do else?

minikanyas commented 2 years ago

I set now in runtime script Export NWN_SQL_SKIP=n and nothing changed.. It wrote to me: NWNX info:

  • Leto Disabled
  • NWNX Database disabled.

You're missing an X in the env var name, it should be NWNX_SQL_SKIP=n

navvator commented 2 years ago

Sorry, my misstake. I setted export NWNX_SQL_SKIP=n ofcourse.

navvator commented 1 year ago

Hello again) I am now try runing my server at sudo and have same error: [22:19:13] [NWNX_SQL] [SQL.cpp:121] Reconnect attempt 1 out of 19 failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I have not this file in this path and dont have the mysql server on my virtual linux, i have it on my main windows 10... I need install mysql on virtual linux to work with NWNX, or what?

navvator commented 1 year ago

I am set my local IP adress in localhost (export NWNX_SQL_HOST=localhost) And ITS FINALLY WORK!!!!!!!!!!!! (Ofcorse only at root) Thank you, guys!!!!!!!!

varenx commented 1 year ago

Hi, as a note, don't run nwn server as root, and don't connect to mysql server as root either. Create non-privileged user for everything. The reason MySQL refused your connection above was that you tried to connect as the 'root' user which is only allowed with sudo by default.

Arvirago commented 1 year ago

Guess this can be closed