You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "sheli00 (via GitHub)" <gi...@apache.org> on 2024/01/29 06:43:20 UTC

[I] [Bug] start server failed but still port in use [incubator-hugegraph]

sheli00 opened a new issue, #2430:
URL: https://github.com/apache/incubator-hugegraph/issues/2430

   ### Bug Type (问题类型)
   
   server status (启动/运行异常)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (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](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#512-rocksdb)
   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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] start server failed but still port in use [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2430:
URL: https://github.com/apache/incubator-hugegraph/issues/2430#issuecomment-1914064606

   _🤖_
   <!-- Greeting -->
   你好 @sheli00! 🎉 我是[Dosu](https://dosu.dev),一个能帮助你解决问题,回答你的疑问,并成为贡献者的 bot。在等待真人维护者的同时,我会在这里为你提供帮助。虽然我是个机器人,但我保证会尽我所能帮助你。😀
   
   <!-- Answer -->
   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](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh).
   
   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
   - [hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh)
   - [hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh)
   
   ---
   
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org