fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.91k stars 1.59k forks source link

Azure Blob crashing #9499

Closed LACrea closed 1 month ago

LACrea commented 1 month ago

Bug Report

Describe the bug During initialization of the azure blob plugin with the following configuration, fluent bit crashes.

To Reproduce

Crashes during initialization.


- Steps to reproduce the problem:

Upload the configuration file used by fluent bit.  Also occurs with other files.
N/A, set the configuration below.

**Expected behavior**
No crash.

**Screenshots**
<!--- If applicable, add screenshots to help explain your problem. -->

**Your Environment**
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used:  3.2.0 (master)
*Configuration:

[SERVICE]
    log_level debug
    flush 3

[INPUT]
    name blob
    path /home/user/Desktop/bin/files/*
    database_file input_files.db
    upload_success_action suffix
    upload_success_suffix .done

[OUTPUT]
    name azure_blob
    match *
    endpoint http://127.0.0.1:10000
    path output
    container_name test
    shared_key 
    account_name devstoreaccount1
    emulator_mode true

* Environment name and version (e.g. Kubernetes? What version?): N/A
* Server type and version: N/A
* Operating System and version: Ubuntu 22, QNX7.1
* Filters and plugins: See configuration

**Additional context**
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
lecaros commented 1 month ago

hi @LACrea, can you clarify what you mean by:

Upload the configuration file used by fluent bit. Also occurs with other files. N/A, set the configuration below.

What's your working directory? i.e. where the database_file is being created.

Are you doing any other operation over the database_file (input_files.db) when starting Fluent Bit?

LACrea commented 1 month ago

Hi José,

We added the database configuration which resolves the crash.

I would recommend that mandatory configuration fields are checked during initialization and report errors as opposed to crashing fluent bit.

edsiper commented 1 month ago

@LACrea thanks for the report, we will make sure to update the code (cc: @leonardo-albertovich )

lecaros commented 1 month ago

Hi @LACrea could you please clarify your config to reproduce? I've tried deleting the db file and not configuring the parameter, but it still not crashing. We appreciate your report and help to troubleshoot this.

lecaros commented 1 month ago

Hi Lucas, I believe this was fixed with https://github.com/fluent/fluent-bit/commit/8f1fd00d07e676b74d33c0c26a121a0bf654383e and https://github.com/fluent/fluent-bit/commit/aadaf1c071c41198c08f5214708d4ee8ecd07f47. Let us know if that's not the case.