Make systemd reload only single openvpn process and not the whole group2019 Community Moderator ElectionHow to start 2FA-using OpenVPN with systemd?Not sure what starts this systemd unit filesystemd says permission denied for /bin/shmysql service restarted during user being connected lead to failing servicesystemd and OpenVPN woes after an Ubuntu upgradeWhy x0vncserver is not starting at boot?How to restart systemd service after files update under Gunicorn server?Not sure what starts this systemd unit fileWhy is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullyStopping systemd unit together with another. Starting workssystemd not autorestarting the last docker container after it crashes or kill -9 or docker stop service
Circuit Analysis: Obtaining Close Loop OP - AMP Transfer function
Is this toilet slogan correct usage of the English language?
Giving feedback to someone without sounding prejudiced
What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?
Shouldn’t conservatives embrace universal basic income?
Why Shazam when there is already Superman?
What kind of floor tile is this?
How could a planet have erratic days?
How do you make your own symbol when Detexify fails?
Why is it that I can sometimes guess the next note?
What is the highest possible scrabble score for placing a single tile
Doesn't the system of the Supreme Court oppose justice?
Non-trope happy ending?
What does Apple's new App Store requirement mean
How would you translate "more" for use as an interface button?
C++ copy constructor called at return
How to get directions in deep space?
I found an audio circuit and I built it just fine, but I find it a bit too quiet. How do I amplify the output so that it is a bit louder?
What is going on with gets(stdin) on the site coderbyte?
A variation to the phrase "hanging over my shoulders"
What (the heck) is a Super Worm Equinox Moon?
What is the English pronunciation of "pain au chocolat"?
Is my low blitz game drawing rate at www.chess.com an indicator that I am weak in chess?
Can I cause damage to electrical appliances by unplugging them when they are turned on?
Make systemd reload only single openvpn process and not the whole group
2019 Community Moderator ElectionHow to start 2FA-using OpenVPN with systemd?Not sure what starts this systemd unit filesystemd says permission denied for /bin/shmysql service restarted during user being connected lead to failing servicesystemd and OpenVPN woes after an Ubuntu upgradeWhy x0vncserver is not starting at boot?How to restart systemd service after files update under Gunicorn server?Not sure what starts this systemd unit fileWhy is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullyStopping systemd unit together with another. Starting workssystemd not autorestarting the last docker container after it crashes or kill -9 or docker stop service
I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the whole group of processes:
May 27 12:09:44 tritone systemd[1]: openvpn@client_uk.service: main process exited, code=exited, status=1/FAILURE
May 27 12:09:44 tritone systemd[1]: Unit openvpn@client_uk.service entered failed state.
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_rhode...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN connection to client_uk...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_ukraine...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to server_udp...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Started OpenVPN service.
...
This is as well undesired as superfluous imho. Restarting the single failed service would suffice. This is the systemd config from /etc/systemd/system/multi-user.target.wants/openvpn.service
:
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target
I have seen configs, where ExecReload had been set to kill -HUP $MAINPID
, and also my server seems to do this, as systemctl status says:
Process: 5893 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
So what I don't understand, where is this kill command defined, if the systemd config ExecReload actually says otherwise? Also, why is the service getting restarted, even if Type=oneshot
is defined? Am I looking at the right file at all?
And how should the restart command look like? Kill won't work, as the process is supposedly dead already.
Edit: I found /lib/systemd/system-generators/openvpn-generator
and /lib/systemd/system/openvpn@.service
now, nevertheless, it remains unclear, when they get run or executed. The generator seems to fail, as none of the links actually got created, probably due to selinux restrictions. Nevertheless, this file seems to be used for init. So I wonder, why is the dummy file /etc/systemd/system/multi-user.target.wants/openvpn.service
created at all?
systemd openvpn
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the whole group of processes:
May 27 12:09:44 tritone systemd[1]: openvpn@client_uk.service: main process exited, code=exited, status=1/FAILURE
May 27 12:09:44 tritone systemd[1]: Unit openvpn@client_uk.service entered failed state.
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_rhode...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN connection to client_uk...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_ukraine...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to server_udp...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Started OpenVPN service.
...
This is as well undesired as superfluous imho. Restarting the single failed service would suffice. This is the systemd config from /etc/systemd/system/multi-user.target.wants/openvpn.service
:
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target
I have seen configs, where ExecReload had been set to kill -HUP $MAINPID
, and also my server seems to do this, as systemctl status says:
Process: 5893 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
So what I don't understand, where is this kill command defined, if the systemd config ExecReload actually says otherwise? Also, why is the service getting restarted, even if Type=oneshot
is defined? Am I looking at the right file at all?
And how should the restart command look like? Kill won't work, as the process is supposedly dead already.
Edit: I found /lib/systemd/system-generators/openvpn-generator
and /lib/systemd/system/openvpn@.service
now, nevertheless, it remains unclear, when they get run or executed. The generator seems to fail, as none of the links actually got created, probably due to selinux restrictions. Nevertheless, this file seems to be used for init. So I wonder, why is the dummy file /etc/systemd/system/multi-user.target.wants/openvpn.service
created at all?
systemd openvpn
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
1
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22
add a comment |
I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the whole group of processes:
May 27 12:09:44 tritone systemd[1]: openvpn@client_uk.service: main process exited, code=exited, status=1/FAILURE
May 27 12:09:44 tritone systemd[1]: Unit openvpn@client_uk.service entered failed state.
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_rhode...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN connection to client_uk...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_ukraine...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to server_udp...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Started OpenVPN service.
...
This is as well undesired as superfluous imho. Restarting the single failed service would suffice. This is the systemd config from /etc/systemd/system/multi-user.target.wants/openvpn.service
:
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target
I have seen configs, where ExecReload had been set to kill -HUP $MAINPID
, and also my server seems to do this, as systemctl status says:
Process: 5893 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
So what I don't understand, where is this kill command defined, if the systemd config ExecReload actually says otherwise? Also, why is the service getting restarted, even if Type=oneshot
is defined? Am I looking at the right file at all?
And how should the restart command look like? Kill won't work, as the process is supposedly dead already.
Edit: I found /lib/systemd/system-generators/openvpn-generator
and /lib/systemd/system/openvpn@.service
now, nevertheless, it remains unclear, when they get run or executed. The generator seems to fail, as none of the links actually got created, probably due to selinux restrictions. Nevertheless, this file seems to be used for init. So I wonder, why is the dummy file /etc/systemd/system/multi-user.target.wants/openvpn.service
created at all?
systemd openvpn
I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the whole group of processes:
May 27 12:09:44 tritone systemd[1]: openvpn@client_uk.service: main process exited, code=exited, status=1/FAILURE
May 27 12:09:44 tritone systemd[1]: Unit openvpn@client_uk.service entered failed state.
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_rhode...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN connection to client_uk...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_ukraine...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to server_udp...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Started OpenVPN service.
...
This is as well undesired as superfluous imho. Restarting the single failed service would suffice. This is the systemd config from /etc/systemd/system/multi-user.target.wants/openvpn.service
:
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target
I have seen configs, where ExecReload had been set to kill -HUP $MAINPID
, and also my server seems to do this, as systemctl status says:
Process: 5893 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
So what I don't understand, where is this kill command defined, if the systemd config ExecReload actually says otherwise? Also, why is the service getting restarted, even if Type=oneshot
is defined? Am I looking at the right file at all?
And how should the restart command look like? Kill won't work, as the process is supposedly dead already.
Edit: I found /lib/systemd/system-generators/openvpn-generator
and /lib/systemd/system/openvpn@.service
now, nevertheless, it remains unclear, when they get run or executed. The generator seems to fail, as none of the links actually got created, probably due to selinux restrictions. Nevertheless, this file seems to be used for init. So I wonder, why is the dummy file /etc/systemd/system/multi-user.target.wants/openvpn.service
created at all?
systemd openvpn
systemd openvpn
edited May 27 '15 at 13:43
Michael
asked May 27 '15 at 11:57
MichaelMichael
1207
1207
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
1
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22
add a comment |
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
1
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
1
1
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22
add a comment |
1 Answer
1
active
oldest
votes
you could try systemctl restart openvpn@CONFIGNAME.service
if you use CONFIGNAME as your config file name for your .conf file ...
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f205859%2fmake-systemd-reload-only-single-openvpn-process-and-not-the-whole-group%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you could try systemctl restart openvpn@CONFIGNAME.service
if you use CONFIGNAME as your config file name for your .conf file ...
add a comment |
you could try systemctl restart openvpn@CONFIGNAME.service
if you use CONFIGNAME as your config file name for your .conf file ...
add a comment |
you could try systemctl restart openvpn@CONFIGNAME.service
if you use CONFIGNAME as your config file name for your .conf file ...
you could try systemctl restart openvpn@CONFIGNAME.service
if you use CONFIGNAME as your config file name for your .conf file ...
answered Aug 9 '18 at 1:57
dominixdominix
8518
8518
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f205859%2fmake-systemd-reload-only-single-openvpn-process-and-not-the-whole-group%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you provide the output of the following commands: $ systemctl -t service | grep openvpn and the output of $ systemctl cat <....>.service for each line from the previous command?
– Siosm
Apr 7 '17 at 8:43
1
Much of this is answered at unix.stackexchange.com/questions/378749 and at unix.stackexchange.com/questions/206058 .
– JdeBP
Sep 22 '17 at 8:22