Was working before upgrade to f27. Now:
sudo systemctl start openvpn@client-ibecker2 Failed to start openvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
According to https://fedoraproject.org/wiki/Openvpn#Working_with_systemd
I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as it's been since 2015).
I don't know why this isn't working, or how to debug it (systemctl doesn't seem to have any debug flags)
Is the .service file in /etc/systemd/system ? [0:root@elmo ~ 2]$ ls -lZ /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug 6 2015 /etc/systemd/system/openvpn@server.service Of course yours would be openvpn@client-ibecker2.service
Bill
On 11/22/2017 7:02 AM, Neal Becker wrote:
Was working before upgrade to f27. Now:
sudo systemctl start openvpn@client-ibecker2 Failed to start openvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
According to https://fedoraproject.org/wiki/Openvpn#Working_with_systemd
I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as it's been since 2015).
I don't know why this isn't working, or how to debug it (systemctl doesn't seem to have any debug flags) _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
yeah somethings changed it used to be simple now we have to create/copy files to systemd.... i just went through this today also
specifically in Section 5. Setting up automatic OpenVPN connection on system start *This step requires that you set up automatic login from the previous step.
https://hide.me/en/vpnsetup/fedora/openvpn/
On Wed, Nov 22, 2017 at 5:50 PM, Bill Shirley bshirley@memphis.apirx.biz wrote:
Is the .service file in /etc/systemd/system ? [0:root@elmo ~ 2]$ ls -lZ /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug 6 2015 /etc/systemd/system/openvpn@server.service Of course yours would be openvpn@client-ibecker2.service
Bill
On 11/22/2017 7:02 AM, Neal Becker wrote:
Was working before upgrade to f27. Now:
sudo systemctl start openvpn@client-ibecker2 Failed to start openvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
According to https://fedoraproject.org/wiki/Openvpn#Working_with_systemd
I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as it's been since 2015).
I don't know why this isn't working, or how to debug it (systemctl doesn't seem to have any debug flags) _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Putting your localized file in /lib/systemd/system is the problem. The upgrade wiped it out. Localizations should go in /etc/systemd/system
The Fedora 25 /lib/systemd/system/openvpn.service unit file from the rpm: [Unit] Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I After=network.target
[Service] PrivateTmp=true Type=forking PIDFile=/var/run/openvpn/%i.pid ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
[Install] WantedBy=multi-user.target This file should not be edited.
My /etc/systemd/system/openvpn@server.service that I created: .include /lib/systemd/system/openvpn@.service
[Unit] After=syslog.target After=network.target
[Service] Environment="OPENSSL_ENABLE_MD5_VERIFY=1"
The text between the @ and the dot ('server') in the unit name becomes the %i variable for the unit file. In this case, it's the config file name and the pid file name: [0:root@elmo ~]$ ls -lZ /etc/openvpn/server.conf /var/run/openvpn/server.pid -rw-r-----. 1 root root system_u:object_r:openvpn_etc_t:s0 11400 Jul 24 07:07 /etc/openvpn/server.conf -rw-r--r--. 1 root root system_u:object_r:openvpn_var_run_t:s0 5 Nov 18 20:55 /var/run/openvpn/server.pid
HTH, Bill
On 11/22/2017 12:13 PM, Outback Dingo wrote:
yeah somethings changed it used to be simple now we have to create/copy files to systemd.... i just went through this today also
specifically in Section 5. Setting up automatic OpenVPN connection on system start *This step requires that you set up automatic login from the previous step.
https://hide.me/en/vpnsetup/fedora/openvpn/
On Wed, Nov 22, 2017 at 5:50 PM, Bill Shirley bshirley@memphis.apirx.biz wrote:
Is the .service file in /etc/systemd/system ? [0:root@elmo ~ 2]$ ls -lZ /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug 6 2015 /etc/systemd/system/openvpn@server.service Of course yours would be openvpn@client-ibecker2.service
Bill
On 11/22/2017 7:02 AM, Neal Becker wrote:
Was working before upgrade to f27. Now:
sudo systemctl start openvpn@client-ibecker2 Failed to start openvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
According to https://fedoraproject.org/wiki/Openvpn#Working_with_systemd
I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as it's been since 2015).
I don't know why this isn't working, or how to debug it (systemctl doesn't seem to have any debug flags) _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Bill Shirley wrote:
Is the .service file in /etc/systemd/system ? [0:root@elmo ~ 2]$ ls -lZ /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug 6 2015 /etc/systemd/system/openvpn@server.service Of course yours would be openvpn@client-ibecker2.service
Bill
On 11/22/2017 7:02 AM, Neal Becker wrote:
Was working before upgrade to f27. Now:
sudo systemctl start openvpn@client-ibecker2 Failed to start openvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
According to https://fedoraproject.org/wiki/Openvpn#Working_with_systemd
I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as it's been since 2015).
I don't know why this isn't working, or how to debug it (systemctl doesn't seem to have any debug flags) _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
I have: ls -lZ /etc/systemd/system/multi-user.target.wants/openvpn@client- ibecker2.service lrwxrwxrwx. 1 root root system_u:object_r:systemd_unit_file_t:s0 40 May 28 2015 /etc/systemd/system/multi-user.target.wants/openvpn@client- ibecker2.service -> /usr/lib/systemd/system/openvpn@.service
My link is in /etc/systemd/system/multi-user.target.wants, not in /etc/systemd/system. Is this not correct?
That link is for something different. It's automatically created by the systemctl enable command. I have one too: [0:root@elmo ~]$ ls -lZ /etc/systemd/system/multi-user.target.wants/openvpn@server.service lrwxrwxrwx. 1 root root system_u:object_r:systemd_unit_file_t:s0 42 Jul 17 2015 /etc/systemd/system/multi-user.target.wants/openvpn@server.service -> /etc/systemd/system/openvpn@server.service
What we've been talking about is the unit file (openvpn@client-ibecker2.service).
Your original post:
sudo systemctl start openvpn@client-ibecker2 Failed to startopenvpn@client-ibecker2.service: Unit openvpn@client- ibecker2.service not found.
says 'not found'. There is no unit file in either /lib/systemd/system/ nor /etc/systemd/system/
Bill
On 11/22/2017 2:01 PM, Neal Becker wrote:
I have: ls -lZ /etc/systemd/system/multi-user.target.wants/openvpn@client- ibecker2.service lrwxrwxrwx. 1 root root system_u:object_r:systemd_unit_file_t:s0 40 May 28 2015 /etc/systemd/system/multi-user.target.wants/openvpn@client- ibecker2.service -> /usr/lib/systemd/system/openvpn@.service
My link is in /etc/systemd/system/multi-user.target.wants, not in /etc/systemd/system. Is this not correct?
On 22.11.2017 20:59, Bill Shirley wrote:
What we've been talking about is the unit file (openvpn@client-ibecker2.service).
Since fc26 (if i remembered correctly) there were separate systemd units for openvpn server and client configurations.
/usr/lib/systemd/system/openvpn-client@.service /usr/lib/systemd/system/openvpn-server@.service
Based on that, you should have a config file in /etc/openvpn/client/ (ibecker2.conf for example) and your systemd unit file should be openvpn-client@ibecker2.service
best regards Ulf
I have just moved all configs and certificates to /etc/openvpn/client/. And I launch the client as 'systemctl start openvpn-client@myconnection'
On Thu, Nov 23, 2017, 12:02 AM Ulf Volmer u.volmer@u-v.de wrote:
On 22.11.2017 20:59, Bill Shirley wrote:
What we've been talking about is the unit file (openvpn@client-ibecker2.service).
Since fc26 (if i remembered correctly) there were separate systemd units for openvpn server and client configurations.
/usr/lib/systemd/system/openvpn-client@.service /usr/lib/systemd/system/openvpn-server@.service
Based on that, you should have a config file in /etc/openvpn/client/ (ibecker2.conf for example) and your systemd unit file should be openvpn-client@ibecker2.service
best regards Ulf _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
Ulf Volmer wrote:
On 22.11.2017 20:59, Bill Shirley wrote:
What we've been talking about is the unit file (openvpn@client-ibecker2.service).
Since fc26 (if i remembered correctly) there were separate systemd units for openvpn server and client configurations.
/usr/lib/systemd/system/openvpn-client@.service /usr/lib/systemd/system/openvpn-server@.service
Based on that, you should have a config file in /etc/openvpn/client/ (ibecker2.conf for example) and your systemd unit file should be openvpn-client@ibecker2.service
best regards Ulf
Oh, thanks! And what should be in openvpn-client@ibecker2.service? Is it just a symlink to the template file openvpn-client@.service?
On 23.11.2017 12:54, Neal Becker wrote:
Oh, thanks! And what should be in openvpn-client@ibecker2.service? Is it just a symlink to the template file openvpn-client@.service?
Yes. You should normally create this symlinks by using systemctl enable openvpn-client@ibecker2.service
best regards Ulf
Ulf Volmer wrote:
On 23.11.2017 12:54, Neal Becker wrote:
Oh, thanks! And what should be in openvpn-client@ibecker2.service? Is it just a symlink to the template file openvpn-client@.service?
Yes. You should normally create this symlinks by using systemctl enable openvpn-client@ibecker2.service
best regards Ulf
sudo systemctl enable openvpn-client@ibecker2.service Failed to enable unit: Unit file openvpn-client@ibecker2.service does not exist.
I guess there first has to be a file: openvpn-client@ibecker2.service: what is in it? Is it a symlink?
Ulf Volmer wrote:
On 23.11.2017 13:34, Neal Becker wrote:
sudo systemctl enable openvpn-client@ibecker2.service Failed to enable unit: Unit file openvpn-client@ibecker2.service does not exist.
interesting. Could you post the output of
rpm -ql openvpn|grep service
best regards Ulf
rpm -ql openvpn|grep service /usr/lib/systemd/system/openvpn-client@.service /usr/lib/systemd/system/openvpn-server@.service
[nbecker@nbecker2 xsimd]$ rpm --verify openvpn
Yes, those 2 files are there in /usr/lib/systemd/system
An explanation of systemd template files: https://fedoramagazine.org/systemd-template-unit-files/
For you, you should: cp -a /usr/lib/systemd/system/openvpn-client@.service /etc/systemd/system/openvpn-client@ibecker2.service systemctl daemon-reload systemctl start openvpn-client@ibecker2.service systemctl enable openvpn-client@ibecker2.service
I don't have a Fedora 27 system so I can't say exactly where your ibecker2.conf should go. Probably in /etc/openvpn/client/ if you have that directory, else in /etc/openvpn/ . Look in /etc/systemd/system/openvpn-client@ibecker2.service for the ExecStart line. For Fedora 24 it's: ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf Which translates to /etc/openvpn/ibecker2.conf because the executable changes the working directory to /etc/openvpn (--cd /etc/openvpn/).
Bill
On 11/25/2017 7:07 PM, Neal Becker wrote:
Ulf Volmer wrote:
On 23.11.2017 13:34, Neal Becker wrote:
sudo systemctl enable openvpn-client@ibecker2.service Failed to enable unit: Unit file openvpn-client@ibecker2.service does not exist.
interesting. Could you post the output of
rpm -ql openvpn|grep service
best regards Ulf
rpm -ql openvpn|grep service /usr/lib/systemd/system/openvpn-client@.service /usr/lib/systemd/system/openvpn-server@.service
[nbecker@nbecker2 xsimd]$ rpm --verify openvpn
Yes, those 2 files are there in /usr/lib/systemd/system _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
On 26.11.2017 16:07, Bill Shirley wrote:
For you, you should: cp -a /usr/lib/systemd/system/openvpn-client@.service /etc/systemd/system/openvpn-client@ibecker2.service systemctl daemon-reload
That is normally not needed, systemctl should create the symlinks himself.
[ulf@x1 ~]$ sudo systemctl enable openvpn-client@ibecker2.service [sudo] password for ulf: Created symlink /etc/systemd/system/multi-user.target.wants/openvpn-client@ibecker2.service → /usr/lib/systemd/system/openvpn-client@.service.
best regards Ulf
I don't know why, but it doesn't seem to be working for him. From an earlier post:
sudo systemctl enableopenvpn-client@ibecker2.service Failed to enable unit: Unit fileopenvpn-client@ibecker2.service does not exist.
Bill
On 11/26/2017 10:44 AM, Ulf Volmer wrote:
On 26.11.2017 16:07, Bill Shirley wrote:
For you, you should: cp -a /usr/lib/systemd/system/openvpn-client@.service /etc/systemd/system/openvpn-client@ibecker2.service systemctl daemon-reload
That is normally not needed, systemctl should create the symlinks himself.
[ulf@x1 ~]$ sudo systemctl enable openvpn-client@ibecker2.service [sudo] password for ulf: Created symlink /etc/systemd/system/multi-user.target.wants/openvpn-client@ibecker2.service → /usr/lib/systemd/system/openvpn-client@.service.
best regards Ulf _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
On 26.11.2017 18:45, Bill Shirley wrote:
I don't know why, but it doesn't seem to be working for him. From an earlier post:
sudo systemctl enable openvpn-client@ibecker2.service Failed to enable unit: Unit file openvpn-client@ibecker2.service does not exist.
Yes, i have read the earlier post too. And have no clue what is going wrong here. But i don't like your advice to corrupt the systemd configuration.
best regards Ulf
Corrupt? Take a look at https://www.freedesktop.org/software/systemd/man/systemd.unit.html :
The first possibility is to copy the unit file to|/etc/systemd/system/httpd.service|and change the chosen settings:
[Unit] Description=Some HTTP server After=remote-fs.target sqldb.service /memcached.service/ Requires=sqldb.service /memcached.service/ AssertPathExists=//srv/www/ [Service] Type=notify ExecStart=/usr/sbin/some-fancy-httpd-server /Nice=0/ /PrivateTmp=yes/ [Install] WantedBy=multi-user.target
It's one of the recommended ways.
Bill
On 11/26/2017 1:14 PM, Ulf Volmer wrote:
On 26.11.2017 18:45, Bill Shirley wrote:
I don't know why, but it doesn't seem to be working for him. From an earlier post:
sudo systemctl enable openvpn-client@ibecker2.service Failed to enable unit: Unit file openvpn-client@ibecker2.service does not exist.
Yes, i have read the earlier post too. And have no clue what is going wrong here. But i don't like your advice to corrupt the systemd configuration.
best regards Ulf _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
On 26.11.2017 19:26, Bill Shirley wrote:
Corrupt? Take a look at https://www.freedesktop.org/software/systemd/man/systemd.unit.html :
Please do not top post.
First of all, we are talking about instanced units. There is no need to copy anything to /etc/systemd. Just a symlink to the original unit file:
lrwxrwxrwx. 1 root root 47 29. Mär 2017 /etc/systemd/system/multi-user.target.wants/openvpn-client@pic2.service -> /usr/lib/systemd/system/openvpn-client@.service lrwxrwxrwx. 1 root root 47 29. Mär 2017 /etc/systemd/system/multi-user.target.wants/openvpn-client@lan.service -> /usr/lib/systemd/system/openvpn-client@.service
second point: copying a unit to /etc/systemd breaks future updates of the affected packages if they contain updates of the unit file.
Please read
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-man...
for example.
best regards Ulf
Yes, a symlink you mentioned will probably work for him.
From the link you posted:
|sudo systemctl edit --full nginx.service |
This will load the current unit file into the editor, where it can be modified. When the editor exits, the changed file will be written to |/etc/systemd/system|, which will take precedence over the system's unit definition (usually found somewhere in |/lib/systemd/system|).
The above does exactly what I was advising; write the new unit file to /etc/systemd/system/ .
I actually have /etc/systemd/system/openvpn@server.service on Fedora 22: .include /lib/systemd/system/openvpn@.service
[Unit] After=syslog.target After=network.target
[Service] Environment="OPENSSL_ENABLE_MD5_VERIFY=1" This method only overrides some of what is in /lib/systemd/system/openvpn@.service. Therefor, any system upgrade changes are passed thru. [0:root@elmo shorewall]$ ls -lZ /lib/systemd/system/openvpn@.service /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug 6 2015 /etc/systemd/system/openvpn@server.service -rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 321 May 10 2016 /lib/systemd/system/openvpn@.service
[0:root@elmo shorewall]$ systemctl status openvpn@server.service ● openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server Loaded: loaded (/etc/systemd/system/openvpn@server.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2017-11-18 20:55:02 EST; 1 weeks 0 days ago Process: 2095 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf (code=exited, status=0/SUCCESS) Main PID: 2228 (openvpn) CGroup: /system.slice/system-openvpn.slice/openvpn@server.service └─2228 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/server.pid --cd /etc/openvpn/ --config server.conf
/etc/systemd/system/mariadb.service: .include /usr/lib/systemd/system/mariadb.service
[Service] #LimitNOFILE=infinity LimitNOFILE=65536 LimitMEMLOCK=infinity
/etc/systemd/system/clamd@scan.service: .include /usr/lib/systemd/system/clamd@.service
[Unit] Description = Generic clamav scanner daemon
[Install] WantedBy = multi-user.target
[Service] StandardOutput=null StandardError=null Restart=no #CPUSchedulingPolicy=idle #IOSchedulingClass=idle Nice=16 CPUSchedulingPolicy=other IOSchedulingClass=best-effort # 0 = highest, 7 = lowest IOSchedulingPriority=5
/etc/systemd/system/spamassassin.service: .include /usr/lib/systemd/system/spamassassin.service
[Service] Restart=no This technique only overrides the installation .service unit with the lines provided.
This is NOT corrupting systemd. It's how systemd was designed to be used.
Bill
On 26.11.2017 20:32, Bill Shirley wrote:
Yes, a symlink you mentioned will probably work for him.
From the link you posted:
|sudo systemctl edit --full nginx.service |
in general i think removing --full from this line will be much better.
This command will create
/etc/systemd/system/nginx.service.d/override.conf
containing only the deltas to the original unit. Original unit keeps unchanged.
best regards Ulf