You are not logged in.

#1 2014-09-13 20:55:34

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

SystemD Values Get Reset to Default after some Time

Hi,

I'm using two machine as gateways and Keepalive HA load balancers, so I've enabled some kernel options, but after some time (the next day or so), these options have been reset to their default (disabled) values.
Why does that happen, and how to stop that from happening?

I have to reset the parameters each time. I could set up a script to run on a schedule, but I would like to prevent it from happening in the first place.

These are the values which get reset to 0 (this time):
    net.ipv4.conf.all.accept_redirects
    net.ipv4.vs.conntrack
    net.ipv4.vs.expire_nodest_conn
    net.ipv4.vs.expire_quiescent_template

Thank you.

Offline

#2 2014-09-13 21:28:08

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: SystemD Values Get Reset to Default after some Time

AGT wrote:

so I've enabled some kernel options,

How? I suspect the problem might be here.

You should define those options in a script file on /etc/sysctl.d/. See http://www.freedesktop.org/software/sys … ctl.d.html

Offline

#3 2014-09-13 21:35:15

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

Re: SystemD Values Get Reset to Default after some Time

That is how I did it: I wrote them in the configuration file "/etc/sysctl.d/99-sysctl.conf".

Offline

#4 2014-09-17 13:36:14

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: SystemD Values Get Reset to Default after some Time

Anything in the journal about the changes?
Maybe it's related to

man sysctl wrote:

Notes
Please note that modules loaded after sysctl is run may override the settings (example: sunrpc.* settings are overridden when the sunrpc module is loaded)...

Offline

#5 2014-09-17 17:38:40

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

Re: SystemD Values Get Reset to Default after some Time

I didn't find anything in the journal, but I am curious about what I did find: every 1-3 seconds, there is an entry which is repeated: "sshd[<Number>]: Set /proc/self/oom_score_adj to 0". What does it mean? I've been scrolling for the last few days-worth of this message, and there is still more... I also have many attempts to log in via ssh from China, from multiple IP addresses, with various user names and many unsuccessful authentication attempts for root; maybe the entry is related to these attempts...

Going back to the original discussion, I think I've seen someone mention a systemd service or something like that which resets kernel settings, or some other things, to their default values, in a post (here), but I didn't find it again. Is there such a service that does something like that?

It is strange that since I started this thread, and since I reset the settings to 1, they have remained at 1. I notice that it happens irregularly.

Offline

#6 2014-09-17 21:36:51

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: SystemD Values Get Reset to Default after some Time

Note the quote in my post above was from "man sysctl.conf". If it is a module changing them and the module was loaded before you re-ran your 99-sysctl.conf, this would explain they stay put.

Offline

#7 2014-09-22 18:56:12

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

Re: SystemD Values Get Reset to Default after some Time

How can I check if there is anything that may be resetting the values? It seems that they have not changed after I set them again (after startup), this time.
Thank you.

Offline

Board footer

Powered by FluxBB