Bug 1730634 - knockd server does not start after reboot
Summary: knockd server does not start after reboot
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: knock
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Christos Triantafyllidis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-17 08:52 UTC by Knud Christiansen
Modified: 2022-06-07 20:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-07 20:32:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
correct network-related dependencies in unit file (338 bytes, patch)
2020-11-16 07:45 UTC, James Ralston
no flags Details | Diff

Description Knud Christiansen 2019-07-17 08:52:07 UTC
Description of problem:
knockd server does not start after reboot

Version-Release number of selected component (if applicable):
0.7.8-7.20151227git258a27e.fc30

How reproducible:
All the time

Steps to Reproduce:
1.reboot
2.check systemctl status knockd
3.says error ... "interface not up..."
systemctl start knockd => start up normal

Actual results:
Does not start up with an error

Expected results:
To start up normal

Additional info:
How found a fix (from other people)
Change knockd.service file
After=network.target => After=network-online.target

Add
Wants=network-online.target

Comment 1 Ben Cotton 2020-04-30 21:29:57 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2020-05-26 16:17:48 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Knud Christiansen 2020-06-20 16:51:52 UTC
Problem persist in F32

Comment 4 James Ralston 2020-11-16 07:43:35 UTC
This is broken in rawhide, so I've set the Version field to rawhide.

The problem is that knockd *requires* an interface to listen on, and *requires* that the interface be up:

Nov 15 16:38:12 myhost.example.org systemd[1]: Starting A port-knocking server...
Nov 15 16:38:12 myhost.example.org knockd[986]: could not open enp4s0: enp4s0: That device is not up
Nov 15 16:38:12 myhost.example.org systemd[1]: knockd.service: control process exited, code=exited status=1
Nov 15 16:38:12 myhost.example.org systemd[1]: Failed to start A port-knocking server.
Nov 15 16:38:12 myhost.example.org systemd[1]: Unit knockd.service entered failed state.
Nov 15 16:38:12 myhost.example.org systemd[1]: knockd.service failed.

As such, the [Unit] section of the unit file needs both an After and Wants on network-online.target:

After=network.target network-online.target
Wants=network.target network-online.target

Just ordering after network.target ("After=network.target") is insufficient. Any service that requires networking to be up and fully configured need to both depend on (and order after) network-online.target.

The fix is simple; I'll attached a patch shortly.

Comment 5 James Ralston 2020-11-16 07:45:46 UTC
Created attachment 1729711 [details]
correct network-related dependencies in unit file

Require (and order after) network-online.target.

Comment 6 Richi Plana 2020-12-22 06:32:07 UTC
For me, the issue is definitely for a lack of dependence on network-online.target.  I wouldn't mind submitting a patch to fix, but I'm not sure how to set up a dev environment in order to make the patch that's compliant with fedora packaging. Appreciate any help, if someone wants me to pick this up.

Comment 7 Richi Plana 2020-12-22 06:32:47 UTC
The comment above was for F33 in which this issue still persists.

Comment 8 Ben Cotton 2021-02-09 16:15:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 9 Ben Cotton 2022-05-12 15:02:45 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Ben Cotton 2022-06-07 20:32:41 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.