apache / apache/servicecomb-kie

should enable access log to help diagnosis problems like request timeout

Open
#215 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
545
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Polling kie got a timeout exception, but do not know if kie has received the request and how long it takes. Recommented kie enable access log.

```
2021-08-28 15:01:37,678 [ERROR] get configurations from KieConfigCenter failed, and will try again. org.apache.servicecomb.config.kie.client.KieConfigManager$PollConfigurationTask.execute(KieConfigManager.java:136)
org.apache.servicecomb.config.kie.client.exception.OperationException: read response failed.
at org.apache.servicecomb.config.kie.client.KieClient.queryConfigurations(KieClient.java:110)
at org.apache.servicecomb.config.kie.client.KieConfigManager$PollConfigurationTask.execute(KieConfigManager.java:124)
at org.apache.servicecomb.http.client.task.AbstractTask.lambda$startTask$1(AbstractTask.java:89)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.apache.servicecomb.http.client.common.HttpTransportImpl.doRequest(HttpTransportImpl.java:93)
at org.apache.servicecomb.config.kie.client.KieClient.queryConfigurations(KieClient.java:87)
... 5 more
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing KieConfigManager$PollConfigurationTask.execute through KieClient.queryConfigurations and HttpTransportImpl.doRequest, the entry points named in the report. Determine where Kie receives the request and how its duration can be exposed in access logs; done means timeout diagnosis can show request receipt and elapsed time, with appropriate coverage for the logging behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.