I am trying to use AWS fluent-bit custom image as sidecar for my server container. But each time the service starts up the fluent-bit container stays up for one minute and exits with the 139 code. The only logs that I am seeing are fluent-bit startup logs.
Maybe someone has some suggestions? I am very desperate to get this working, any help is appreciated!
Here is the config I had added:
<code>[SERVICE]
Log_Level info
Parsers_File parsers.conf
[INPUT]
Name tail
Path /app/logs/*.log
Parser json
Tag app_logs
[INPUT]
Name forward
Tag stderr
[OUTPUT]
Name s3
Match *
bucket <BUCKET>
region us-east-1
total_file_size 5M
upload_timeout 10m
use_put_object On
s3_key_format /fluent-bit-logs/<SERVICE NAME>/%Y/%m/%d/$UUID.log
[OUTPUT]
Name stdout
Match *
</code>
<code>[SERVICE]
Log_Level info
Parsers_File parsers.conf
[INPUT]
Name tail
Path /app/logs/*.log
Parser json
Tag app_logs
[INPUT]
Name forward
Tag stderr
[OUTPUT]
Name s3
Match *
bucket <BUCKET>
region us-east-1
total_file_size 5M
upload_timeout 10m
use_put_object On
s3_key_format /fluent-bit-logs/<SERVICE NAME>/%Y/%m/%d/$UUID.log
[OUTPUT]
Name stdout
Match *
</code>
[SERVICE]
Log_Level info
Parsers_File parsers.conf
[INPUT]
Name tail
Path /app/logs/*.log
Parser json
Tag app_logs
[INPUT]
Name forward
Tag stderr
[OUTPUT]
Name s3
Match *
bucket <BUCKET>
region us-east-1
total_file_size 5M
upload_timeout 10m
use_put_object On
s3_key_format /fluent-bit-logs/<SERVICE NAME>/%Y/%m/%d/$UUID.log
[OUTPUT]
Name stdout
Match *
And this is my Dockerfile:
<code>FROM --platform=linux/x86_64 amazon/aws-for-fluent-bit:stable
# Copy the Fluent Bit configuration file
COPY fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
# Command to run Fluent Bit
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
</code>
<code>FROM --platform=linux/x86_64 amazon/aws-for-fluent-bit:stable
# Copy the Fluent Bit configuration file
COPY fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
# Command to run Fluent Bit
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
</code>
FROM --platform=linux/x86_64 amazon/aws-for-fluent-bit:stable
# Copy the Fluent Bit configuration file
COPY fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
# Command to run Fluent Bit
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
Then in the Task Definition is as follows:
<code>"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"EnableECSLogMetadata": "true",
"Type": "fluentbit",
"Name": "firelens"
},
</code>
<code>"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"EnableECSLogMetadata": "true",
"Type": "fluentbit",
"Name": "firelens"
},
</code>
"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"EnableECSLogMetadata": "true",
"Type": "fluentbit",
"Name": "firelens"
},
<code>{
"name": "fluent-bit",
"image": "<ACC_NUMBER>.dkr.ecr.us-east-1.amazonaws.com/fluent-bit:latest",
"cpu": 0,
"portMappings": [],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"user": "0",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/firelens/fluent-bit",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "fluent-bit"
},
"secretOptions": []
},
"systemControls": [],
"firelensConfiguration": {
"type": "fluentbit",
"options": {
"config-file-type": "file",
"config-file-value": "/fluent-bit/etc/fluent-bit.conf"
}
}
}
</code>
<code>{
"name": "fluent-bit",
"image": "<ACC_NUMBER>.dkr.ecr.us-east-1.amazonaws.com/fluent-bit:latest",
"cpu": 0,
"portMappings": [],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"user": "0",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/firelens/fluent-bit",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "fluent-bit"
},
"secretOptions": []
},
"systemControls": [],
"firelensConfiguration": {
"type": "fluentbit",
"options": {
"config-file-type": "file",
"config-file-value": "/fluent-bit/etc/fluent-bit.conf"
}
}
}
</code>
{
"name": "fluent-bit",
"image": "<ACC_NUMBER>.dkr.ecr.us-east-1.amazonaws.com/fluent-bit:latest",
"cpu": 0,
"portMappings": [],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"user": "0",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/firelens/fluent-bit",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "fluent-bit"
},
"secretOptions": []
},
"systemControls": [],
"firelensConfiguration": {
"type": "fluentbit",
"options": {
"config-file-type": "file",
"config-file-value": "/fluent-bit/etc/fluent-bit.conf"
}
}
}
Tried modifying memory of the service
Tried changing the configurations