apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.58k stars 512 forks source link

[Bug] start server failed but still port in use #2430

Open sheli00 opened 5 months ago

sheli00 commented 5 months ago

Bug Type (问题类型)

server status (启动/运行异常)

Before submit

Environment (环境信息)

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

I'm following the docto run the quickstart section。official doc When I run the following command:bin/init-store.sh it goes like this:

sheli@sheli:~/project/incubator-hugegraph/hugegraph-server/apache-hugegraph-incubating-1.2.0$ ./bin/start-hugegraph.sh Starting HugeGraphServer in daemon mode... Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)................ curl: (7) Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused The operation timed out(30s) when attempting to connect to http://127.0.0.1:8080/graphs See /home/sheli/project/incubator-hugegraph/hugegraph-server/apache-hugegraph-incubating-1.2.0/logs/hugegraph-server.log for HugeGraphServer log output.

Later I found out that a certain file could not be downloaded because my dns did not configure the github IP. due to the log:

curl: (28) Failed to connect to github.com port 443 after 299341 ms: Connection timed out

Here goes the strange part, after I configured the dns, I run the shell again, and I got The port 8182 has already been used.

So the shell set 30s timeout, but the server start anyway after curl timeout, which was near 300s. BTW, the started server did not return a 200.

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

No response

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

No response

dosubot[bot] commented 5 months ago

🤖

你好 @sheli00! 🎉 我是Dosu,一个能帮助你解决问题,回答你的疑问,并成为贡献者的 bot。在等待真人维护者的同时,我会在这里为你提供帮助。虽然我是个机器人,但我保证会尽我所能帮助你。😀

The issue you're experiencing could be due to a couple of reasons:

  1. The server might have started in the background even though the curl command timed out. This could be why you're seeing the "port 8182 is already in use" error. The server might not have been able to respond with a 200 status code because it was still in the process of starting up when the curl command timed out.

  2. There might be another process using port 8182. You can check this by running lsof -i :8182 or netstat -tuln | grep 8182 in your terminal. If there is another process using this port, you will need to stop it or change the port that HugeGraph uses.

  3. There might be an issue with the bin/init-store.sh script. If this script fails to run correctly, it could prevent the server from starting up properly. You can check the logs for any error messages that might indicate what went wrong.

As for the bin/init-store.sh script, it is used to initialize the HugeGraph Store. It sets up the environment variables and paths required for the HugeGraph Store, checks if the JAVA_HOME environment variable is set, checks the Java version, finds all the .jar files in the LIB and PLUGINS directories and sets them in the classpath (CP), then runs the org.apache.hugegraph.cmd.InitStore command with the rest-server.properties configuration file. This command initializes the HugeGraph Store. Finally, it prints a message indicating that the initialization has finished.

You can find more details about this script in the source code.

Without more information, it's hard to say exactly what the issue is. However, these are some possible explanations based on the information you've provided. If you could provide more details about the error messages you're seeing or the steps you're taking, it would be easier to diagnose the problem.

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.