centos7に入れたfail2banの調子が悪いので再インストールを行ったら、エラーで動かなくなった。
1 2 3 4 5 6 7 8 9 10 |
# systemctl status fail2ban * fail2ban.service - Fail2Ban Service Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2020-01-01 19:20:17 JST; 1 day 15h ago Docs: man:fail2ban(1) Process: 22260 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=255) Process: 22256 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255) Process: 22254 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS) Main PID: 22256 (code=exited, status=255) |
statusを見ると(code=exited, status=255)とエラー吐いていたので、ディレクトリ構成を見直すと、/etc/fail2ban/内のディレクトリやファイルが極端に少ない。
再インストールを失敗して、すべてのファイルが正しくインストールできていなかったようなので、fail2banのディレクトリをsftpでアップしてコマンドたたいたら動き出した。
1 2 3 |
systemctl start fail2ban systemctl reload fail2ban systemctl restart fail2ban |
systemctl status fail2banでステータスをチェックするとActive:active(running)が確認できる。
1 2 3 4 5 6 7 8 9 10 |
# systemctl status fail2ban * fail2ban.service - Fail2Ban Service Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-01-02 12:04:50 JST; 14s ago Docs: man:fail2ban(1) Process: 19663 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=0/SUCCESS) Process: 19608 ExecReload=/usr/bin/fail2ban-client reload (code=exited, status=0/SUCCESS) Process: 19665 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS) Main PID: 19667 (fail2ban-server) |
コメントを残す