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

[Feature] server packaging failed, maybe caused by document outdated #2652

Closed
Thespica opened this issue Aug 31, 2024 · 3 comments
Closed

[Feature] server packaging failed, maybe caused by document outdated #2652

Thespica opened this issue Aug 31, 2024 · 3 comments
Labels
bug Something isn't working feature New feature

Comments

@Thespica
Copy link
Contributor

Thespica commented Aug 31, 2024

Feature Description (功能描述)

follow the tutorial about server but met error:

[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   PerfUtilTest.testPerfUtilPerf:352 » CannotCompile by java.lang.reflect.Invocat...
[ERROR]   PerfUtilTest.testPerfUtilPerf4LightStopwatch:395 » CannotCompile by java.lang....
[ERROR]   PerfUtilTest.testPerfUtilWithProfilePackage:253 » CannotCompile by java.lang.r...
[ERROR]   RestClientTest.testPostHttpsWithAllParams:118 » Runtime java.net.SocketTimeout...
[ERROR]   RestClientTest.testPostHttpsWithTokenAndAllParams:135 » Runtime java.net.Socke...
[INFO]
[ERROR] Tests run: 342, Failures: 0, Errors: 5, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for hugegraph 1.5.0:
[INFO]
[INFO] hugegraph .......................................... SUCCESS [  1.161 s]
[INFO] hugegraph-commons .................................. SUCCESS [  0.685 s]
[INFO] hugegraph-common ................................... FAILURE [ 35.086 s]
[INFO] hugegraph-pd ....................................... SKIPPED
[INFO] hg-pd-grpc ......................................... SKIPPED
[INFO] hg-pd-common ....................................... SKIPPED
[INFO] hg-pd-client ....................................... SKIPPED
[INFO] hugegraph-store .................................... SKIPPED
[INFO] hg-store-common .................................... SKIPPED
[INFO] hugegraph-server ................................... SKIPPED
[INFO] hugegraph-core ..................................... SKIPPED
[INFO] hugegraph-rpc ...................................... SKIPPED
[INFO] hugegraph-api ...................................... SKIPPED
[INFO] hugegraph-cassandra ................................ SKIPPED
[INFO] hugegraph-scylladb ................................. SKIPPED
[INFO] hugegraph-rocksdb .................................. SKIPPED
[INFO] hugegraph-mysql .................................... SKIPPED
[INFO] hugegraph-palo ..................................... SKIPPED
[INFO] hugegraph-hbase .................................... SKIPPED
[INFO] hugegraph-postgresql ............................... SKIPPED
[INFO] hg-store-grpc ...................................... SKIPPED
[INFO] hg-store-client .................................... SKIPPED
[INFO] hugegraph-hstore ................................... SKIPPED
[INFO] hugegraph-dist ..................................... SKIPPED
[INFO] hugegraph-example .................................. SKIPPED
[INFO] hugegraph-test ..................................... SKIPPED
[INFO] hg-pd-core ......................................... SKIPPED
[INFO] hg-pd-service ...................................... SKIPPED
[INFO] hg-pd-dist ......................................... SKIPPED
[INFO] hg-pd-test ......................................... SKIPPED
[INFO] hg-store-rocksdb ................................... SKIPPED
[INFO] hg-store-core ...................................... SKIPPED
[INFO] hg-store-node ...................................... SKIPPED
[INFO] hg-store-test ...................................... SKIPPED
[INFO] hg-store-dist ...................................... SKIPPED
[INFO] hg-store-cli ....................................... SKIPPED
[INFO] install-dist ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  37.459 s
[INFO] Finished at: 2024-08-31T17:47:19+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project hugegraph-common: There are test failures.
[ERROR]
[ERROR] Please refer to /home/john/hugegraph/tmp/hugegraph/hugegraph-commons/hugegraph-common/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :hugegraph-common

I guess the directory should be *hugegraph/*server, rather than *hugegraph?

PS: maybe this issue should be marked as question, and be posted in documentation repository?

@Thespica Thespica added the feature New feature label Aug 31, 2024
Copy link

dosubot bot commented Aug 31, 2024

The server packaging failed with errors in PerfUtilTest and RestClientTest because the tutorial suggests using the -DskipTests parameter during the Maven build process. This parameter skips the tests, which would prevent errors in PerfUtilTest and RestClientTest from causing the build to fail.

mvn package -DskipTests

If you did not use the -DskipTests parameter, the tests would run, and any issues in PerfUtilTest and RestClientTest could cause the build to fail. This is not related to an outdated document or incorrect directory structure.

Additionally, if you are setting up the server in IntelliJ IDEA, ensure that you have followed the steps to configure the development environment correctly, including copying the necessary configuration files and setting the appropriate VM options for Java 11. For detailed instructions, refer to the Setup Server in IDEA (Dev) guide.

To summarize the key steps for setting up the server in IntelliJ IDEA:

  1. Copy Configuration Files: Copy the necessary configuration files to a separate directory to avoid affecting Git tracking.

    cp -r hugegraph-dist/src/assembly/static/scripts hugegraph-dist/src/assembly/static/conf path-to-your-directory
  2. Initialize the Graph: Configure the database backend in the hugegraph.properties file and run the InitStore class.

    backend=rocksdb
    serializer=binary
    rocksdb.data_path=.
    rocksdb.wal_path=.
  3. Run HugeGraphServer: Create a new Application configuration in IntelliJ IDEA to run the HugeGraphServer class with the appropriate VM options if using Java 11.

    --add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED --add-modules=jdk.unsupported --add-exports=java.base/sun.nio.ch=ALL-UNNAMED

By following these steps, you can ensure that the server is set up correctly in your development environment, and you can avoid issues related to test failures during the build process [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the bug Something isn't working label Aug 31, 2024
@VGalaxies
Copy link
Contributor

We have noticed this issue and fixed it in #2651...

@Thespica
Copy link
Contributor Author

Thespica commented Aug 31, 2024

Thank you!
Sorry that I ignored that.

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

No branches or pull requests

2 participants