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

hg server 添加认证后,client方式创建模式出错. #640

Closed
0xqq opened this issue Aug 13, 2019 · 2 comments
Closed

hg server 添加认证后,client方式创建模式出错. #640

0xqq opened this issue Aug 13, 2019 · 2 comments
Labels

Comments

@0xqq
Copy link

0xqq commented Aug 13, 2019

Expected behavior 期望表现

{type something here...}

Actual behavior 实际表现

{type something here...}

    HugeClient hugeClient = new HugeClient("http://192.168.96.53:8080", "hugegraph","hugegraph","a116d2b2-23ac-4920-b168-14209585cd47");

    SchemaManager schema = hugeClient.schema();
    schema.propertyKey("name").asText().ifNotExist().create();
-------------
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/bdp/repo/org/apache/logging/log4j/log4j-slf4j-impl/2.8.2/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/bdp/repo/org/slf4j/slf4j-log4j12/1.7.16/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy43.create(Unknown Source)
at com.tupugu.demo.SingleExample.main(SingleExample.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.baidu.hugegraph.structure.schema.BuilderProxy.invoke(BuilderProxy.java:56)
... 7 more
Caused by: class java.lang.IllegalStateException: Missing authentication context when accessing a Graph with permission control
at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44)
at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:83)
at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:156)
at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:133)
at com.baidu.hugegraph.api.schema.PropertyKeyAPI.create(PropertyKeyAPI.java:43)
at com.baidu.hugegraph.driver.SchemaManager.addPropertyKey(SchemaManager.java:79)
at com.baidu.hugegraph.structure.schema.PropertyKey$BuilderImpl.create(PropertyKey.java:116)
at com.baidu.hugegraph.structure.schema.PropertyKey$BuilderImpl.create(PropertyKey.java:99)
... 12 more

Steps to reproduce the problem 复现步骤

  1. {step 1}
  2. {step 2}
  3. {step 3}

Status of loaded data 数据状态

Vertex/Edge summary 数据量

  • loaded vertices amount: {like 10 million}
  • loaded edges amount: {like 20 million}
  • loaded time: {like 200s}

Vertex/Edge example 数据示例

{type something here...}

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

{type something here...}

Specifications of environment 环境信息

  • hugegraph version: {like v0.7.4}
  • operating system: {like centos 7.4, 32 CPUs, 64G RAM}
  • hugegraph backend: {like cassandra 3.10, cluster with 20 nodes, 3 x 1TB HDD disk each node}
@Linary Linary changed the title hg server 添加认证后,client方式创建模式出错. hg server 添加认证后,client方式创建模式出错. Aug 19, 2019
@javeme
Copy link
Contributor

javeme commented Aug 23, 2019

@0xqq 看起来是服务端配置不正确导致的,请参考文档:https://hugegraph.github.io/hugegraph-doc/config/config-authentication.html

@github-actions
Copy link

github-actions bot commented Jan 1, 2022

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

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

No branches or pull requests

2 participants