ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
493 stars 583 forks source link

resource-agents/heartbeat/nginx spewing harmless errors #855

Open celesteking opened 8 years ago

celesteking commented 8 years ago

corosync log is getting flooded with:

Oct 07 17:22:32 [12364] xx lrmd: notice: operation_finished: Website_monitor10000:22076:stderr [ ls: cannot access /etc/nginx/conf.d/.conf: No such file or directory ] Oct 07 17:22:32 [12364] xx lrmd: notice: operation_finished: Website_monitor10000:22076:stderr [ ls: cannot access /etc/nginx/default.d/.conf: No such file or directory ]

Those don't exist and why should they? nginx -t passes just fine without them. I tried to lookup the logic that's generating them but failed -- the plugin is a mess.

krig commented 8 years ago

What do you get if you run this:

sudo nginx -V 2>&1 |grep 'configure arguments:' | sed -e 's%.*--conf-path=%%' -e 's% *--.*%%'

That should give you the path to the root configuration file for nginx. If that file doesn't exist or the command doesn't return a valid path, then you'll have to manually specify the configuration file with the configfile parameter.

If that works, then the problem is the config file parsing.. figuring out what is going wrong there is going to be more difficult.

celesteking commented 8 years ago

I realized what the issue was, it was trying to replicate "include" directives that are in my config, but relevant dirs are empty, thus the: ls: cannot access /etc/nginx/default.d/*.conf: No such file or directory despite 2>/dev/null being present, it isn't somehow picked up.

That is, that weird awk code needs to be debugged and I have 0 interest in that. I just commented out empty dirs includes for now.

krig commented 8 years ago

Ah, yeah, that sounds like a bug. I'm not an awk wizard either.. I'll keep this issue open for now.

pixelchutes commented 7 years ago

I am also impacted by this issue, and with a 60s monitor interval, the syslog is extremely cluttered due to these errors every minute (more so depending on the number of .conf or include your setup has)

I can confirm @celesteking's findings, that it appears related to nginxcat and that the listfiles() + 2>/dev/null STDERR redirect may not be working as designed?