Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS healthd daemon warning - nginx log file does not exists

I have deployed a nodejs app using elasticbeanstalk with nginx.

When I check the log directory /var/log/nginx/

  1. healthd folder exists and
  2. nginx is creating /var/log/nginx/healthd/application.log.2019-10-04-13

But in /var/log/healthd folder there is a daemon.log file in which I am getting below error after every 5 seconds.

    # Logfile created on 2019-10-04 13:46:46 +0000 by logger.rb/47272
A, [2019-10-04T13:46:46.849261 #8094]   ANY -- : healthd daemon 1.0.3 initialized
W, [2019-10-04T13:46:47.011762 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:46:52.012037 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:46:57.012270 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:02.012593 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:07.012811 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:12.013037 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:17.013245 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:22.013467 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:27.013679 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist
W, [2019-10-04T13:47:32.013903 #8094]  WARN -- : log file "/var/log/nginx/healthd/application.log.2019-10-04-13" does not exist

So how to make daemon read nginx healthd log files?

like image 981
Lajpat Avatar asked Oct 05 '19 18:10

Lajpat


1 Answers

I too encountered this mysterious error. Made especially cryptic by the fact that if you check, you'll find /var/log/nginx/healthd/application.log.XXX does exist!

What I discovered is that under some circumstances, healthd requires additional configuration to resolve this error.

Take a look at this: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-serverlogs.html

Once I provided healthd with the proper log formation configuration, this error went away.

like image 78
Ray Avatar answered Oct 17 '22 22:10

Ray