Quarkus deploy to kubernetes of docker-desktop on mac - kubernetes

I'm trying to deploy a simple Quarkus (2.3.1) application to my local kubernetes created by docker-desktop an it does not work and throws the following exception after jib has create the image of the app.
following configurations has been made in the application.properties:
quarkus.container-image.build=true
quarkus.container-image.group=
quarkus.package.type=jar
# for docker-desktop
quarkus.kubernetes-client.trust-certs=true
quarkus.kubernetes.deployment-target=kubernetes
quarkus.kubernetes.deployment=true
This is the exception that I'm getting
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.3.0.Final:build (default) on project kafka-consumer-producer: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.kubernetes.deployment.KubernetesDeployerPrerequisite#prepare threw an exception: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
[ERROR] at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
[ERROR] at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:234)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:66)
[ERROR] at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:51)
[ERROR] at io.fabric8.kubernetes.client.BaseKubernetesClient.<init>(BaseKubernetesClient.java:154)
[ERROR] at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:40)
[ERROR] at io.quarkus.kubernetes.client.runtime.KubernetesClientUtils.createClient(KubernetesClientUtils.java:93)
[ERROR] at io.quarkus.kubernetes.deployment.KubernetesDeploy.doCheck(KubernetesDeploy.java:67)
[ERROR] at io.quarkus.kubernetes.deployment.KubernetesDeploy.checkSilently(KubernetesDeploy.java:53)
[ERROR] at io.quarkus.kubernetes.deployment.KubernetesDeployerPrerequisite.prepare(KubernetesDeployerPrerequisite.java:22)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:450)
[ERROR] at java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:91)
[ERROR] at java.base/java.security.KeyStore.getKey(KeyStore.java:1050)
[ERROR] at java.base/sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:141)
[ERROR] at java.base/sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:64)
[ERROR] at java.base/javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:275)
[ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:130)
[ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:122)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:129)
[ERROR] ... 19 more
[ERROR] Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:859)
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:939)
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:735)
[ERROR] at java.base/com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:424)
[ERROR] at java.base/com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:456)
[ERROR] at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2205)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(PKCS12KeyStore.java:371)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(PKCS12KeyStore.java:257)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:361)
[ERROR] ... 27 more
[ERROR]
[ERROR] [error]: Build step io.quarkus.kubernetes.client.deployment.KubernetesClientBuildStep#process threw an exception: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
[ERROR] at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
[ERROR] at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:234)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:66)
[ERROR] at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:51)
[ERROR] at io.fabric8.kubernetes.client.BaseKubernetesClient.<init>(BaseKubernetesClient.java:154)
[ERROR] at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:40)
[ERROR] at io.quarkus.kubernetes.client.runtime.KubernetesClientUtils.createClient(KubernetesClientUtils.java:50)
[ERROR] at io.quarkus.kubernetes.client.deployment.KubernetesClientBuildStep.process(KubernetesClientBuildStep.java:16)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:450)
[ERROR] at java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:91)
[ERROR] at java.base/java.security.KeyStore.getKey(KeyStore.java:1050)
[ERROR] at java.base/sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:141)
[ERROR] at java.base/sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:64)
[ERROR] at java.base/javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:275)
[ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:130)
[ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:122)
[ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:129)
[ERROR] ... 17 more
[ERROR] Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:859)
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:939)
[ERROR] at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:735)
[ERROR] at java.base/com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:424)
[ERROR] at java.base/com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:456)
[ERROR] at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2205)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(PKCS12KeyStore.java:371)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(PKCS12KeyStore.java:257)
[ERROR] at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:361)
[ERROR] ... 25 more
[ERROR] -> [Help 1]
I've also tried with creating a cluster with kind.

Related

Sbt stuck at 'Updating ProjectRef' after deleting .ivy folder

After deleting my .ivy folder, I cannot enter the SBT shell because it is stuck at:
[info] Loading global plugins from /home/baierlf/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/home/baierlf/.sbt/1.0/plugins/"), "global-plugins")...
[info] Done updating. never appears.
I noticed that the newly created ~/.ivy folder contains a single file: .sbt.ivy.lock. Any idea how I can resolve this issue?
UPDATE:
It failed after waiting ~20min with a lot of ava.net.SocketTimeoutException: connect timed out errors.
[info] Loading global plugins from /home/baierlf/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/home/baierlf/.sbt/1.0/plugins/"), "global-plugins")...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}::
[warn] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[warn] :: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}::
[warn] typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[warn] :: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}::
[warn] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn] public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-lang:scala-library:2.12.7 ((sbt.Classpaths.jvmBaseSettings) Defaults.scala#L2207)
[warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn] org.scala-sbt:sbt:1.2.8
[warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn] org.scala-lang:scala-compiler:2.12.7
[warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error]
[error] unresolved dependency: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[error]
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error]
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error]
[error] unresolved dependency: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[error]
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error] public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? %
This seems to have been a proxy setting issue. I managed to get SBT running by opening the project in IntelliJ, which started downloading the dependencies straight away. Since I conigured IntelliJ to be able to get through the proxy, I highly suspect this was the problem (even though I configured it in Ubuntu as well - but apparently that did not suffice in my case)

