AWS healthd守护程序警告- nginx日志文件不存在

qv7cva1a  于 2023-06-05  发布在  Nginx
关注(0)|答案(1)|浏览(254)

bounty还有6小时到期。此问题的答案有资格获得+50声望奖励。Snerd正在寻找一个答案从一个有信誉的来源

我已经使用nginx和elasticbeanstalk部署了一个nodejs应用程序。
当我检查日志目录/var/log/nginx/

  1. healthd文件夹存在,并且
  2. nginx正在创建/var/log/nginx/healthd/application.log.2019-10-04-13
    但是在/var/log/healthd文件夹中有一个daemon.log文件,其中每5秒就会出现以下错误。
# 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

那么如何让守护进程读取nginx的healthd日志文件呢?

wz3gfoph

wz3gfoph1#

我也遇到了这个神秘的错误。如果你检查一下,你会发现/var/log/nginx/healthd/application.log.XXX确实存在,这一点尤其令人费解!
我发现在某些情况下,healthd需要额外的配置来解决这个错误。
看看这个:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-serverlogs.html
一旦我为healthd提供了正确的日志形成配置,这个错误就消失了。

相关问题