Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 534544 - net-analyzer/fail2ban-version? - /etc/init.d/fail2ban: ?
Summary: net-analyzer/fail2ban-version? - /etc/init.d/fail2ban: ?
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-03 23:49 UTC by mike
Modified: 2015-01-05 10:11 UTC (History)
0 users

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


Attachments
/etc/init.d/fail2ban (fail2ban.initd,1.49 KB, text/plain)
2015-01-03 23:52 UTC, mike
Details
files/gentoo-initd from fail2ban-0.9.1.tar.gz (gentoo-initd,1.50 KB, text/plain)
2015-01-04 20:18 UTC, mike
Details
patch to portage (file_534544.txt,4.21 KB, patch)
2015-01-04 20:36 UTC, mike
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mike 2015-01-03 23:49:02 UTC
init script from the source just tell service to start and stop, but not assign variable pidfile and not follow the service status

Reproducible: Always

Steps to Reproduce:
~ # /etc/init.d/fail2ban start
 * Starting fail2ban ...                           [ ok ]
~ # kill `cat /run/fail2ban/fail2ban.pid `
~ # fail2ban-client status
ERROR  Unable to contact server. Is it running?
~ # /etc/init.d/fail2ban status
 * status: started
~ # /etc/init.d/fail2ban restart
 * Stopping fail2ban ...
 * Failed to stop fail2ban                         [ !! ]
 * ERROR: fail2ban failed to stop
Comment 1 mike 2015-01-03 23:52:20 UTC
Created attachment 393114 [details]
/etc/init.d/fail2ban

This script must solve this issue
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-04 09:57:34 UTC
Please post your `emerge --info net-analyzer/fail2ban' output in a comment.
Comment 3 mike 2015-01-04 20:18:48 UTC
Created attachment 393164 [details]
files/gentoo-initd from fail2ban-0.9.1.tar.gz

> Please post your `emerge --info net-analyzer/fail2ban' output in a comment.
for which version you need this log?

I'm using version net-analyzer/fail2ban-0.9.1
but this problem exists even for older versions
init-scripts for version 0.8 and 0.9 differ only by path to sock-file
on old version - /var/run/fail2ban/fail2ban.sock
but on new version - /run/fail2ban/fail2ban.sock

for example of problem, I attached original initd script for gentoo from the source

for version 0.9.1:

# emerge --info net-analyzer/fail2ban
=================================================================
                         System Settings
=================================================================
...
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r4, 1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1::calculate
Repositories: gentoo calculate mavriq-overlay local
Installed sets: @custom
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-acti
ve/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/var/calculate/remote/distfiles"
EMERGE_DEFAULT_OPTS=" --binpkg-respect-use=y --quiet-build=n --with-bdeps=y --jobs=4"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j3"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/calculate/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/calculate /var/lib/layman/mavriq /var/lib/layman/local"
USE="acl aio audit bash-completion berkdb bittorrent bzip2 caps cli cracklib crypt curl cxx dri filecaps foomaticdb fortran ftp gdbm iconv iproute2 ipv6 logrotate modules ncurses nfs nls nptl openmp pam pcre ppp python readline samba seccomp session ssl tcpd truetype unicode userlocales vhosts x86 xattr zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="* ptp2" CL="builder" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="dmraid dmsquash-live plymouth lvm mdraid nfs" ELIBC="glibc" FOO2ZJS_DEVICES="*" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev mutouch synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi dav dav_ext fancyindex lua" NGINX_MODULES_MAIL="imap smtp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" THEMES="CSS" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"

=================================================================
                        Package Settings
=================================================================

net-analyzer/fail2ban-0.9.1 was built with the following:
USE="(-selinux) -systemd" PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4"




if you need to old version - let me know.
Comment 4 mike 2015-01-04 20:36:24 UTC
Created attachment 393168 [details, diff]
patch to portage

