[Bug] AccessLogFilter accesslog path warnings are garbled and name the wrong accesslog.fixed.path value
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Read AccessLogFilter.java, especially the isFixedPath branch of writeLogSetToFile, and compare its warning calls with the reported behavior for both accesslog.fixed.path values. Correct the two log messages so they name the right setting and include the path change as the message. Done when both warnings display the expected text; the issue says log destinations already work correctly.
Written by the indexing model from the issue text.
Description
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
3.3 branch (cb05763298), OpenJDK 21, macOS. The warning texts were added in #11094 and are in every release since 3.2.0.
Steps to reproduce this issue
A provider whose service sets accesslog to a file (ServiceConfig#setAccesslog("<file>")), called a few times by a consumer.
1. accesslog.fixed.path not set (default true). The entries go to the dubbo.accesslog.<interface> logger instead of the file, and every flush logs:
WARN org.apache.dubbo.rpc.filter.AccessLogFilter - [DUBBO] Will write to the default location, " +
"please enable this feature by setting 'accesslog.fixed.path=true' and restart the process. " +
"We highly recommend to not enable this feature in production for security concerns, " +
"please be fully aware of the potential risks before doing so!, dubbo version: 3.3.7-SNAPSHOT, current host: <host>, error code: 0-28. This may be caused by Change of accesslog file path not allowed. , go to https://dubbo.apache.org/faq/0/28 to find instructions.
- The
" +fragments and the line breaks come from a string concatenation that ended up inside the string literal (AccessLogFilter.java, theisFixedPathbranch ofwriteLogSetToFile). - It asks for
accesslog.fixed.path=true, which is the default that causes this warning. The file is only used withaccesslog.fixed.path=false(invoker.getUrl().getParameter(ACCESS_LOG_FIXED_PATH_KEY, true)), as also explained in #12546.
2. accesslog.fixed.path=false (set through the application parameters, as described in #12546). The entries are written to the file, and the warning has an empty message, because the text is passed as the cause argument and "" as the message:
WARN org.apache.dubbo.rpc.filter.AccessLogFilter - [DUBBO] , dubbo version: 3.3.7-SNAPSHOT, current host: <host>, error code: 0-28. This may be caused by Accesslog file path changed to <file>, be aware of possible vulnerabilities!, go to https://dubbo.apache.org/faq/0/28 to find instructions.
What you expected to happen
- One sentence that names the value that actually enables the file:
[DUBBO] Will write to the default location, please enable this feature by setting 'accesslog.fixed.path=false' and restart the process. We highly recommend to not enable this feature in production for security concerns, please be fully aware of the potential risks before doing so!, dubbo version: ...
- The path change as the message:
[DUBBO] Accesslog file path changed to <file>, be aware of possible vulnerabilities!, dubbo version: ...
Anything else
Only the log text is wrong; where the entries are written is correct in both cases.
The FAQ page for 0-28 on the website (reference-manual/faq/0/28.md in apache/dubbo-website) also describes accesslog.fixed.path=true as the switch that allows changing the path. That page is not part of this repository.
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.3k
- Avg merge
- 8h 6m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/dubbo
-
[Bug] DefaultSerializationExceptionWrapper does not implement Cleanable, so cleanup() is never invoked by codecsPossibly taken @binbin0325 claimed this 3 days ago. Opencomponent/need-triage type/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/dubbo#16537 · 1 reaction ·
Maintainers usually reply within 1 day
-
[Bug] QoS count command ignores the times argument after cdPossibly taken @CCCLL claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/dubbo#16530 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] dubbo.protocol.triple.max-message-size is only read from OS environment variablesPossibly taken @CCCLL claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Bug] StreamUtils treats InputStream.available() as the remaining stream lengthPossibly taken A pull request linked to this issue is open or already merged. Opencomponent/need-triage type/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/dubbo#16510 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] Negative frame data length causes IllegalArgumentException in ExchangeCodecPossibly taken @L1nq0 claimed this 52 days ago. Opencomponent/need-triage type/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ballerina-platform/static-code-analysis-tool#140 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
atomityhq/blog-cms#82 · 1 comment ·
Maintainers usually reply within 1 day
-
ready-for-triage triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
RedHatInsights/notifications-backend#5080 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-4diac/4diac-ide#3103 ·
Maintainers usually reply within 1 day