Why am I getting "Connection Closed on Error" with XMPP

XMPP Library being used:
"org.igniterealtime.smack" % "smack-java7" % "4.1.8",
"org.igniterealtime.smack" % "smack-tcp" % "4.1.8",
"org.igniterealtime.smack" % "smack-core" % "4.1.8",
"org.igniterealtime.smack" % "smack-extensions" % "4.1.8",
Hi,
We have a XMPP server which connects to FCM XMPP server, sometime we see following errors from our XMPP Connection sometimes:
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] Nov 30, 2018 7:08:38 PM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNING: Connection closed with error
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971)
at java.lang.Thread.run(Thread.java:745)
2018-11-30T19:08:38.306+05:30 PROCESSORS [ERROR] XMPPConnectionListener -> connectionClosedOnError: null input contained no data
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) ~[stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177) [stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956) [stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971) [stormjar.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
2018-11-30T19:08:38.306+05:30 STDIO [INFO] 07:08:38 PM XMPPConnection closed due to an exception (1)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] java.io.EOFException: input contained no data
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at java.lang.Thread.run(Thread.java:745)
I am not able to not able to find what is the reason for these, why these are coming because same code works most of the time, but some times suddenly I start to get this error. I also see same reported here long back but no resolution.

Scala Neo4j OGM - Will not scan annotated NodeEntity classes - IllegalArgumentException

Problem: Annotated classes are not being loaded into the class map.
My understanding on how to use the OGM:
Pass your domain (which includes your NodeEntity annotated classes) to the SessionFactory
Open a Session. At this point, behind the scenes, a class map of the annotated NodeEntity classes is built. This is referenced in the stacktrace on line 3 as "Building annotation class map". You'll see it mapped 0 on the next line.
Pass an instance of an annotated NodeEntity class to session.save
Your entity is now saved in Neo4j!
In this sample project, the domain is testdomain, and the only annotated NodeEntity, Person, is defined in the same file. I would expect this would eliminate any issues finding what classes to build into the persistent class map behind the scenes. But as seen in the log, the class map is not considering the domain I pass to SessionFactory.
This prevents any data from being saved to Neo.
You can clone the project and run the app yourself to reproduce the problem (instructions in README).
Stacktrace:
[info] Running testdomain.Test
2018-03-08 13:54:09 INFO DomainInfo:160 - Starting Post-processing phase
2018-03-08 13:54:09 INFO DomainInfo:126 - Building annotation class map
2018-03-08 13:54:09 INFO DomainInfo:139 - Building interface class map for 0 classes
2018-03-08 13:54:09 INFO DomainInfo:215 - Post-processing complete
[error] (run-main-0) java.lang.IllegalArgumentException: Class class testdomain.Person is not a valid entity class. Please check the entity mapping.
[error] java.lang.IllegalArgumentException: Class class testdomain.Person is not a valid entity class. Please check the entity mapping.
[error] at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:88)
[error] at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:40)
[error] at org.neo4j.ogm.session.Neo4jSession.save(Neo4jSession.java:469)
[error] at testdomain.Test$.delayedEndpoint$testdomain$Test$1(Test.scala:32)
[error] at testdomain.Test$delayedInit$body.apply(Test.scala:26)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at scala.App.main(App.scala:76)
[error] at scala.App.main$(App.scala:74)
[error] at testdomain.Test$.main(Test.scala:26)
[error] at testdomain.Test.main(Test.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[error] at java.lang.reflect.Method.invoke(Unknown Source)
[error] at sbt.Run.invokeMain(Run.scala:93)
[error] at sbt.Run.run0(Run.scala:87)
[error] at sbt.Run.execute$1(Run.scala:65)
[error] at sbt.Run.$anonfun$run$4(Run.scala:77)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
[error] at sbt.TrapExit$App.run(TrapExit.scala:252)
[error] at java.lang.Thread.run(Unknown Source)
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error] at sbt.Run$.executeTrapExit(Run.scala:124)
[error] at sbt.Run.run(Run.scala:77)
[error] at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1169)
[error] at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1164)
[error] at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at scala.util.Try$.apply(Try.scala:209)
[error] at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error] at java.lang.Thread.run(Unknown Source)
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 6 s, completed Mar 8, 2018 1:54:09 PM
I have searched high and low to try to resolve this issue. However, I am new at scala, so this must be something simple I am missing, right?
-skyfer
This issue has been resolved with a modification to the Neo4j OGM library. The details are in this issue on their github.

Duplicate mappings when building docker package using sbt-native-packager

