mikaku / Monitorix

Monitorix is a free, open source, lightweight system monitoring tool.
https://www.monitorix.org
GNU General Public License v2.0
1.12k stars 167 forks source link

Port.pm doesn't wait if iptables is locked by another process #73

Closed atika closed 9 years ago

atika commented 9 years ago

Hi. I found this in my monitorix logs (Ubuntu trusty) :

Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
Use of uninitialized value within @i_in in concatenation (.) or string at /usr/lib/monitorix/port.pm line 278.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 278.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 278.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 278.
mikaku commented 9 years ago

Hi,

You're right, it looks like newer iptables versions have this new -w option, but including that option will generate errors in older versions of iptables. I need to investigate further on this.

I'll keep you informed. Thanks!

mikaku commented 9 years ago

Hi,

Can you please tell me your iptables version?

Thanks.

atika commented 9 years ago

Hi, It's iptables v1.4.21 on Ubuntu Trusty 14.04. I having the same problem on my scripts failing when Iptables was used by another process, I have added the --wait option, it seems to work now.

mikaku commented 9 years ago

Please, check the last commit and let me know if it works as expected. Thanks.

atika commented 9 years ago

Hi. I have updated all files and I no longer have the error messages in the logs. It's seem to work. I do not know if I can test something else or run the script manually. Thanks. I have another message in the logs, I create a new issue for it.

mikaku commented 9 years ago

OK, let's close this one.