vesoft-inc / nebula-java

Client API and data importer of Nebula Graph in Java
Apache License 2.0
171 stars 121 forks source link

Verify java client with custom header #554

Closed wenhaocs closed 1 year ago

wenhaocs commented 1 year ago

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 commented 1 year ago

image

Nicole00 commented 1 year ago

image

wenhaocs commented 1 year ago

Thank you!

Nicole00 commented 1 year ago

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

null address or null space image