Skip to content

Loading configuration: /home/jenkins/workspace/recall/MyAwesomeApp/springboot-lb.yaml ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: 2f95c4f8cbb69cf55f30997d8c6ee3a7.gr7.us-west-2.eks.amazonaws.com: Name or service not known #154

@ajith26061995

Description

@ajith26061995
  • mvn -f MyAwesomeApp/pom.xml clean install
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building MyAwesomeApp 0.0.1
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ springbootApp ---
    [INFO] Deleting /home/jenkins/workspace/recall/MyAwesomeApp/target
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ springbootApp ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 1 resource
    [INFO] Copying 2 resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ springbootApp ---
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 4 source files to /home/jenkins/workspace/recall/MyAwesomeApp/target/classes
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ springbootApp ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /home/jenkins/workspace/recall/MyAwesomeApp/src/test/resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ springbootApp ---
    [INFO] No sources to compile
    [INFO]
    [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ springbootApp ---
    [INFO] No tests to run.
    [INFO]
    [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ springbootApp ---
    [INFO] Building jar: /home/jenkins/workspace/recall/MyAwesomeApp/target/springbootApp.jar
    [INFO]
    [INFO] --- spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ springbootApp ---
    [INFO]
    [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ springbootApp ---
    [INFO] Installing /home/jenkins/workspace/recall/MyAwesomeApp/target/springbootApp.jar to /home/jenkins/.m2/repository/com/tcs/angularjs/springbootApp/0.0.1/springbootApp-0.0.1.jar
    [INFO] Installing /home/jenkins/workspace/recall/MyAwesomeApp/pom.xml to /home/jenkins/.m2/repository/com/tcs/angularjs/springbootApp/0.0.1/springbootApp-0.0.1.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 5.162s
    [INFO] Finished at: Mon Apr 05 10:28:19 UTC 2021
    [INFO] Final Memory: 21M/51M
    [INFO] ------------------------------------------------------------------------
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (Docker Build)
    [Pipeline] isUnix
    [Pipeline] sh
  • docker build -t demo MyAwesomeApp
    Sending build context to Docker daemon 21.08MB

Step 1/4 : FROM lolhens/baseimage-openjre
---> 7990e5390b8d
Step 2/4 : ADD target/springbootApp.jar springbootApp.jar
---> 097b58d99027
Step 3/4 : EXPOSE 8085
---> Running in ce256da3b5f9
Removing intermediate container ce256da3b5f9
---> e8d0e66431e5
Step 4/4 : ENTRYPOINT ["java", "-jar", "springbootApp.jar"]
---> Running in 9bca72b29087
Removing intermediate container 9bca72b29087
---> f32a35f69be6
Successfully built f32a35f69be6
Successfully tagged demo:latest
[Pipeline] sh

Login Succeeded
[Pipeline] sh

  • docker tag demo:latest 098376138507.dkr.ecr.us-west-2.amazonaws.com/demo:latest
    [Pipeline] sh
  • docker push 098376138507.dkr.ecr.us-west-2.amazonaws.com/demo:latest
    The push refers to repository [098376138507.dkr.ecr.us-west-2.amazonaws.com/demo]
    7d3f54c9816d: Preparing
    21b0fdb0d941: Preparing
    7d2fe35373e8: Preparing
    441b16977e95: Preparing
    a0b01285c9c8: Preparing
    b6499503d2aa: Preparing
    e1783589e069: Preparing
    41942220e5a6: Preparing
    849cabde138c: Preparing
    97041f29baff: Preparing
    b6499503d2aa: Waiting
    e1783589e069: Waiting
    41942220e5a6: Waiting
    849cabde138c: Waiting
    97041f29baff: Waiting
    441b16977e95: Layer already exists
    a0b01285c9c8: Layer already exists
    21b0fdb0d941: Layer already exists
    7d2fe35373e8: Layer already exists
    e1783589e069: Layer already exists
    41942220e5a6: Layer already exists
    b6499503d2aa: Layer already exists
    849cabde138c: Layer already exists
    97041f29baff: Layer already exists
    7d3f54c9816d: Pushed
    latest: digest: sha256:76b930ea4b2fe8c16b1e3252cc040534cc1919d7973c97a32f3c6b92ba28e977 size: 2408
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (K8S Deploy)
    [Pipeline] kubernetesDeploy
    Starting Kubernetes deployment
    Loading configuration: /home/jenkins/workspace/recall/MyAwesomeApp/springboot-lb.yaml
    ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: 2f95c4f8cbb69cf55f30997d8c6ee3a7.gr7.us-west-2.eks.amazonaws.com: Name or service not known
    hudson.remoting.ProxyException: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: 2f95c4f8cbb69cf55f30997d8c6ee3a7.gr7.us-west-2.eks.amazonaws.com: Name or service not known
    at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager.handleApiExceptionExceptNotFound(ResourceManager.java:180)
    at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:213)
    at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:201)
    at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager$ResourceUpdater.createOrApply(ResourceManager.java:93)
    at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.handleResource(KubernetesClientWrapper.java:289)
    at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.apply(KubernetesClientWrapper.java:256)
    at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.doCall(DeploymentCommand.java:172)
    at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:124)
    at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:106)
    at hudson.remoting.UserRequest.perform(UserRequest.java:211)
    at hudson.remoting.UserRequest.perform(UserRequest.java:54)
    at hudson.remoting.Request$2.run(Request.java:376)
    at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to test
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
    at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
    at hudson.remoting.Channel.call(Channel.java:1001)
    at hudson.FilePath.act(FilePath.java:1161)
    at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:68)
    at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:45)
    at com.microsoft.jenkins.azurecommons.command.CommandService.runCommand(CommandService.java:88)
    at com.microsoft.jenkins.azurecommons.command.CommandService.execute(CommandService.java:96)
    at com.microsoft.jenkins.azurecommons.command.CommandService.executeCommands(CommandService.java:75)
    at com.microsoft.jenkins.azurecommons.command.BaseCommandContext.executeCommands(BaseCommandContext.java:77)
    at com.microsoft.jenkins.kubernetes.KubernetesDeploy.perform(KubernetesDeploy.java:42)
    at com.microsoft.jenkins.azurecommons.command.SimpleBuildStepExecution.run(SimpleBuildStepExecution.java:54)
    at com.microsoft.jenkins.azurecommons.command.SimpleBuildStepExecution.run(SimpleBuildStepExecution.java:35)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
    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.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)
    Caused by: hudson.remoting.ProxyException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: 2f95c4f8cbb69cf55f30997d8c6ee3a7.gr7.us-west-2.eks.amazonaws.com: Name or service not known
    at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:898)
    at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedDeploymentWithHttpInfo(AppsV1Api.java:7299)
    at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedDeployment(AppsV1Api.java:7275)
    at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:210)
    ... 15 more
    Caused by: hudson.remoting.ProxyException: java.net.UnknownHostException: 2f95c4f8cbb69cf55f30997d8c6ee3a7.gr7.us-west-2.eks.amazonaws.com: Name or service not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
    at java.net.InetAddress.getAllByName(InetAddress.java:1193)
    at java.net.InetAddress.getAllByName(InetAddress.java:1127)
    at okhttp3.Dns.lambda$static$0(Dns.java:39)
    at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:171)
    at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:135)
    at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:84)
    at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:187)
    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
    at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
    at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
    at okhttp3.RealCall.execute(RealCall.java:81)
    at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:894)
    ... 18 more
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    ERROR: Kubernetes deployment ended with HasError
    Finished: FAILURE

plugins are downgraded and tried a lot, already a case is opened fro this
is there any solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions