Comments (3)
It appears that the issue you are describing is in the bin/elasticsearch
shell script. The plugin starts a new process using the arguments listed on the last INFO line in your output (ie. the last [INFO] Elasticsearch[0]: Executing command ...
). From here on the ES startup script takes over and builds the java command to execute.
Off the top, I would suggest one of the following:
- download the ES distribution, unzip and start ES; or simply go to ${your_mvn_proj}/target/elasticsearch0 (this is where the ES distro gets downloaded and unpacked by the plugin) and run
$ bin/elasticsearch
; I would expect this to fail as well - upgrade the ES version in the plugin config; I just checked the bin/elasticsearch in 5.0.0 and it uses this to execute java (note the double quotes around the cp):
$ exec "$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.bootstrap.Elasticsearch "$@"
You didn't say what the plugin config is. I am interested in the plugin version and the ES version.
from elasticsearch-maven-plugin.
Here's the full plugin config
<plugin>
<groupId>com.github.alexcojocaru</groupId>
<artifactId>elasticsearch-maven-plugin</artifactId>
<version>${maven.plugin.elasticsearch.version}</version>
<configuration>
<clusterName>esDevCluster</clusterName>
<httpPort>${es.httpPort}</httpPort>
<transportPort>${es.tcpPort}</transportPort>
<version>${maven.plugin.elasticsearch.configuration.version}</version>
<keepExistingData>true</keepExistingData>
<timeout>60</timeout>
<skip>${es.skip.start}</skip>
<pathConf>elasticsearch/conf</pathConf>
<logLevel>DEBUG</logLevel>
</configuration>
<executions>
<execution>
<id>start-elasticsearch</id>
<phase>validate</phase>
<goals>
<goal>runforked</goal>
</goals>
</execution>
<execution>
<id>stop-elasticsearch</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
where
<maven.plugin.elasticsearch.version>6.4</maven.plugin.elasticsearch.version>
<maven.plugin.elasticsearch.configuration.version>5.6.8</maven.plugin.elasticsearch.configuration.version>
As you mentioned in your comment, running bin/elastic
throws the exact same error.
I tried editing the bin/elasticsearch
script to add quotes to the -cp parameter, but when I run the project with the respective mvn command, the target/elasticsearch0/bin/elasticsearch
script is re-generated by the mvn process, so any changes I do are overwritten.
I might have found a workaround for the issue though.
If I set the ES_JVM_OPTIONS
env variable to -cp "./target/elasticsearch0/lib/*"
in my IDE's (IntelliJ) run configuration (or in the terminal before executing the run command), the project runs nicely, but took quite some time to figure that out.
Perhaps worth adding that to the README file for other OSX users?
from elasticsearch-maven-plugin.
Thanks for the additional details and for describing the workaround. I will add a note about this to the README.
from elasticsearch-maven-plugin.
Related Issues (20)
- unable to download via proxy HOT 5
- No such file or directory error during parallel plugin executions in jenkins HOT 13
- How to fix elasticsearch node startup taking too long? HOT 4
- Add support for downloading from a url protected by basic authentication HOT 3
- Failed to execute goal com.github.alexcojocaru:elasticsearch-maven-plugin:6.13:runforked (start-elasticsearch) on project website: This Elasticsearch process destroyer does not support this operation HOT 2
- Failed to compile in java 11 HOT 2
- Import not found in the prebuild groovy script HOT 4
- Add elasticsearch oss for 6.8.10 HOT 4
- Cannot read the PID of the Elasticsearch process from the pid file in directory "target/elasticsearch0" HOT 2
- Cannot download and start 8.x HOT 8
- Cannot delete download directory for 8.x with plugin 6.20 HOT 1
- Unable to call POST _refresh HOT 6
- Could not resolve artifact with coordinates org.elasticsearch.distribution.zip:elasticsearch:zip:6.8.0 HOT 4
- "master not discovered yet" for 6.20+ HOT 5
- Problem running plugin on java 17 HOT 8
- Plugin seems to be there, but I get Connection refused HOT 4
- Error in opening zip file HOT 1
- Compatibility of licenses HOT 5
- Similiar Plugin for OpenSearch? HOT 2
- resolve ES for Mac M1? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-maven-plugin.