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

Exception in thread "main" org.apache.hugegraph.rest.ClientException: Failed to do request #515

Open
1 task done
badagou333 opened this issue Sep 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@badagou333
Copy link

Bug Type (问题类型)

exception / error (异常报错)

Before submit

  • I had searched in the issues and found no similar issues.

Environment (环境信息)

  • Server Version: v1.0.0(docker)
  • Toolchain Version: v1.0.0

Expected & Actual behavior (期望与实际表现)

通过client连接报超时异常,直接通过http访问没问题,用hubble访问也没问题
连接代码:
HugeClient hugeClient = HugeClient.builder("http://10.5.31.101:28080",
"hugegraph")
.build();
pom文件:

org.apache.hugegraph
hugegraph-client
1.0.0

报错:
Exception in thread "main" org.apache.hugegraph.rest.ClientException: Failed to do request
at org.apache.hugegraph.rest.AbstractRestClient.request(AbstractRestClient.java:200)
at org.apache.hugegraph.rest.AbstractRestClient.get(AbstractRestClient.java:297)
at org.apache.hugegraph.rest.AbstractRestClient.get(AbstractRestClient.java:271)
at org.apache.hugegraph.api.version.VersionAPI.get(VersionAPI.java:39)
at org.apache.hugegraph.driver.VersionManager.getApiVersion(VersionManager.java:43)
at org.apache.hugegraph.driver.HugeClient.checkServerApiVersion(HugeClient.java:111)
at org.apache.hugegraph.driver.HugeClient.initManagers(HugeClient.java:95)
at org.apache.hugegraph.driver.HugeClient.(HugeClient.java:67)
at org.apache.hugegraph.driver.HugeClientBuilder.build(HugeClientBuilder.java:62)
at org.example.SingleExample.main(SingleExample.java:24)
Caused by: jakarta.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read timed out
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:531)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:297)
at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:662)
at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:697)
at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:691)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390)
at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:691)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:661)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:413)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:313)
at org.apache.hugegraph.rest.AbstractRestClient.lambda$get$3(AbstractRestClient.java:302)
at org.apache.hugegraph.rest.AbstractRestClient.request(AbstractRestClient.java:198)
... 9 more
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 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:72)
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:483)
... 23 more

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@badagou333 badagou333 added the bug Something isn't working label Sep 7, 2023
@imbajin
Copy link
Member

imbajin commented Sep 7, 2023

what happened when u restart server? And lack more context for it

@badagou333
Copy link
Author

what happened when u restart server? And lack more context for it

i dont restart server.
what kind of context u want?
i connect from hubble and curl ,its all work, only can not work on java client

@simon824
Copy link
Member

@badagou333 Is the network from client to hugegraph accessible?
you can try telnet 10.5.31.101 28080 on client host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants