Bug 1047436

Summary: Fail2ban fails to start because of /var/log/secure not found
Product: [Fedora] Fedora Reporter: Vladislav Grigoryev <vg.aetera>
Component: fail2banAssignee: Orion Poplawski <orion>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: Axel.Thimm, jonathan.underwood, orion, vg.aetera, vgulch, vonsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-30 01:33:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladislav Grigoryev 2013-12-31 06:43:40 UTC
Description of problem:
Fail2ban fails to start on F20 Minimal installation because of /var/log/secure not found.
/var/log/secure is provided by rsyslog which looks like deprecated:
https://fedoraproject.org/wiki/Changes/NoDefaultSyslog
Fail2ban package has no dependency on rsyslog but it's default configuration is actually unworkable without rsyslog.

Version-Release number of selected component (if applicable):
fail2ban-0.9-0.3.git1f1a561.fc20.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Intatall F20 Minimal.

2. Install fail2ban:
yum install fail2ban

3. Enable sshd jail:
echo -e '[sshd]\nenabled = true' >/etc/fail2ban/jail.d/sshd.conf

3. Start fail2ban:
systemctl start fail2ban.service

Actual results:
# systemctl start fail2ban.service
Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details.
# LANG=C journalctl --full
Dec 31 09:37:56 srv10.kola.fad.ru systemd[1]: Starting Fail2ban Service...
Dec 31 09:37:56 srv10.kola.fad.ru fail2ban-client[6702]: ERROR  No file(s) found for glob /var/log/secure
Dec 31 09:37:56 srv10.kola.fad.ru fail2ban-client[6702]: ERROR  Failed during configuration: Have not found any log file for sshd jail
Dec 31 09:37:56 srv10.kola.fad.ru systemd[1]: fail2ban.service: control process exited, code=exited status=255
Dec 31 09:37:56 srv10.kola.fad.ru systemd[1]: Failed to start Fail2ban Service.
Dec 31 09:37:56 srv10.kola.fad.ru systemd[1]: Unit fail2ban.service entered failed state.
Dec 31 09:37:57 srv10.kola.fad.ru systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Dec 31 09:37:57 srv10.kola.fad.ru systemd[1]: Stopping Fail2ban Service...
...

Expected results:
Fail2ban should start and work correctly on F20 Minimal installation.

Additional info:
Either add dependency on rsyslog, or change default configuration to work with systemd/journald.

Comment 1 Vladislav Grigoryev 2014-01-30 19:27:39 UTC
Workaround:
echo -e '[DEFAULT]\nbackend=systemd' >/etc/fail2ban/jail.d/common.conf

Comment 2 Orion Poplawski 2014-11-03 03:23:06 UTC
fail2ban-0.9-3 and later in F21 takes the approach of splitting fail2ban up into sub-packages to handle this configuration.  I've been hesitant to push this change out to F20 though.

Comment 3 Fedora Update System 2015-02-23 03:19:11 UTC
fail2ban-0.9.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-15988/fail2ban-0.9.1-1.fc20

Comment 4 Vladislav Grigoryev 2015-04-08 07:43:15 UTC
Sorry, already migrated to F21.
Have installed:
fail2ban-firewalld-0.9.1-3.fc21.noarch
fail2ban-server-0.9.1-3.fc21.noarch
fail2ban-systemd-0.9.1-3.fc21.noarch
This version works fine, no issues.

Comment 5 Fedora Update System 2015-05-21 04:18:32 UTC
fail2ban-0.9.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/fail2ban-0.9.2-1.fc20

Comment 6 Fedora Update System 2015-05-22 17:58:25 UTC
Package fail2ban-0.9.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fail2ban-0.9.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-8727/fail2ban-0.9.2-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora End Of Life 2015-05-29 10:15:13 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 '20'.

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 20 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 8 Fedora End Of Life 2015-06-30 01:33:57 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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.