AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   [L4D2]Plugins not reading modified CFG values on Linux (https://forums.alliedmods.net/showthread.php?t=305813)

KoMiKoZa 03-05-2018 06:35

[L4D2]Plugins not reading modified CFG values on Linux
 
Server version: 2.1.5.0 6801
OS: Linux Dedicated
MM version: 1.10.961 (latest)
SM version: 1.8.6041 (latest)

Found this topic from 8 years ago with the same issue with no solution. Think 8 years later you wouldn't experience anything like that.

I've recently rented 2 Linux servers from 2 different server hostings and both of them have this issue. The plugins work, create default CFGs on first launch, but modifying them has no effect whatsoever. You change cvars, save files, everything is alright, but the plugin still uses default values.

I have absolutely zero idea how to resolve this issue and thought maybe anyone running servers on Linux can shed some light on it. This is crucial for someone like me, who's planning to use a ton of plugins.

Everything worked fine on the old windows OS (different server, different hosting).

Thank you in advance.

UPD (Support response):

"The problem hasn't been mentioned by clients hosting any other source engine game, which would suggest that the problem is possibly only present in the L4D2 configuration file parser.

I would guess that the problem might be related to the different new line and/or end of file markers used in Linux. I've attached a list of the file content types of each of the .cfg files within your server's directory. This seems to indicate that the vast majority of them have CL RF (\r\n) line endings, which are normally used on Windows.

For further information, the Linux distribution our servers run is currently Ubuntu 14.04 x64."


UPD2:

The problem persists even after changing to Unix. But small .cfg files can actually be modified.


UPD3 (Support response):
"I've attached the full console log that is written when the server starts up, perhaps there's some useful information here.
We would certainly assume that the problem is related to "Cbuf_AddText: buffer overflow" which can be seen in the attached log file.

If the configuration options can be applied via the console/RCON after the server has started up, perhaps one roundabout solution would be to write a script which would automatically parse the .cfg files and execute each of the configuration items on RCON."


UPD4:

My talk with support ends here. They suggested to write a specific script. I don't want to deal with that and will look for other workarounds. For now it's recompiling the needed plugins in Spider and setting the default values in them to what I need.

UPD5:
Here.

I hope that one day this talk with myself will be useful for someone who finds themselves in the same situation. n_n)b

cravenge 03-08-2018 01:47

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
Check if those plugins have this:
Code:

<cvar>.AddChangeHook(<cvar change callback>)
If they do not, said plugins will ALWAYS use the default values they have before they were compiled.

Silvers 03-08-2018 02:18

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
Cvar Configs Updater

Quote:

Optionally with sm_configs_comment cvar set to "1", cvars which are using the default value will be commented out. (Prevents cvars not being read in at least L4D2 when a server has too many cvars/configs.)

Visual77 03-08-2018 03:41

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
I'm pretty certain all that it takes to solve this is to have a sourcemod plugin call ServerCommand(exec <config>);
on preferably OnMapStart or OnConfigsExecuted.

See this plugin if the one Silver has doesn't work. https://forums.alliedmods.net/showthread.php?t=143769

KoMiKoZa 03-09-2018 15:23

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
Quote:

Originally Posted by cravenge (Post 2581891)
Check if those plugins have this:
Code:

<cvar>.AddChangeHook(<cvar change callback>)
If they do not, said plugins will ALWAYS use the default values they have before they were compiled.

Quote:

Originally Posted by Silvers (Post 2581894)

Quote:

Originally Posted by Visual77 (Post 2581898)
I'm pretty certain all that it takes to solve this is to have a sourcemod plugin call ServerCommand(exec <config>);
on preferably OnMapStart or OnConfigsExecuted.

See this plugin if the one Silver has doesn't work. https://forums.alliedmods.net/showthread.php?t=143769

Thank you everyone for responding. Config loader made the CFGs load, I paired it with Silver's plugin. The problem is they are only read halfway, the rest of the CFGs gets cut no matter what.

I guess that's strictly Linux problem, have to restructure the CFGs or something of the sort. I have no idea.

Silvers 03-09-2018 16:43

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
How many cvars have you changed, not their default value? More than the overflow limit (whatever that may be)? Suprised "Sourcemod Config Loader" didn't work all the way. Maybe add some debug info and see if it gets stuck somewhere, can a malformed cvar config do that?

KoMiKoZa 03-09-2018 17:20

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
1 Attachment(s)
Quote:

Originally Posted by Silvers (Post 2582157)
How many cvars have you changed, not their default value? More than the overflow limit (whatever that may be)? Suprised "Sourcemod Config Loader" didn't work all the way. Maybe add some debug info and see if it gets stuck somewhere, can a malformed cvar config do that?

A lot of them. Plugins like varying infected, meleefix, weaponunlock, guncontrol and so on. I don't think commenting out default values is the problem here.

I'm trying to figure out the limit. It may be connected to the number of symbols in a line I suppose.

There's this .cfg, it has only 8 lines but one of them contains a long sentence. It's a server greeting. I dumbed it down to just 1 line with the cvar.

And this is the result in the game:
https://pp.userapi.com/c840220/v8402...DiHiOQgRK8.jpg

So it cuts the part of it.

I think I overdid with "half of the CFGs don't get executed". Perhaps it's line dependent. Just finished a full game and all the cvars seem to work.

It's pretty weird.

joetimmy 08-12-2018 16:56

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
I was facing the same 'Cbuf_AddText: buffer overflow' errors for l4d2 only on linux, where for some strange reason some cvars values from .cfg files weren't being loaded.

Found this plugin that fixed it right away: Buffer Overflow Fixer

KoMiKoZa 12-20-2018 14:36

Re: [L4D2]Plugins not reading modified CFG values on Linux
 
Quote:

Originally Posted by joetimmy (Post 2609844)
I was facing the same 'Cbuf_AddText: buffer overflow' errors for l4d2 only on linux, where for some strange reason some cvars values from .cfg files weren't being loaded.

Found this plugin that fixed it right away: Buffer Overflow Fixer

Thank you for the reply.

After quite a long time, I'm ready to state the following:

The plugins suggested here indeed help tremendously (huge thanks to Silvers and honorcode23). The "cutting text" problem seemed to be serverprovider-side. I changed the hosting and the new Linux server is blossoming.


All times are GMT -4. The time now is 04:57.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.