-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Net Exception: Socket is not connected logs error logs with every insert #63598
Comments
Does it reproduce without Does it happen every time you do an insert? Some possibilities:
|
I haven't tried without 'clickhouse-jdbc' library. It happens with every insert. The client should not timeout as I have given 5 mins timeout in options, and files are not big that it will take 5 mins to finish. I have also printed resp summary received, which gives me the count of rows inserted, if the client is timeout or closed: Q1. Why would I get response object back? |
To narrow down the problem, I'd recommend doing an insert via curl or similar using the HTTP endpoint in the same machine you are using for the java program and see if it reproduces. I don't know how the java client works or should be used, so that's what I'd try to move out of the equation first. Maybe it's a matter of calling close differently, or changing some of its options |
Do you have something like a proxy or a loadbalancer in between Clickhouse and your application? |
This is the current configuration of clickhouse deployed in my cluster:
i use Regarding,
Why does it seem to happen only during inserts? |
How do you know this? Do you use jdbc (http/8123) for other queries as well? |
For read connection, i am using the same java library but not creating
but i believe Also, i noticed that these error logs are only during insert, because i stopped all other process, and ran the process which was writing data to clickhouse.
What more logs do you need? |
This is a log of the insert:
I would like to see that the error |
What log level do i need to keep? trace? currently my log level is warning. |
trace |
|
@sonalm there is no information about a created part. What is a type of the |
|
Then I would expect something like
Is it async insert ? |
i am waiting for the response back. |
No, I mean: async_insert https://clickhouse.com/docs/en/optimize/asynchronous-inserts Can you share
|
part_log table didnt return any result. |
also, i pulled out logs from another thread which showed this exception:
As you see from logs, the thread handled multiple inserts and thrown exception in between and continued with other inserts |
All of this is very suspicious
0 rows ? Empty CSV (zero bytes)?
??????????????
????? Do you have MaterializedViews attached to fx_rate ? |
no, we dont have any MaterializedViews |
did a query on query_log table for query_ids from logs of thread [747] in comment #63598 (comment)
for first id, i see following in Row2(QueryFinish):
whereas for second qurey_id, this is:
|
btw, its possible to have empty csv files as well! But why would that be the case for exception? |
At this point I would start to use tcpdump/tshark, now I am more sure that it's a balancer is probing http port. |
FYI, i removed the upload for empty files, but still see the exceptions in the log! |
this is still open! |
But why only during inserts and not at any other time? |
May be it's related to the data. For example you may use /r/n as a line separator. Who knows.
|
Version:
23.11
I am using java clickhouse-client library:
and trying to insert data in a table from csv file like:
Can someone please help why are we getting these errors in logs? I see that the insert itself is successful and can see data in tables. But still we got lot of errors.
Thanks.
The text was updated successfully, but these errors were encountered: