Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529268 - net-analyzer/fail2ban systemd service needs to create /run/fail2ban
Summary: net-analyzer/fail2ban systemd service needs to create /run/fail2ban
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-14 20:21 UTC by Craig Andrews
Modified: 2014-11-14 20:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Andrews gentoo-dev 2014-11-14 20:21:16 UTC
The systemd service installed by net-analyzer/fail2ban (as of 0.9.1) fails with this error, taken from journalctl:
---
Nov 14 15:15:00 irrational systemd[1]: Unit fail2ban.service entered failed state.
Nov 14 15:15:00 irrational systemd[1]: fail2ban.service failed.
Nov 14 15:15:01 irrational fail2ban-client[27910]: ERROR  There is no directory /run/fail2ban to contain the socket file /run/fail2ban/fail2ban.sock.
Nov 14 15:15:01 irrational systemd[1]: fail2ban.service: control process exited, code=exited status=255
Nov 14 15:15:01 irrational systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
---

/usr/lib/systemd/system/fail2ban.service needs these 2 lines added:
ExecStartPre=/bin/mkdir -p /run/fail2ban
ExecStopPost=/bin/rm -fR /run/fail2ban

With that change, it works great.

Reproducible: Always
Comment 1 Craig Andrews gentoo-dev 2014-11-14 20:31:05 UTC
Nevermind - unless you reboot, you must run "systemd-tmpfiles --create" to apply /usr/lib/tmpfiles.d/fail2ban-tmpfiles.conf which creates this directory.