question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sometimes failed to run(can not copy embedded jar to temp directory)

See original GitHub issue

Sometimes embulk failed to run. When I tried the same command at another time, it succeeded. But I have to check everyday.

  • OS: CentOS Linux release 7.6.1810 (Core) on GCE

  • Java: openjdk version “1.8.0_212”

  • Embulk: 0.9.15

  • Plugins: embulk (0.9.15 java) embulk-formatter-jsonl (0.1.4) embulk-output-bigquery (0.4.10) embulk-parser-jsonl (0.2.0)

  • Log:

$ embulk run hoge.dig
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
2019-05-13 06:11:01.332 +0900: Embulk v0.9.16
2019-05-13 06:11:02.284 +0900 [WARN] (main): DEPRECATION: JRuby org.jruby.embed.ScriptingContainer is directly injected.
2019-05-13 06:11:07.800 +0900 [INFO] (main): Gem's home and path are set by default: "/PATH/.embulk/lib/gems"
2019-05-13 06:11:13.171 +0900 [INFO] (main): Started Embulk v0.9.16
RuntimeError: 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)
              do_require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:348
    block in require_jar at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:255
  require_jar_with_block at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:297
             require_jar at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:254
             require_jar at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:357
                  <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jopenssl/load.rb:14
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt/signature.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt/signature.rb:4
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt.rb:8
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/signet-0.11.0/lib/signet/oauth_2/client.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/signet-0.11.0/lib/signet/oauth_2/client.rb:21
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/signet.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/signet.rb:30
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/compute_engine.rb:1
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
                  <main> at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/compute_engine.rb:31
                 require at org/jruby/RubyKernel.java:955
                  (root) at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/application_default.rb:1
                  <main> at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/application_default.rb:30
                 require at org/jruby/RubyKernel.java:955
                 require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133
                  (root) at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth.rb:1
                  (root) at /PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth.rb:30
                  (root) at /PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/lib/google/apis/core/base_service.rb:1
                  (root) at /PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/lib/google/apis/core/base_service.rb:23
                  (root) at /PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/generated/google/apis/bigquery_v2/service.rb:1
                  (root) at /PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/generated/google/apis/bigquery_v2/service.rb:15
org.embulk.config.ConfigException: OutputPlugin 'bigquery' is not found.
(RuntimeError) 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)
    at org.embulk.plugin.PluginManager.buildPluginNotFoundException(PluginManager.java:78)
    at org.embulk.plugin.PluginManager.newPluginWithoutWrapper(PluginManager.java:64)
    at org.embulk.plugin.PluginManager.newPlugin(PluginManager.java:31)
    at org.embulk.spi.ExecSession.newPlugin(ExecSession.java:157)
    at org.embulk.spi.Exec.newPlugin(Exec.java:67)
    at org.embulk.exec.BulkLoader$ProcessPluginSet.<init>(BulkLoader.java:428)
    at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:502)
    at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
    at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353)
    at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350)
    at org.embulk.spi.Exec.doWith(Exec.java:22)
    at org.embulk.exec.BulkLoader.run(BulkLoader.java:350)
    at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:178)
    at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:292)
    at org.embulk.EmbulkRunner.run(EmbulkRunner.java:156)
    at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:436)
    at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:91)
    at org.embulk.cli.Main.main(Main.java:64)
    Suppressed: org.embulk.plugin.PluginSourceNotMatchException
        at org.embulk.plugin.InjectedPluginSource.newPlugin(InjectedPluginSource.java:53)
        at org.embulk.plugin.PluginManager.newPluginWithoutWrapper(PluginManager.java:52)
        ... 16 more
    Suppressed: org.embulk.plugin.PluginSourceNotMatchException
        at org.embulk.plugin.maven.MavenPluginSource.newPlugin(MavenPluginSource.java:68)
        at org.embulk.plugin.PluginManager.newPluginWithoutWrapper(PluginManager.java:52)
        ... 16 more
    Suppressed: org.embulk.plugin.PluginSourceNotMatchException: org.jruby.embed.InvokeFailedException: (RuntimeError) 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)
        at org.embulk.jruby.JRubyPluginSource.newPlugin(JRubyPluginSource.java:63)
        at org.embulk.plugin.PluginManager.newPluginWithoutWrapper(PluginManager.java:59)
        ... 16 more
    Caused by: org.jruby.embed.InvokeFailedException: (RuntimeError) 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)
        at org.jruby.embed.internal.EmbedRubyObjectAdapterImpl.call(EmbedRubyObjectAdapterImpl.java:320)
        at org.jruby.embed.internal.EmbedRubyObjectAdapterImpl.callMethod(EmbedRubyObjectAdapterImpl.java:159)
        at org.jruby.embed.ScriptingContainer.callMethod(ScriptingContainer.java:1459)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.embulk.jruby.ScriptingContainerDelegateImpl.callMethod(ScriptingContainerDelegateImpl.java:596)
        at org.embulk.jruby.LazyScriptingContainerDelegate.callMethod(LazyScriptingContainerDelegate.java:116)
        at org.embulk.jruby.JRubyPluginSource.newPlugin(JRubyPluginSource.java:61)
        ... 17 more
    Caused by: org.jruby.exceptions.RaiseException: (RuntimeError) 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)
        at RUBY.do_require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:348)
        at RUBY.block in require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:255)
        at RUBY.require_jar_with_block(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:297)
        at RUBY.require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:254)
        at RUBY.require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:357)
        at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jopenssl/load.rb:14)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt/signature.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt/signature.rb:4)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/jwt-2.1.0/lib/jwt.rb:8)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/signet-0.11.0/lib/signet/oauth_2/client.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/signet-0.11.0/lib/signet/oauth_2/client.rb:21)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/signet.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/signet.rb:30)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/compute_engine.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/compute_engine.rb:31)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/application_default.rb:1)
        at RUBY.<main>(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth/application_default.rb:30)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:955)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth.rb:1)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/googleauth-0.8.0/lib/googleauth.rb:30)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/lib/google/apis/core/base_service.rb:1)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/lib/google/apis/core/base_service.rb:23)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/generated/google/apis/bigquery_v2/service.rb:1)
        at RUBY.(root)(/PATH/.embulk/lib/gems/gems/google-api-client-0.28.4/generated/google/apis/bigquery_v2/service.rb:15)
