Raised This Month: $12 Target: $400
 3% 

[L4D2]Plugins not reading modified CFG values on Linux


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KoMiKoZa
Senior Member
Join Date: Dec 2017
Location: Thy old times.
Old 03-05-2018 , 06:35   [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #1

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

Last edited by KoMiKoZa; 12-20-2018 at 14:38. Reason: Problem resolved
KoMiKoZa is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 03-08-2018 , 01:47   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #2

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.
cravenge is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-08-2018 , 02:18   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #3

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.)
__________________
Silvers is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 03-08-2018 , 03:41   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #4

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

Last edited by Visual77; 03-08-2018 at 03:53.
Visual77 is offline
KoMiKoZa
Senior Member
Join Date: Dec 2017
Location: Thy old times.
Old 03-09-2018 , 15:23   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #5

Quote:
Originally Posted by cravenge View Post
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 View Post
Quote:
Originally Posted by Visual77 View Post
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.
KoMiKoZa is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-09-2018 , 16:43   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #6

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?
__________________
Silvers is offline
KoMiKoZa
Senior Member
Join Date: Dec 2017
Location: Thy old times.
Old 03-09-2018 , 17:20   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #7

Quote:
Originally Posted by Silvers View Post
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:


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.
Attached Files
File Type: cfg onJoin.cfg (170 Bytes, 164 views)

Last edited by KoMiKoZa; 03-09-2018 at 17:23.
KoMiKoZa is offline
joetimmy
Junior Member
Join Date: Jun 2017
Old 08-12-2018 , 16:56   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #8

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
joetimmy is offline
KoMiKoZa
Senior Member
Join Date: Dec 2017
Location: Thy old times.
Old 12-20-2018 , 14:36   Re: [L4D2]Plugins not reading modified CFG values on Linux
Reply With Quote #9

Quote:
Originally Posted by joetimmy View Post
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.

Last edited by KoMiKoZa; 12-20-2018 at 14:40.
KoMiKoZa is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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