So I'm not really sure what happened. Yesterday I was running my logstash instance locally using docker and had no issues.
Now all of my docker containers are running into this same error message when I try to run it. I can confirm that yesterday this was not an issue whatsoever:
/usr/share/logstash/logstash-core-plugin-api/lib/logstash-core-plugin-api/version.rb:22: warning: The Psych YAML extension failed to load.
Check your env for conflicting versions of SnakeYAML
See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment
[FATAL] 2021-08-10 14:41:28.832 [main] Logstash - Logstash stopped processing because of an error: (GemspecError)
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
# -------------------------------------------
#
> require "logstash-core-plugin-api/version"
#
# -------------------------------------------
org.jruby.exceptions.StandardError: (GemspecError)
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
# -------------------------------------------
#
> require "logstash-core-plugin-api/version"
#
# -------------------------------------------
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.eval_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:530) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec_uncached(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:459) ~[?:?]
at org.jruby.RubyDir.chdir(org/jruby/RubyDir.java:439) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.shared_helpers.chdir(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:65) ~[?:?]
at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.monitor.mon_synchronize(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:235) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.shared_helpers.chdir(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:64) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec_uncached(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:458) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:444) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:151) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_spec_files(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:166) ~[?:?]
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1809) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_spec_files(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:165) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.local_specs(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:100) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.specs(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:108) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs_for_source_changed?(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:594) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs_changed?(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:579) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.converge_paths(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:623) ~[?:?]
at org.jruby.RubyArray.any?(org/jruby/RubyArray.java:4493) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.converge_paths(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:622) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.initialize(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:119) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.dsl.to_definition(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:234) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.dsl.evaluate(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:13) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.build(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:34) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:135) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.setup(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:101) ~[?:?]
at usr.share.logstash.lib.bootstrap.bundler.setup!(/usr/share/logstash/lib/bootstrap/bundler.rb:77) ~[?:?]
at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:84) ~[?:?]
I haven't changed any code for this to happen so I'm really confused.
Any reason for this? Or at the very least how can I remove this error as it is blocking me from debugging our project.
Thanks
So I found out the reason. I haven't been pruning my old docker images and it was adding up every time I built.
A simple command: docker image prune cleared the old images and everything worked again
Related
I'm trying to install jena (as a requirement of Islandora), running Karaf 4.2.11, however when I run the command to install, /opt/karaf/bin/client feature:install jena, an error is returned. I got the full text of the error, located below, from the Karaf log.
2021-09-14T11:10:00,610 | ERROR | Thread-57 | ShellUtil | 38 - org.apache.karaf.shell.core - 4.2.11 | Exception caught while executing command
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=jena; type=karaf.feature; version="[4.1.0,4.1.0]"; filter:="(&(osgi.identity=jena)(type=karaf.feature)(version>=4.1.0)(version<=4.1.0))" [caused by: Unable to resolve jena/4.1.0: missing requirement [jena/4.1.0] osgi.identity; osgi.identity=org.apache.jena.osgi; type=osgi.bundle; version="[4.1.0,4.1.0]"; resolution:=mandatory [caused by: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332) ~[?:?]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:401) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1063) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve jena/4.1.0: missing requirement [jena/4.1.0] osgi.identity; osgi.identity=org.apache.jena.osgi; type=osgi.bundle; version="[4.1.0,4.1.0]"; resolution:=mandatory [caused by: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
... 12 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
... 12 more
I've not used Karaf before, but I've looked through a lot of issues and can't seem to decipher the error, though I think it has to do with the Java version? I'm running version 11.0.11 of openJDK. It seems to me like that's the version it's asking for, though. Is there some configuration I'm missing?
I'm happy to supply any other troubleshooting info, I just can't find where to go from here, not having worked with Karaf before.
The issue here is that Karaf is being run with Java 8. You can see evidence of that in the line:
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
(The execution environment is Java 1.8.0_292)
Jena 4.x requires Java 11+
In order to use Java 11, be sure to set the JAVA_HOME environment value to point to the correct installation. On linux-based environments, this can often be handled with the update-alternatives --config java command
Raised a related bug after further investigation - https://bz.apache.org/bugzilla/show_bug.cgi?id=65417
We're running JMeter distributed setup. There's a groovy script in our JMeter test plan which is accessing a json file and works fine on local testing (on Windows PC or alpine-based JRE-headless docker image with JMeter client and server running in same container):
${__groovy(new File(org.apache.jmeter.services.FileServer.getFileServer().getBaseDir() + System.getProperty('file.separator') + 'message.json').text)}
But running the same test plan using same docker image running JMeter client and server on separate docker containers, it throws the following exception (taken from worker/JMeter server logs):
2021-06-30 09:54:44,258 WARN o.a.j.f.Groovy: Error running groovy script
javax.script.ScriptException: javax.script.ScriptException: java.io.FileNotFoundException: /root/artifacts/root/artifacts/message.json (No such file or directory)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at javax.script.AbstractScriptEngine.eval(Unknown Source) ~[java.scripting:?]
at org.apache.jmeter.functions.Groovy.execute(Groovy.java:120) [ApacheJMeter_functions.jar:5.4.1]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:138) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:113) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:100) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:280) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.config.Argument.getValue(Argument.java:145) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.protocol.http.util.HTTPArgument.getEncodedValue(HTTPArgument.java:249) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.util.HTTPArgument.getEncodedValue(HTTPArgument.java:230) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.setupHttpEntityEnclosingRequestData(HTTPHC4Impl.java:1643) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.handleMethod(HTTPHC4Impl.java:886) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:641) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1296) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1285) [ApacheJMeter_http.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.4.1]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: javax.script.ScriptException: java.io.FileNotFoundException: /root/artifacts/root/artifacts/message.json (No such file or directory)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) ~[groovy-jsr223-3.0.7.jar:3.0.7]
... 20 more
Caused by: java.io.FileNotFoundException: /root/artifacts/root/artifacts/message.json (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:?]
at java.io.FileInputStream.open(Unknown Source) ~[?:?]
at java.io.FileInputStream.<init>(Unknown Source) ~[?:?]
at groovy.util.CharsetToolkit.<init>(CharsetToolkit.java:78) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1780) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:591) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.dgm$1040.doMethodInvoke(Unknown Source) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.doMethodInvoke(GeneratedMetaMethod.java:83) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:63) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329) ~[groovy-3.0.7.jar:3.0.7]
at Script1.run(Script1.groovy:1) ~[?:?]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) ~[groovy-jsr223-3.0.7.jar:3.0.7]
... 20 more
The path is incorrect (repeated root/artifacts). Is this platform issue or something we're missing in config or script?
It doesn't look like a JMeter issue to me
According to How do I ask a good question? page you're supposed to "Help others reproduce the problem" and without
seeing your Dockerfile and knowing the way
seeing where and how do you call this __groovy() function in your Test Plan
knowing the way you're launching your tests
seeing jmeter.log files from master and slave preferably with debug logging enabled
I'm afraid no one will be able to help you with your problem, at least I cannot reproduce it on Linux, the base dir returned is basically the directory where I launch JMeter from without any duplication of any path fragments
I'm trying to use Vaadin-CDI 11.0.0.rc1 with Karaf 4.2.5 . When trying to install the bundle directly, it throws me an error :
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1:
org.osgi.framework.BundleException: OSGi R3 bundle not supported
And when I try installing it from a feature.xml inside my-project I get a different error :
karaf#root()> feature:install com.my-project.feature
org.apache.karaf.features.internal.util.MultiException: Error:
Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:91)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:457)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:224)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1058)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:994)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.Exception: Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:824)
at org.apache.karaf.features.internal.region.Subsystem.lambda$downloadBundles$1(Subsystem.java:499)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.lambda$download$0(MavenDownloadManager.java:138)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:350)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:335)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:259)
at org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:61)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
... 3 more
Caused by: org.osgi.framework.BundleException: Unable to build resource for mvn:com.vaadin/vaadin-cdi/11.0.0.rc1: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:71)
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:822)
... 13 more
Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.doBuild(ResourceBuilder.java:90)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:80)
... 15 more
Error executing command: Error:
Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
So I headed to the MANIFEST.MF of Vaadin-CDI and discovered that there is no Bundle-ManifestVersion inside it.
Is it normal ? If not, how do I fix it ?
EDIT :
I tried cloning vaadin-cdi in my project and then I replaced VaadinServlet with CdiVaadinServlet, the build goes smoothly, and when I install it in Karaf there's no problem until I go in the logs in which I see there's a NullPointerException :
java.lang.NullPointerException: null
at com.project.pax.vaadin.cdi.BeanLookup.lookupOrElseGet(BeanLookup.java:87) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.BeanLookup.lookup(BeanLookup.java:105) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.lookup(CdiVaadinServletService.java:170) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.init(CdiVaadinServletService.java:123) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.createServletService(CdiVaadinServlet.java:91) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:186) ~[65:com.vaadin.flow.server:2.0.0.rc2]
at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:73) ~[65:com.vaadin.flow.server:2.0.0.rc2]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.init(CdiVaadinServlet.java:54) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet.init(VaadinServletRegistration.java:31) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:414) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847) ~[118:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[121:org.eclipse.jetty.util:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:252) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElements(WebApplication.java:371) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:283) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:232) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:68) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:86) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:105) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:426) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$1(Activator.java:344) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
15:16:57.159 ERROR [paxweb-config-1-thread-1] Could not start the servlet context for context path []
javax.servlet.ServletException: org.ops4j.pax.web.service.spi.model.ServletModel-2#378be0fa==com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet,jsp=null,order=-1,inst=false
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:691) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760) ~[?:?]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:414) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847) ~[?:?]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:252) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElements(WebApplication.java:371) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:283) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:232) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:68) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:86) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:105) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:426) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$1(Activator.java:344) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at com.project.pax.vaadin.cdi.BeanLookup.lookupOrElseGet(BeanLookup.java:87) ~[?:?]
at com.project.pax.vaadin.cdi.BeanLookup.lookup(BeanLookup.java:105) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.lookup(CdiVaadinServletService.java:170) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.init(CdiVaadinServletService.java:123) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.createServletService(CdiVaadinServlet.java:91) ~[?:?]
at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:186) ~[?:?]
at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:73) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.init(CdiVaadinServlet.java:54) ~[?:?]
at com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet.init(VaadinServletRegistration.java:31) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670) ~[?:?]
... 38 more
It seems to be related to the context-path but I'm not sure what file I should modify or add to handle that.
I might need to change the title to refer to pax logging.
Phenomenon observed:
log entry
... 2 more
Desired outcome:
log entry
log entry
log entry
Notice that the entries in the desired outcome have not been curtailed.
Background
When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?
org.ops4j.pax.logging.cfg
################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan
# Common pattern layout for appenders
log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
log4j2.out.pattern = \u001b[90m%d{HH:mm:ss\.SSS}\u001b[0m %highlight{%-5level}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %msg%n%throwable
# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-FINEST}
# Loggers configuration
# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO
# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN
# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
# Appenders configuration
# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = ${log4j2.out.pattern}
# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = ${karaf.log}/karaf.log
log4j2.appender.rolling.filePattern = ${karaf.log}/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB
# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = ${karaf.log}/security.log
log4j2.appender.audit.filePattern = ${karaf.log}/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB
# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *
# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE
Steps to reproduce
Install Karaf 4.2.4
Make new Java project
mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.testproject \
-DartifactId=karaftest
Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>
Main.class:
import org.apache.camel.blueprint.BlueprintCamelContext;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();
System.out.println( "Hello World!" );
}
}
Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.
<packaging>bundle</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>
Build it
mvn clean install
Place bundle's jar into Karaf's deploy folder.
Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)
Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)
Exception caught while executing command
Karaf Log Contains
11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more
Related: How do I stop stacktraces truncating in logs
I am getting the following error while trying to build an application.
It worked properly from long time, recently it stopped the build process and throws the error. The configuration of the build uses slave node, In google many suggested that the issue may related to the Java version issues in slave node and the selected version in jenkings configuration section.
FATAL: Unable to produce a script file
hudson.util.IOException2: Failed to create a temp file on
/scratch/jenkins/workspace/
at hudson.FilePath.createTextTempFile(FilePath.java:1223)
at hudson.tasks.CommandInterpreter.createScriptFile(CommandInterpreter.java:115)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:75)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:60)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1593)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: hudson.util.IOException2: remote file operation failed:
/scratch/jenkins/workspace/ERT_PC_CF7 at
hudson.remoting.Channel#1f9efe8:build- linux-1
at hudson.FilePath.act(FilePath.java:901)
at hudson.FilePath.act(FilePath.java:878)
at hudson.FilePath.createTextTempFile(FilePath.java:1200)
... 12 more
Caused by: hudson.util.IOException2: Failed to create a temporary directory in /tmp
at hudson.FilePath$14.invoke(FilePath.java:1212)
at hudson.FilePath$14.invoke(FilePath.java:1200)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2393)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.io.IOException: Read-only file system
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1717)
at java.io.File.createTempFile0(File.java:1738)
at java.io.File.createTempFile(File.java:1815)
at hudson.FilePath$14.invoke(FilePath.java:1210)
This is not a permission issue. The issue has been resolved by rebooting the slave nodes as the whole file system in slave node went into read mode, even the root user gets exception with touch command on the directory /scratch/jenkins/workspace/ .