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

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

Open
1 task done
sheli00 opened this issue Jan 29, 2024 · 1 comment
Open
1 task done

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

sheli00 opened this issue Jan 29, 2024 · 1 comment
Labels
bug Something isn't working rocksdb RocksDB backend

Comments

@sheli00
Copy link

sheli00 commented Jan 29, 2024

Bug Type (问题类型)

server status (启动/运行异常)

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: RocksDB SSD
  • OS: 6 CPUs, 20 G RAM, WSL Ubuntu 22.04

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

@sheli00 sheli00 added the bug Something isn't working label Jan 29, 2024
@dosubot dosubot bot added the rocksdb RocksDB backend label Jan 29, 2024
Copy link

dosubot bot commented Jan 29, 2024

🤖

你好 @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rocksdb RocksDB backend
Projects
None yet
Development

No branches or pull requests

1 participant