Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-15943

Remote cloud runs fail when internal ssl is enabled

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1.0
    • Component/s: Cloud Provisioner
    • Labels:
      None
    • Rank:
      1|i00rhz:

      Description

      We're seeing this error in the remote runtime when internal ssl is enabled:

      2019-09-25 02:10:08,387 - ERROR [main:i.c.c.i.a.r.d.AbstractProgramTwillRunnable@204] - Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.RuntimeException: Failed to create keystore from PEM file /etc/cdap/security/interalCert.pem
        at io.cdap.cdap.messaging.server.MessagingHttpService.<init>(MessagingHttpService.java:61)
        at io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule$LocalModule.configure(MessagingServerRuntimeModule.java:135) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$OverrideModule -> io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule$LocalModule)
        while locating io.cdap.cdap.messaging.server.MessagingHttpService
      
      1 error
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.RuntimeException: Failed to create keystore from PEM file /etc/cdap/security/interalCert.pem
        at io.cdap.cdap.messaging.server.MessagingHttpService.<init>(MessagingHttpService.java:61)
        at io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule$LocalModule.configure(MessagingServerRuntimeModule.java:135) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$OverrideModule -> io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule$LocalModule)
        while locating io.cdap.cdap.messaging.server.MessagingHttpService
      
      1 error
              at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) ~[com.google.inject.guice-4.0.jar:na]
              at io.cdap.cdap.internal.app.runtime.distributed.AbstractProgramTwillRunnable.addIsolatedServices(AbstractProgramTwillRunnable.java:538) [na:na]
              at io.cdap.cdap.internal.app.runtime.distributed.AbstractProgramTwillRunnable.createCoreServices(AbstractProgramTwillRunnable.java:515) [na:na]
              at io.cdap.cdap.internal.app.runtime.distributed.AbstractProgramTwillRunnable.doInitialize(AbstractProgramTwillRunnable.java:259) [na:na]
              at io.cdap.cdap.internal.app.runtime.distributed.AbstractProgramTwillRunnable.initialize(AbstractProgramTwillRunnable.java:201) [na:na]
              at io.cdap.cdap.internal.app.runtime.distributed.AbstractProgramTwillRunnable.doMain(AbstractProgramTwillRunnable.java:168) [na:na]
              at io.cdap.cdap.internal.app.runtime.distributed.WorkflowTwillRunnable.main(WorkflowTwillRunnable.java:55) [na:na]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
              at io.cdap.cdap.internal.app.runtime.distributed.remote.RemoteLauncher.main(RemoteLauncher.java:73) [launcher.jar:na]
      Caused by: java.lang.RuntimeException: Failed to create keystore from PEM file /etc/cdap/security/interalCert.pem
              at io.cdap.cdap.common.security.KeyStores.createKeyStore(KeyStores.java:171) ~[na:na]
              at io.cdap.cdap.common.security.HttpsEnabler.configureKeyStore(HttpsEnabler.java:71) ~[na:na]
              at io.cdap.cdap.messaging.server.MessagingHttpService.<init>(MessagingHttpService.java:92) ~[na:na]
              at io.cdap.cdap.messaging.server.MessagingHttpService$$FastClassByGuice$$c93585e2.newInstance(<generated>) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.ExposedKeyFactory.get(ExposedKeyFactory.java:54) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) ~[com.google.inject.guice-4.0.jar:na]
              at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) ~[com.google.inject.guice-4.0.jar:na]
              ... 12 common frames omitted
      Caused by: java.nio.file.NoSuchFileException: /etc/cdap/security/interalCert.pem
              at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_222]
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_222]
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_222]
              at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[na:1.8.0_222]
              at java.nio.file.Files.newByteChannel(Files.java:361) ~[na:1.8.0_222]
              at java.nio.file.Files.newByteChannel(Files.java:407) ~[na:1.8.0_222]
              at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[na:1.8.0_222]
              at java.nio.file.Files.newInputStream(Files.java:152) ~[na:1.8.0_222]
              at java.nio.file.Files.newBufferedReader(Files.java:2784) ~[na:1.8.0_222]
              at io.cdap.cdap.common.security.KeyStores.createKeyStore(KeyStores.java:143) ~[na:na]
              ... 29 common frames omitted
      

        Attachments

          Activity

            People

            • Assignee:
              ashau Albert Shau
              Reporter:
              ashau Albert Shau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: