-
Notifications
You must be signed in to change notification settings - Fork 557
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
[BUG] - Netpoll related issue #830
Comments
Can you provide a replicated example? As a rule of thumb, this error is caused when the connection is closed while the client is transferring data. |
@li-jin-gou I cannot replicate the issue with code changes. Whenever there's long running application even if there's no any requests, I did receive this error on console. I just used the hello world example using NETPOLL /*
* Copyright 2022 CloudWeGo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package main
import (
"context"
"fmt"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/app/server"
"github.com/cloudwego/hertz/pkg/common/utils"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)
type Test struct {
A string
B string
}
func main() {
h := server.Default(server.WithTransport(netpoll.NewTransporter))
h.StaticFS("/", &app.FS{Root: "./", GenerateIndexPages: true})
h.GET("/ping", func(c context.Context, ctx *app.RequestContext) {
ctx.JSON(consts.StatusOK, utils.H{"ping": "pong"})
})
h.GET("/json", func(c context.Context, ctx *app.RequestContext) {
ctx.JSON(consts.StatusOK, &Test{
A: "aaa",
B: "bbb",
})
})
h.GET("/redirect", func(c context.Context, ctx *app.RequestContext) {
ctx.Redirect(consts.StatusMovedPermanently, []byte("http://www.google.com/"))
})
v1 := h.Group("/v1")
{
v1.GET("/hello/:name", func(c context.Context, ctx *app.RequestContext) {
fmt.Fprintf(ctx, "Hi %s, this is the response from Hertz.\n", ctx.Param("name"))
})
}
h.Spin()
} |
cc @joway Need your help. |
FYI, same error again: 2023/06/27 11:43:47 NETPOLL: readall(fd=15) before close: EOF Not sure what might be causing this issue |
@sujit-baniya I run your code about 3 hours.... cannot reproduce your problem... But anyway, the error could be ignore if there is no actual request eror. |
what's |
@joway It' not certain if the error occurs at certain duration of time. So i'm not sure what might have caused the issue. Maybe you could point out some pointers to me to try out? |
@sujit-baniya I run the problem you give 3 days and no errors occur. Most it because your enviroment have some unexcept connection. The log just point out a warning and could be ignore if you dont have real problem. |
@joway Thank you. Will close this issue |
Hi @joway last night the system get crashed with a lot of messages related to NETPOLL 2023/07/04 14:42:06 NETPOLL: readall(fd=37) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=37) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=36) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:10 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:12 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:12 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:13 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:14 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:17 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:17 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:17 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:20 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:20 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:20 NETPOLL: readall(fd=36) before close: EOF
2023/07/04 14:42:20 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:20 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:22 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:22 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:23 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:23 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:23 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:23 NETPOLL: readall(fd=36) before close: EOF
2023/07/04 14:42:23 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:25 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:25 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:25 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:27 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:27 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:27 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:27 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:27 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=37) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=28) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=36) before close: EOF
2023/07/04 14:42:29 NETPOLL: readall(fd=26) before close: EOF
2023/07/04 14:42:31 NETPOLL: readall(fd=16) before close: EOF
2023/07/04 14:42:32 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:37 NETPOLL: readall(fd=27) before close: EOF
2023/07/04 14:42:37 NETPOLL: readall(fd=16) before close: EOF
signal: killed
`` |
Seem server received the KILL signal. |
Related to: cloudwego/netpoll#273 |
@sujit-baniya We found the root cause. Actualy, it will not cause any real problem on your case but just get some useless logs. if you want to fix it you could use |
@joway Thanks. Closing this issue |
I am using Netpoll transporter for hertz. At some point I received following issue:
The text was updated successfully, but these errors were encountered: