Fail2Ban Not starting when using sudo systemctl status fail2ban.servicehow to install odoo (formerly OpenERP) 8 rpm on CentOS 7Failed at step EXEC spawning /usr/libexec/mariadb-prepare-db-dirSuddenly mysql/mariadb won't startServices remain in failed state after stopped with systemctlfirewall-cmd on OpenVZ CentOS 7“vsftpd.service: cgroup is empty” service fails to start'systemctl restart service' not working on CentOS 7vsftpd failing to startFail2Ban-client works while its service failssystemctl shows inactive / dead, but service is running
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
How can bays and straits be determined in a procedurally generated map?
Why did Neo believe he could trust the machine when he asked for peace?
Why do falling prices hurt debtors?
Have astronauts in space suits ever taken selfies? If so, how?
Do I have a twin with permutated remainders?
Python: next in for loop
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
Can I make popcorn with any corn?
Smoothness of finite-dimensional functional calculus
Modeling an IPv4 Address
Has the BBC provided arguments for saying Brexit being cancelled is unlikely?
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
Today is the Center
Mathematical cryptic clues
How to find program name(s) of an installed package?
To string or not to string
How does strength of boric acid solution increase in presence of salicylic acid?
Why don't electron-positron collisions release infinite energy?
Why doesn't H₄O²⁺ exist?
How to format long polynomial?
What is the word for reserving something for yourself before others do?
Why are electrically insulating heatsinks so rare? Is it just cost?
Fail2Ban Not starting when using sudo systemctl status fail2ban.service
how to install odoo (formerly OpenERP) 8 rpm on CentOS 7Failed at step EXEC spawning /usr/libexec/mariadb-prepare-db-dirSuddenly mysql/mariadb won't startServices remain in failed state after stopped with systemctlfirewall-cmd on OpenVZ CentOS 7“vsftpd.service: cgroup is empty” service fails to start'systemctl restart service' not working on CentOS 7vsftpd failing to startFail2Ban-client works while its service failssystemctl shows inactive / dead, but service is running
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
When i try and restart fail2ban using sudo service fail2ban restart
it displays the following error from systemctl status fail2ban.service
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Apr 02 20:12:30 centos systemd[1]: Stopped Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: start request repeated too quickly for fail2ban.service
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
then when i run
it, displays this error sugesting that fail2ban is not starting as sudo
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR No file(s) found for glob /var/www/example.com/log/error.log
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR Failed during configuration: Have not found any log file for apache jail
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
However, if i use the command sudo fail2ban-client start
then Fail2Ban Starts normally with no errors.
Does anyone have any idea as to why service is not working with Fail2Ban because i believe its also stopping it from starting at boot?
apache-2.2 centos sudo fail2ban systemctl
add a comment |
When i try and restart fail2ban using sudo service fail2ban restart
it displays the following error from systemctl status fail2ban.service
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Apr 02 20:12:30 centos systemd[1]: Stopped Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: start request repeated too quickly for fail2ban.service
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
then when i run
it, displays this error sugesting that fail2ban is not starting as sudo
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR No file(s) found for glob /var/www/example.com/log/error.log
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR Failed during configuration: Have not found any log file for apache jail
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
However, if i use the command sudo fail2ban-client start
then Fail2Ban Starts normally with no errors.
Does anyone have any idea as to why service is not working with Fail2Ban because i believe its also stopping it from starting at boot?
apache-2.2 centos sudo fail2ban systemctl
add a comment |
When i try and restart fail2ban using sudo service fail2ban restart
it displays the following error from systemctl status fail2ban.service
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Apr 02 20:12:30 centos systemd[1]: Stopped Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: start request repeated too quickly for fail2ban.service
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
then when i run
it, displays this error sugesting that fail2ban is not starting as sudo
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR No file(s) found for glob /var/www/example.com/log/error.log
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR Failed during configuration: Have not found any log file for apache jail
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
However, if i use the command sudo fail2ban-client start
then Fail2Ban Starts normally with no errors.
Does anyone have any idea as to why service is not working with Fail2Ban because i believe its also stopping it from starting at boot?
apache-2.2 centos sudo fail2ban systemctl
When i try and restart fail2ban using sudo service fail2ban restart
it displays the following error from systemctl status fail2ban.service
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Apr 02 20:12:30 centos systemd[1]: Stopped Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: start request repeated too quickly for fail2ban.service
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
then when i run
it, displays this error sugesting that fail2ban is not starting as sudo
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR No file(s) found for glob /var/www/example.com/log/error.log
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR Failed during configuration: Have not found any log file for apache jail
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
However, if i use the command sudo fail2ban-client start
then Fail2Ban Starts normally with no errors.
Does anyone have any idea as to why service is not working with Fail2Ban because i believe its also stopping it from starting at boot?
apache-2.2 centos sudo fail2ban systemctl
apache-2.2 centos sudo fail2ban systemctl
asked Apr 3 at 16:24
Leon WLeon W
51
51
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
sorry i would like to give it as a comment not answer but i don't have much reputation, so i suggest you have enabled a jail for a non-existed service on your jail.local file, so go to that /etc/fail2ban/jail.local and search for what you've enabled and delete the enabled word and sentence then "sudo systemctl restart fail2ban" and check "sudo systemctl status fail2ban"
and vola it works! or that what i hope, tell me if it worked, i might help you further
New contributor
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961338%2ffail2ban-not-starting-when-using-sudo-systemctl-status-fail2ban-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
sorry i would like to give it as a comment not answer but i don't have much reputation, so i suggest you have enabled a jail for a non-existed service on your jail.local file, so go to that /etc/fail2ban/jail.local and search for what you've enabled and delete the enabled word and sentence then "sudo systemctl restart fail2ban" and check "sudo systemctl status fail2ban"
and vola it works! or that what i hope, tell me if it worked, i might help you further
New contributor
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
add a comment |
sorry i would like to give it as a comment not answer but i don't have much reputation, so i suggest you have enabled a jail for a non-existed service on your jail.local file, so go to that /etc/fail2ban/jail.local and search for what you've enabled and delete the enabled word and sentence then "sudo systemctl restart fail2ban" and check "sudo systemctl status fail2ban"
and vola it works! or that what i hope, tell me if it worked, i might help you further
New contributor
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
add a comment |
sorry i would like to give it as a comment not answer but i don't have much reputation, so i suggest you have enabled a jail for a non-existed service on your jail.local file, so go to that /etc/fail2ban/jail.local and search for what you've enabled and delete the enabled word and sentence then "sudo systemctl restart fail2ban" and check "sudo systemctl status fail2ban"
and vola it works! or that what i hope, tell me if it worked, i might help you further
New contributor
sorry i would like to give it as a comment not answer but i don't have much reputation, so i suggest you have enabled a jail for a non-existed service on your jail.local file, so go to that /etc/fail2ban/jail.local and search for what you've enabled and delete the enabled word and sentence then "sudo systemctl restart fail2ban" and check "sudo systemctl status fail2ban"
and vola it works! or that what i hope, tell me if it worked, i might help you further
New contributor
New contributor
answered Apr 3 at 21:15
johnjohn
162
162
New contributor
New contributor
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
add a comment |
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
Thank you, In the fail2ban local config i have 2 services enabled, apache and sshd. You are correct disabling the apache does allow fail2ban to work. I do have the httpd server running with the log file in the location /var/www/example.com/log/error.log, any idea why fail2ban can't see it?
– Leon W
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
i think because it's not the default location for error logs for httpd, please mark my answer as coorect if it helped you.
– john
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
I changed the location of my log to /var/log/httpd/example-error.log and fail2ban seems to be happy with that. Thank you for your help!
– Leon W
2 days ago
you're welcome :)
– john
2 days ago
you're welcome :)
– john
2 days ago
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961338%2ffail2ban-not-starting-when-using-sudo-systemctl-status-fail2ban-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown