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

[Question] hung up in hugegraph-server 1.0.0 after auth enabled #2404

Closed
1 task done
ingla9988 opened this issue Dec 27, 2023 · 5 comments · Fixed by #2403
Closed
1 task done

[Question] hung up in hugegraph-server 1.0.0 after auth enabled #2404

ingla9988 opened this issue Dec 27, 2023 · 5 comments · Fixed by #2403
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@ingla9988
Copy link

Problem Type (问题类型)

None

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: pg
  • OS: k8s部署,使用的是官方的1.0.0镜像

Your Question (问题描述)

执行./init-store.sh,并设置了admin密码后
启动一直卡着:Starting HugeGraphServer in foreground mode...
有什么方法可以进行调试吗?

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

No response

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

No response

Copy link

dosubot bot commented Dec 27, 2023

🤖

你好 @ingla9988! 我是Dosu🤖,一个能帮助你解决bug、回答问题,甚至成为贡献者的机器人。在等待一个人类维护者的同时,我在这里为你提供帮助。很高兴遇见你!💻😸

如果HugeGraphServer 1.0.0版本在执行./init-store.sh并设置了管理员密码后,卡在"Starting HugeGraphServer in foreground mode...",您可以使用以下调试方法:

  1. 检查日志文件:脚本将HugeGraphServer的输出重定向到位于"${LOGS}/hugegraph-server.log"的日志文件。您可以检查此日志文件中的任何错误消息或异常,这可能会指示导致服务器卡住的原因。
tail -f ${LOGS}/hugegraph-server.log
  1. 检查服务器进程:脚本将HugeGraphServer的进程ID(PID)写入位于"$PID_FILE"的文件。您可以使用此PID检查服务器进程的状态。
ps -ef | grep $(cat $PID_FILE)
  1. 增加服务器启动超时时间:脚本使用变量SERVER_STARTUP_TIMEOUT_S来指定脚本应等待服务器启动的最大时间(以秒为单位)。如果服务器启动的时间超过这个时间,您可以通过在运行脚本时设置-t选项来增加这个超时时间。
./start-hugegraph.sh -t 60
  1. 检查服务器的端口:脚本检查"$CONF/rest-server.properties"文件的"gremlinserver.url"和"restserver.url"属性中指定的端口是否可用。如果这些端口被其他进程使用,服务器可能无法启动。您可以使用netstat命令检查这些端口是否可用。
netstat -tuln | grep -E '8182|8080'
  1. 检查服务器的配置:脚本使用"$CONF/gremlin-server.yaml"和"$CONF/rest-server.properties"文件来配置服务器。您可以检查这些文件以确保它们正确配置。

参考资料:

如果您在调试过程中遇到任何问题,欢迎随时向我提问。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added bug Something isn't working question Further information is requested labels Dec 27, 2023
@SunnyBoy-WYH
Copy link
Contributor

SunnyBoy-WYH commented Dec 27, 2023

@ingla9988 are you use docker image deploy? what happens before you input admin password? Seems the default image dont enable auth mode if you just pull image and run.

@imbajin imbajin changed the title hugegraph1.0.0的版本中,启动卡主 [Question] hung up in hugegraph-server 1.0.0 after auth enabled Dec 27, 2023
@ingla9988
Copy link
Author

The problem has been resolved

@imbajin
Copy link
Member

imbajin commented Jan 2, 2024

The problem has been resolved

@dosu-bot, could you help to remind/check how does @ingla9988 solve the problem?

More context/information is clear for other users to refer

Copy link

dosubot bot commented Jan 2, 2024

🤖

I'm sorry, but I wasn't able to find specific information on how user @ingla9988 resolved the issue with HugeGraphServer 1.0.0 hanging after enabling auth and setting the admin password. It's possible that the solution was discussed outside of the repository or in a private conversation.

However, I can provide some general guidance on how to enable authentication and set the admin password in HugeGraphServer 1.0.0, which might help in troubleshooting similar issues.

To enable authentication and set the admin password, you need to modify the configuration options in the ServerOptions.java file.

  1. Set the AUTHENTICATOR option to the class path of the authenticator implementation. For example, you can use the org.apache.hugegraph.auth.StandardAuthenticator or org.apache.hugegraph.auth.ConfigAuthenticator.
public static final ConfigOption<String> AUTHENTICATOR =
        new ConfigOption<>(
                "auth.authenticator",
                "The class path of authenticator implementation. " +
                "e.g., org.apache.hugegraph.auth.StandardAuthenticator, " +
                "or org.apache.hugegraph.auth.ConfigAuthenticator.",
                null,
                "org.apache.hugegraph.auth.StandardAuthenticator"
        );
  1. Set the AUTH_ADMIN_TOKEN option to the desired admin password. This is only for org.apache.hugegraph.auth.ConfigAuthenticator.
public static final ConfigOption<String> AUTH_ADMIN_TOKEN =
        new ConfigOption<>(
                "auth.admin_token",
                "Token for administrator operations, " +
                "only for org.apache.hugegraph.auth.ConfigAuthenticator.",
                disallowEmpty(),
                "your_desired_admin_password"
        );

Please note that these changes should be made in the configuration file (usually a .properties file) that is used to initialize the server, not directly in the ServerOptions.java file. The ServerOptions.java file is showing the available configuration options and their default values.

You can find more details in the ServerOptions.java file.

If you have more specific information about the issue faced by @ingla9988 or the changes they made to resolve it, I would be happy to help further.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

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

Successfully merging a pull request may close this issue.

3 participants