Can anyone help with a weird behavior of our ERPNext site?
When we try to access ERPNext through the browser, it says ‘This site can’t be reached’. This error is intermittent and frequent. Sometimes, it says ERR_CONNECTION_REFUSED and sometimes it says ERR_CONNECTION_TIMED_OUT. Other sites are getting connected with no issues. This happens when more than one person tries to connect from the same place. In our office, where many people use it simultaneously, this disconnection issue occurs and at that time, if I try from my home place where the connection will be single(only I connect), it works fine.
Does any configuration changes are needed in nginx.conf or anywhere else?
Our ERPNext is hosted on AWS and we are on the following version:
Frappe Framework: v10.1.2 (master)
ERPNext: v10.1.6 (master)
T2 Medium Instance type (which is having 4 GB RAM and 100 GB)
Please help us as we are in a critical phase. The operation and productivity have fallen to a very low level since past two weeks. We are unable to figure out a solution for this even though we tried a lot by checking with AWS team and our local internet provider. By searching the forums on the internet, we came to know that the problem might be due to nginx configuration or application (ERPNext) mostly.
@vwithv1602 we got this kind of problem with fail2ban
We just run
apt purge fail2ban and after some minuts, situation have normalized.
Thanks a lot, Max. Will try it.
Purging fail2ban would simply make your site vulnerable to attacks.
@achillesrasquinha but rightnow, dont matter any kind of configuration on fail2ban, it’s blocking the access to erpnext.
And I’m sure that the instance is not under attack, but by some weird reason, it is blocking everyone for a certain time, many times in to the day.
May should be an issue into the fail2ban or some configuration.
It worked like a charm. The site didn’t get down till now. Thanks a ton.
thanks a lot…
this fixed my issue too…
Alternatvely you could whitelist yourself like this, if you feel Purging fail2ban is vulnerable.
This seems great. Will try @karthikeyan5. Thanks for diving in and sharing…
It happens also when we have 2 or 3 users on site. what is the reason actually didn’t get it. check the log, no attacks at all on the server.
Did anyone have the solution here?
Was just having the same issue with my version 13 install on Ubunto 20.04.
I went through everything and couldn’t find it until this thread. Thanks for the resolution. I will need to discover why fail2ban was causing problems and fix it. Then I’ll update the thread again.
Typically if there’s a bug in code which causes web requests to fail and the user knowingly or unknowingly keeps triggering such requests then eventually fail2ban will trip off.
If you are unable to fix the bug and if the end user has a static IP Address, then it would be easier to add the IP Address to ignore list of fail2ban.
@max_morais_dmm I did that still I didn’t get any result… please help
Do you have a website built on your ERPNext? We faced this issue with a website that was built on it. The codes were inconsistent leading to many queries being generated. Maybe you have a custom app or script that is generating queries. Check this line of debugging.
Else just get a Static IP at your main router and add it as whitelist to fail2ban.
You have saved me a whole lot of stress. Thank you.
This helped me out a ton, no longer getting random site connection error issues. I’m running my own server inside our firewall so I’m not too worried about Fail2Ban.
I don’t want to be rude, but why don’t you type this question into the Google search bar?
You can whitelist the IP in the fail2ban configuration, it also resolve the issue instead of purging it.