if it helps - I suggest changes in portage
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-05 08:09:41 UTC
(In reply to Jeroen Roovers from comment #2)
> Please post your `emerge --info net-analyzer/fail2ban' output in a comment.
Comment 6 mike 2015-01-05 10:11:15 UTC
(In reply to Jeroen Roovers from comment #5)
> > Please post your `emerge --info net-analyzer/fail2ban' output in a comment.

(In reply to mike from comment #3)
> # emerge --info net-analyzer/fail2ban
> =================================================================
>                          System Settings
> =================================================================
> ...
> ld GNU ld (Gentoo 2.24 p1.4) 2.24
> app-shells/bash:          4.2_p53
> dev-java/java-config:     2.2.0
> dev-lang/perl:            5.18.2-r2
> dev-lang/python:          2.7.9-r1, 3.3.5-r1
> dev-util/cmake:           2.8.12.2-r1
> dev-util/pkgconfig:       0.28-r1
> sys-apps/baselayout:      2.2
> sys-apps/openrc:          0.12.4
> sys-apps/sandbox:         2.6-r1
> sys-devel/autoconf:       2.13, 2.69
> sys-devel/automake:       1.9.6-r4, 1.11.6-r1, 1.13.4
> sys-devel/binutils:       2.24-r3
> sys-devel/gcc:            4.8.3
> sys-devel/gcc-config:     1.7.3
> sys-devel/libtool:        2.4.2-r1
> sys-devel/make:           4.0-r1
> sys-kernel/linux-headers: 3.16 (virtual/os-headers)
> sys-libs/glibc:           2.19-r1::calculate
> Repositories: gentoo calculate mavriq-overlay local
> Installed sets: @custom
> ACCEPT_KEYWORDS="x86"
> ACCEPT_LICENSE="*"
> CBUILD="i686-pc-linux-gnu"
> CFLAGS="-O2 -march=i686 -pipe"
> CHOST="i686-pc-linux-gnu"
> CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt
> /var/bind"
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf
> /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/
> /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-acti
> ve/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
> CXXFLAGS="-O2 -march=i686 -pipe"
> DISTDIR="/var/calculate/remote/distfiles"
> EMERGE_DEFAULT_OPTS=" --binpkg-respect-use=y --quiet-build=n --with-bdeps=y
> --jobs=4"
> FCFLAGS="-O2 -march=i686 -pipe"
> FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified
> distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch
> parallel-install preserve-libs protect-owned sandbox sfperms strict
> unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox
> usersync xattr"
> FFLAGS="-O2 -march=i686 -pipe"
> GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles
> http://distfiles.gentoo.org"
> LANG="ru_RU.UTF-8"
> LDFLAGS="-Wl,--as-needed"
> MAKEOPTS="-j3"
> PORTAGE_CONFIGROOT="/"
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
> --omit-dir-times --compress --force --whole-file --delete --stats
> --human-readable --timeout=180 --exclude=/distfiles --exclude=/local
> --exclude=/packages"
> PORTAGE_TMPDIR="/var/calculate/tmp"
> PORTDIR="/usr/portage"
> PORTDIR_OVERLAY="/var/lib/layman/calculate /var/lib/layman/mavriq
> /var/lib/layman/local"
> USE="acl aio audit bash-completion berkdb bittorrent bzip2 caps cli cracklib
> crypt curl cxx dri filecaps foomaticdb fortran ftp gdbm iconv iproute2 ipv6
> logrotate modules ncurses nfs nls nptl openmp pam pcre ppp python readline
> samba seccomp session ssl tcpd truetype unicode userlocales vhosts x86 xattr
> zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x
> ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel
> intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
> APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias
> auth_basic authn_alias authn_anon authn_dbm authn_default authn_file
> authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user
> autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env
> expires ext_filter file_cache filter headers include info log_config logio
> mem_cache mime mime_magic negotiation rewrite setenvif speling status
> unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker"
> CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon
> braindump author" CAMERAS="* ptp2" CL="builder" COLLECTD_PLUGINS="df
> interface irq load memory rrdtool swap syslog" DRACUT_MODULES="dmraid
> dmsquash-live plymouth lvm mdraid nfs" ELIBC="glibc" FOO2ZJS_DEVICES="*"
> GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt
> gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore
> rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx"
> GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev mutouch synaptics"
> KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216
> lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console
> presenter-minimizer" LINGUAS="en ru" NGINX_MODULES_HTTP="access auth_basic
> autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req
> map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash
> userid uwsgi dav dav_ext fancyindex lua" NGINX_MODULES_MAIL="imap smtp"
> OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5"
> PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3"
> RUBY_TARGETS="ruby20" THEMES="CSS" USERLAND="GNU" VIDEO_CARDS="fbdev glint
> intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via
> vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2
> ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal
> rawnat logmark ipmark dhcpmac delude chaos account"
> USE_PYTHON="2.7 3.3"
> 
> =================================================================
>                         Package Settings
> =================================================================
> 
> net-analyzer/fail2ban-0.9.1 was built with the following:
> USE="(-selinux) -systemd" PYTHON_TARGETS="python2_7 python3_3 -pypy
> -python3_4"