@purbon found this issue when testing the PR I've made for the cli migration.
For the purpose of the QA test I have created a dummy filter named logstash-filter-qatest, this plugin is used for testing the install/update scenario and doesn't depends on any dependencies.
But the problem is easy to reproduce:
DEBUG= 1bin/logstash-plugin install logstash-filter-qatestThe install process will fails and you will get the following message.
0: ruby-maven (3.3.10) from /home/vagrant/logstash-5.0.0.dev/vendor/bundle/jruby/1.9/specifications/ruby-maven-3.3.10.gemspec
jar dependencies for logstash-core-event-java-5.0.0.dev-java.gemspec . . .
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /home/vagrant/logstash-5.0.0.dev/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.2/lib/jars/gemspec_pom.rb: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #... @1:1) @ line 1, column 1
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (/home/vagrant/logstash-5.0.0.dev/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.2/lib/jars/gemspec_pom.rb) has 1 error
[ERROR] Non-parseable POM /home/vagrant/logstash-5.0.0.dev/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.2/lib/jars/gemspec_pom.rb: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #... @1:1) @ line 1, column 1 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
Errno::ENOENT: No such file or directory - /home/vagrant/logstash-5.0.0.dev/vendor/local_gems/05921bf4/logstash-core-event-java-5.0.0.dev-java/deps.lst
org/jruby/RubyIO.java:3804:in `read'
org/jruby/RubyIO.java:3987:in `read'
/home/vagrant/logstash-5.0.0.dev/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.2/lib/jars/installer.rb:71:in `load_from_maven'
Artifact to reproduce: https://www.dropbox.com/s/c9f8b8yt6g7guuc/logstash-5.0.0.dev.tar.gz?dl=0
The same tar.gz doesnt yield an error on my laptop, so something its tied to the environment.
We have seem related errors in the pass when the .mvn was not included in the package.
I can confirm that this isn't the case:
./vendor/bundle/jruby/1.9/gems/ruby-maven-3.3.10/.mvn/extensions.xml
./vendor/bundle/jruby/1.9/gems/jrjackson-0.3.9-java/.mvn/extensions.xml
Running with sudo JARS_DEBUG=true JARS_VERBOSE=true DEBUG=1 bin/logstash-plugin install logstash-filter-qatest return more insteresting log. https://gist.github.com/ph/3472da3c0996add2dc85fa9875a56771
logstash-core-event-java-5.0.0.dev-java/.mvn/extensions.xml is missing I guess.
@mkristian Any idea why it would fail in that case? Btw we have added more verbosity now to the logstash-bundler things as requested ;)
@ph very much appreciate the extra output :) - the file /home/vagrant/.m2/repository/org/torquebox/mojo/mavengem-wagon/0.2.0/mavengem-wagon-0.2.0.pom.lastUpdated might have a clue. looks familiar to a case where java was not able to connect to https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.0/mavengem-wagon-0.2.0.pom due to some missing cacerts - just guessing here.
@mkristian I think you nailed it.
The content of the file look like a cacerts issue.
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Thu May 19 19:00:17 UTC 2016
@default-central-https\://repo.maven.apache.org/maven2/.lastUpdated=1463684417208
https\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.torquebox.mojo\:mavengem-wagon\:pom\:0.2.0 from/to central (https\://repo.maven.apache.org/maven2)\: java.lang.RuntimeException\: Unexpected error\: java.security.InvalidAlgorithmParameterException\: the trustAnchors parameter must be non-empty
Running this command fixed it!
sudo update-ca-certificates -f
Thanks @mkristian
Removing the blocker because we have a workaround.
Most helpful comment
Running this command fixed it!
Thanks @mkristian