3

我在 Amazon Linux 2 上使用 Awslogs,但我的 awslogs 代理似乎没有成功启动。我正在使用这个文档

当我查看服务日志时systemctl -l status awslogsd

● awslogsd.service - awslogs daemon
   Loaded: loaded (/usr/lib/systemd/system/awslogsd.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2018-12-14 15:04:44 UTC; 1s ago
  Process: 32407 ExecStart=/usr/sbin/awslogsd (code=exited, status=255)
 Main PID: 32407 (code=exited, status=255)

Dec 14 15:04:44 ip-172-31-47-115.eu-central-1.compute.internal systemd[1]: awslogsd.service: main process exited, code=exited, status=255/n/a
Dec 14 15:04:44 ip-172-31-47-115.eu-central-1.compute.internal systemd[1]: Unit awslogsd.service entered failed state.
Dec 14 15:04:44 ip-172-31-47-115.eu-central-1.compute.internal systemd[1]: awslogsd.service failed.

在查看 /var/log/awslogs.log 时,我有

2018-12-14 15:02:04,640 - cwlogs.push - INFO - 31514 - MainThread - Missing or invalid value for use_gzip_http_content_encoding config. Defaulting to use gzip encoding.
2018-12-14 15:02:04,640 - cwlogs.push - INFO - 31514 - MainThread - Missing or invalid value for queue_size config. Defaulting to use 10
2018-12-14 15:02:04,640 - cwlogs.push - INFO - 31514 - MainThread - Using default logging configuration.

unable to open database file

无限循环

有什么帮助吗?

4

1 回答 1

4

几年前我一直在使用脚本,似乎从那以后aws配置发生了变化,我不得不查看我的/etc/awslogs/awslogs.conf

特别是,默认状态文件已更改。新的存在state_file = /var/lib/awslogs/agent-state(在 /lib/ 下)。以前此文件位于不同的文件夹中,因此在 Amazon Linux 2 中不存在,因此会产生崩溃

于 2018-12-14T15:40:21.523 回答