How to debug my plugin in Eclipse

Hi,
I am very new to ElasticSearch and trying to debug my plugin using Eclipse. I saw a different post How to debug elasticsearch plugin using eclipse , but some links don't work and also i am in newer version of elasticsearch - 5.6

I can build my plugin and can deploy and install it on a running cluster and works just fine but i want to debug my plugin code in Eclipse IDE.

Steps that i did :

  • I have created an Eclipse project for my plugin with my plugins home directory as the project path. The elasticSearch jar is in the build path so using gradle i can build my plugin just fine.
  • Created a debug configuration with org.elasticsearch.bootstrap.Elasticsearch as the main class and -Des.foreground=true as VM parameter.

after running it i get below error : "ERROR: no log4j2.properties found; tried [C:\Users\U6074093\Workspaces\tr-logging\config] and its subdirectories"

Will appreciate your response .

Thanks

I tried to redo it .. followed https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#contributing-to-the-elasticsearch-codebase

in wondows i did below
gradlew eclipsethenFile: Import: Existing Projects into Workspace. Select the optionSearch for nested projects` .

Changed to make sure Eclipse is using 2048m of heap by modifying eclipse.ini

Ran debug configuration with org.elasticsearch.bootstrap.Elasticsearch and i was getting
Exception in thread "main" java.lang.IllegalStateException: path.home is not configured at org.elasticsearch.env.Environment.(Environment.java:101) at

Set VM Parameter -Des.path.home={workspacedir}/bin

but getting config dir not found.. if i change it to {workspacedir}\distribution\src\main\resources it complains the plugins dir not found....

what i am missing here ? Im in ES 5.6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.