Skip to content

Configuration parsing error: mmap_log_buffer_size #2313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
symstu-tempesta opened this issue Jan 6, 2025 · 2 comments
Open

Configuration parsing error: mmap_log_buffer_size #2313

symstu-tempesta opened this issue Jan 6, 2025 · 2 comments
Assignees
Labels
bug good to start Start form this tasks if you're new in Tempesta FW
Milestone

Comments

@symstu-tempesta
Copy link
Contributor

Describe the issue
I cannot set the configuration value for mmap_log_buffer_size.

Expected Behavior
Tempesta FW starts correctly but currently crashes when the mmap_log_buffer_size configuration parameter is set.

To Reproduce
Add the following line to your Tempesta configuration and start the application:

mmap_log_buffer_size 4096;

Configuration file

            listen 80;
            server localhost:8000;

            access_log dmesg mmap mmap_host=localhost mmap_log=/tmp/access.log;
            mmap_log_buffer_size 4096;

Version or commit hash
80598c9

Stacktrace or debug log

[23215.774224] Start test: t_clickhouse.test_clickhouse_logs.TestClickhouseLogsBaseTest2.test_missing_log
[23215.933958] [tdb] Start Tempesta DB
[23215.952773] [tempesta fw] Initializing Tempesta FW kernel module...
[23216.038606] [tempesta fw] ERROR: the first character is not a letter: '4'
[23216.038609] [tempesta fw] ERROR: syntax error
[23216.038611] [tempesta fw] ERROR: configuration parsing error:
                  5:             4096;
                     ^^^^^^^^^^^^^^^^^
[23216.038613] [tempesta fw] Warning: Configuration parsing has failed. Clean up...
[23216.086674] [tempesta fw] exiting...
[23216.180309] [tdb] Shutdown Tempesta DB
@krizhanovsky krizhanovsky added this to the 0.9 - LA milestone Jan 7, 2025
@krizhanovsky krizhanovsky modified the milestones: 1.0 - GA, 0.9 - LA Mar 3, 2025
@EvgeniiMekhanik
Copy link
Contributor

I think we should implement additional configuration file for this daemon (in JSON format) and use boost to parse it. Daemon should be started in two modes as a daemon or in a handle mode for debug purpose

@krizhanovsky
Copy link
Contributor

krizhanovsky commented May 7, 2025

Please create a new wiki page for tfw_logger and document mmap_log_buffer_size there (we don't have anything about this option in our wiki). The mmap part must be moved from https://tempesta-tech.com/knowledge-base/Handling-clients/ to the new wiki page.

Now access_log must just accept two options, which can be used together: tfw_logger and dmesg. E.g.

access_log dmesg tfw_logger=/path/to/config.json

See #2421 for the configuration changes: make the transition to the separate JSON configuration and leave the ML configuration part for #2421.

Please also rename utils to log or logger - "utils" is to generic and contains the logging daemon only, which is going to grow in the next few issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good to start Start form this tasks if you're new in Tempesta FW
Projects
None yet
Development

No branches or pull requests

5 participants