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

Verify java client with custom header #554

Closed
wenhaocs opened this issue Sep 20, 2023 · 4 comments
Closed

Verify java client with custom header #554

wenhaocs opened this issue Sep 20, 2023 · 4 comments

Comments

@wenhaocs
Copy link

wenhaocs commented Sep 20, 2023

ERROR

caused by: com.vesoft.nebula.client.graph.exception.IOErrorException: HTTP Response code: 404	
at com.vesoft.nebula.client.graph.net.SyncConnection.open(SyncConnection.java:139) ~[client-3.6.1.jar:?]	
at com.vesoft.nebula.client.graph.SessionPool.createSessionObject(SessionPool.java:356) ~[client-3.6.1.jar:?]	
at com.vesoft.nebula.client.graph.SessionPool.init(SessionPool.java:122) ~[client-3.6.1.jar:?]	... 26 more"
}
Caused by: com.vesoft.nebula.client.graph.exception.IOErrorException: okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR	
at com.vesoft.nebula.client.graph.net.SyncConnection.open(SyncConnection.java:139) ~[client-3.6.1.jar:?]	
at com.vesoft.nebula.client.graph.SessionPool.createSessionObject(SessionPool.java:356) ~[client-3.6.1.jar:?]	
at com.vesoft.nebula.client.graph.SessionPool.init(SessionPool.java:122) ~[client-3.6.1.jar:?]	... 26 more"
}

Config

SessionPoolConfig sessionPoolConfig = new SessionPoolConfig(addresses, graphSpace,
                    "root", "nebula");
            sessionPoolConfig.setUseHttp2(true);
            sessionPoolConfig.setCustomHeaders(customHeaders);
            SessionPool sessionPool = new SessionPool(sessionPoolConfig);
            boolean initResult =  sessionPool.init();
            if (!initResult) {
                LOGGER.error("Failed to init SessionPool.");
            }

Header: ImmutableMap.of("Route-Tag", "xxxx")
@HarrisChu
Copy link
Contributor

image

@Nicole00
Copy link
Contributor

image

@wenhaocs
Copy link
Author

Thank you!

@Nicole00
Copy link
Contributor

Nicole00 commented Sep 22, 2023

when the params are config incorrect, there's error log and exception. Just like:
wrong host "abc":
image

null address or null space
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants