Skip to content
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

container real-time log shows incomplete #1257

Closed
junotx opened this issue Oct 19, 2020 · 17 comments
Closed

container real-time log shows incomplete #1257

junotx opened this issue Oct 19, 2020 · 17 comments
Assignees
Labels
area/console kind/bug Categorizes issue or PR as related to a bug. priority/medium

Comments

@junotx
Copy link

junotx commented Oct 19, 2020

Describe the bug

container real-time log shows no tail log:
view container log and that is normal
image
but switch to real-time log and can not see the tail log
image

Versions used(KubeSphere/Kubernetes)

KubeSphere(3.0.0)

Environment

single cluster & allinone

/kind bug

@junotx junotx added the kind/bug Categorizes issue or PR as related to a bug. label Oct 19, 2020
@JohnNiang
Copy link
Member

  • Correct log format
    image

  • Log in container log window
    image

@JohnNiang
Copy link
Member

/priority high

@JohnNiang
Copy link
Member

And many redundant and unexpected blank lines may be included into the log content.

@JohnNiang
Copy link
Member

/cc @kubesphere/sig-console

@JohnNiang
Copy link
Member

/area console

@JohnNiang
Copy link
Member

/remove-priority high
/priority medium

@harrisonliu5
Copy link
Collaborator

/kind need-to-verify

@jioce
Copy link

jioce commented Nov 18, 2021

issue still exists
image

image

version used:
kubesphere: v3.2.0

@liuyp2018
Copy link

/remove-kind need-to-verify

@harrisonliu5
Copy link
Collaborator

/assign @weili520

@JohnNiang
Copy link
Member

/unassign @zryfish

@weili520
Copy link
Collaborator

weili520 commented Dec 3, 2021

I think it is caused by the node.js HTTP receive mechanism. When the HTTP response is chunked, the data didn't lose, it will show with the next response, but the response interval is about 2 minutes.

@JohnNiang
Copy link
Member

I think it is caused by the node.js HTTP receive mechanism. When the HTTP response is chunked, the data didn't lose, it will show with the next response, but the response interval is about 2 minutes.

Hi @weili520 , if you don't have a better solution now, you could refer to an existing implementation: https://github.com/tektoncd/dashboard/tree/main/packages/components/src/components/Log

@weili520
Copy link
Collaborator

weili520 commented Jan 5, 2022

@harrisonliu5 I think we should upgrade the node-fetch to v3.x, this problem is caused by that the fetch response.body is not a nodejs readable stream. It is ESM, the resolution is here Add example for loading ESM from CommonJS.

@weili520
Copy link
Collaborator

weili520 commented Jan 5, 2022

I have tried it, it works well.

The pods log-generator is created by using the command: kubectl apply -f https://raw.githubusercontent.com/wenchajun/fluentbit-operator/notification/docs/user-guides/forwarding-logs-via-http/kubesphere/log-generator.yaml

it will generate a log every five seconds.

2022-01-05.15.47.25.mov

@weili520
Copy link
Collaborator

weili520 commented Jan 6, 2022

@harrisonliu5 I think we should upgrade the node-fetch to v3.x, this problem is caused by that the fetch response. body is not a nodejs readable stream. It is ESM, the resolution is here Add example for loading ESM from CommonJS.

This problem will disappear if the user updates the KubeSphere version to v3.2.1.

@jioce
Copy link

jioce commented Jun 7, 2022

issue is fixed
image

version used
kubesphere: v3.3.0-rc.1

@wenxinll wenxinll closed this as completed Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console kind/bug Categorizes issue or PR as related to a bug. priority/medium
Projects
None yet
Development

No branches or pull requests

9 participants