Error: OutputPlugin 'bigquery' is not found.
(RuntimeError) 
    you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
load error: org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56 -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory (LoadError)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
yoruno07commented, May 15, 2020

I had same problems. I use embulk & BigQuery plugin in Docker Container. But, maybe I resolved this problem through install plugin jruby-openssl in advance.

  • environment OS : Alpine Linux 3.9.4 (by openjdk:8-jdk-alpine image) JDK: openjdk version “1.8.0_242” Embulk: 0.9.22

In Dockerfile Before

RUN curl -o /usr/local/bin/embulk --create-dirs -L "http://dl.embulk.org/embulk-0.9.22.jar" && \
    chmod +x /usr/local/bin/embulk && \
    /usr/local/bin/embulk gem install embulk-input-mysql -v 0.10.1 && \
    /usr/local/bin/embulk gem install embulk-output-bigquery -v 0.6.4

After

RUN curl -o /usr/local/bin/embulk --create-dirs -L "http://dl.embulk.org/embulk-0.9.22.jar" && \
    chmod +x /usr/local/bin/embulk && \
    /usr/local/bin/embulk gem install embulk-input-mysql -v 0.10.1 && \
    /usr/local/bin/embulk gem install embulk-output-bigquery -v 0.6.4 && \
    /usr/local/bin/embulk gem install jruby-openssl -v 0.10.4 # add

After add jruby plugin, I never occur this problems.

0reactions
doctorcommented, Mar 8, 2022

@hiroyuki-sato this issue is resolved after setting GEM_HOME as suggested by @progrhyme

export GEM_HOME=/home/jpillai/.embulk/lib/gems

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logstash is failing when running as a service due to logstash ...
RuntimeException: BUG: we can not copy embedded jar to temp directory Apr 27 19:12:50 server logstash[21963]: Does it try to require a ...
Read more >
Sudden error when trying to run local logstash instance
RuntimeException: BUG: we can not copy embedded jar to temp directory Does it try to require a relative path? That's been removed in...
Read more >
Logstash 6.3.2 unable to start with error: Error accessing temp ...
You can resolve this issue by: 1) Re-mount the temp directory as EXEC. ... 2.3) Restart Logstash. Document Location. Worldwide.
Read more >
Relic Solution: Java Agent JARs in the /temp directory
This error indicates the Java agent's attempt to create the necessary temp files and not being able to find and/or write to the...
Read more >
Common Problems | TeamCity On-Premises Documentation
TeamCity server restoration from a backup may fail with errors like "Unique key violation" or "Duplicates found" if the character sets (or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found