I'm using sbt-native-packager to build a docker image of our Akka HTTP based application in Scala. However, recently it has started throwing the following error when running the sbt docker:publishLocal command:
[info] Loading project definition from ~/directory/project
[info] Set current project to fortytwo-api (in build file:~/directory/)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[info] Wrote ~/directory/target/scala-2.11/fortytwo-api_2.11-1.0.pom
java.lang.RuntimeException: Duplicate mappings:
~/directory/target/docker/stage/opt/docker/lib/org.scalaz.scalaz-core_2.11-7.1.0.jar
from
~/.ivy2/maven-cache/org/scalaz/scalaz-core_2.11/7.1.0/scalaz-core_2.11-7.1.0.jar
~/.ivy2/cache/org.scalaz/scalaz-core_2.11/bundles/scalaz-core_2.11-7.1.0.jar
~/directory/target/docker/stage/opt/docker/lib/com.typesafe.config-1.2.1.jar
from
~/.ivy2/maven-cache/com/typesafe/config/1.2.1/config-1.2.1.jar
~/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar
~/directory/target/docker/stage/opt/docker/lib/com.google.protobuf.protobuf-java-2.5.0.jar
from
~/.ivy2/maven-cache/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
~/.ivy2/cache/com.google.protobuf/protobuf-java/bundles/protobuf-java-2.5.0.jar
~/directory/target/docker/stage/opt/docker/lib/org.fusesource.leveldbjni.leveldbjni-all-1.7.jar
from
~/.ivy2/maven-cache/org/fusesource/leveldbjni/leveldbjni-all/1.7/leveldbjni-all-1.7.jar
~/.ivy2/cache/org.fusesource.leveldbjni/leveldbjni-all/bundles/leveldbjni-all-1.7.jar
at scala.sys.package$.error(package.scala:27)
at sbt.Sync$.noDuplicateTargets(Sync.scala:67)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:25)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
at com.typesafe.sbt.packager.Stager$.stageFiles(Stager.scala:26)
at com.typesafe.sbt.packager.Stager$.stage(Stager.scala:40)
at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$projectSettings$17.apply(DockerPlugin.scala:117)
at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$projectSettings$17.apply(DockerPlugin.scala:117)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (docker:stage) Duplicate mappings:
[error] ~/directory/target/docker/stage/opt/docker/lib/org.scalaz.scalaz-core_2.11-7.1.0.jar
[error] from
[error] ~/.ivy2/maven-cache/org/scalaz/scalaz-core_2.11/7.1.0/scalaz-core_2.11-7.1.0.jar
[error] ~/.ivy2/cache/org.scalaz/scalaz-core_2.11/bundles/scalaz-core_2.11-7.1.0.jar
[error] ~/directory/target/docker/stage/opt/docker/lib/com.typesafe.config-1.2.1.jar
[error] from
[error] ~/.ivy2/maven-cache/com/typesafe/config/1.2.1/config-1.2.1.jar
[error] ~/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar
[error] ~/directory/target/docker/stage/opt/docker/lib/com.google.protobuf.protobuf-java-2.5.0.jar
[error] from
[error] ~/.ivy2/maven-cache/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
[error] ~/.ivy2/cache/com.google.protobuf/protobuf-java/bundles/protobuf-java-2.5.0.jar
[error] ~/directory/target/docker/stage/opt/docker/lib/org.fusesource.leveldbjni.leveldbjni-all-1.7.jar
[error] from
[error] ~/.ivy2/maven-cache/org/fusesource/leveldbjni/leveldbjni-all/1.7/leveldbjni-all-1.7.jar
[error] ~/.ivy2/cache/org.fusesource.leveldbjni/leveldbjni-all/bundles/leveldbjni-all-1.7.jar
Seems like the relatively new SBT feature, this is causing the problem.
Add this to your build:
updateOptions := updateOptions.value.withCachedResolution(false)
solved it for me.

DB connection failed after update to Java 8 for Play 2.3 application

I got an error after upgrading to Java 8. I didn't change anything from applicatoin.conf. Play is still 2.3. I am planing to upgrade to 2.4 later.
This is my db configuration:
db.default.driver=org.postgresql.Driver
db.default.url="postgres://postgres:postgres#localhost:5432/prdata"
[info] ! create
[error] anon$1: : Configuration error[Cannot connect to database [default]] (Configuration.scala:94)
[error] play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94)
[error] play.api.Configuration.reportError(Configuration.scala:743)
[error] play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:247)
[error] play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:238)
[error] play.api.db.BoneCPPlugin.onStart(DB.scala:238)
[error] play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
[error] play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
[error] play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
[error] play.api.Play$$anonfun$start$1.apply(Play.scala:91)
[error] play.api.Play$$anonfun$start$1.apply(Play.scala:91)
[error] play.utils.Threads$.withContextClassLoader(Threads.scala:21)
[error] play.api.Play$.start(Play.scala:90)
[error] play.api.test.PlayRunners$class.running(Helpers.scala:48)
[error] play.api.test.Helpers$.running(Helpers.scala:403)
[error] play.api.test.WithApplication.around(Specs.scala:23)
[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)