kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

Maven build fails with proxy authentication error

Open venugopalthati opened this issue 4 years ago • 1 comments

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

What happened: Maven build failed with proxy authentication error, made sure that proxy details are correct.

Name: hello-java-6f74749484-55lf9 Namespace: kubeless Priority: 0 Node: elmer-glasson/172.16.168.53 Start Time: Fri, 13 Sep 2019 16:55:17 -0400 Labels: created-by=kubeless function=hello-java pod-template-hash=6f74749484 Annotations: prometheus.io/path: /metrics prometheus.io/port: 8080 prometheus.io/scrape: true Status: Pending IP: 10.233.93.203 Controlled By: ReplicaSet/hello-java-6f74749484 Init Containers: prepare: Container ID: docker://f8e0b59d64c517046fd86020d6e0ca1de33e38652b01204dae10a5f2058293c5 Image: kubeless/unzip@sha256:4863100364496255de9bf8722a220dad7143ab277ac72435876eb8c93936e9d7 Image ID: docker-pullable://kubeless/unzip@sha256:4863100364496255de9bf8722a220dad7143ab277ac72435876eb8c93936e9d7 Port: Host Port: Command: sh -c Args: echo '7606e18ee4e4197127a58cae63aa08a56ac2370af9b328ae12f1a101ba752e79 /src/Foo.java' > /tmp/func.sha256 && sha256sum -c /tmp/func.sha256 && cp /src/Foo.java /kubeless/Foo.java && cp /src/pom.xml /kubeless State: Terminated Reason: Completed Exit Code: 0 Started: Fri, 13 Sep 2019 16:55:19 -0400 Finished: Fri, 13 Sep 2019 16:55:19 -0400 Ready: True Restart Count: 0 Environment: Mounts: /kubeless from hello-java (rw) /src from hello-java-deps (rw) /var/run/secrets/kubernetes.io/serviceaccount from default-token-g8n46 (ro) compile: Container ID: docker://dce0f991922d84a15904a44f6d50eb5cf4a300400c635f247f6854faa81fef05 Image: kubeless/java-init@sha256:7e49a9c91e0fd7d0ffd0e184116769e56705cc1d6d39b11ced8ec94dbdc77543 Image ID: docker-pullable://kubeless/java-init@sha256:7e49a9c91e0fd7d0ffd0e184116769e56705cc1d6d39b11ced8ec94dbdc77543 Port: Host Port: Command: sh -c Args: /compile-function.sh State: Terminated Reason: Error Message: [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Child module /kubeless/function/params of /kubeless/function/pom.xml does not exist @ [ERROR] Child module /kubeless/function/function of /kubeless/function/pom.xml does not exist @ [ERROR] Child module /kubeless/function/handler of /kubeless/function/pom.xml does not exist @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR] The project io.kubeless:kubeless:1.0-SNAPSHOT (/kubeless/function/pom.xml) has 3 errors [ERROR] Child module /kubeless/function/params of /kubeless/function/pom.xml does not exist [ERROR] Child module /kubeless/function/function of /kubeless/function/pom.xml does not exist [ERROR] Child module /kubeless/function/handler of /kubeless/function/pom.xml does not exist [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

  Exit Code:  1
  Started:    Fri, 13 Sep 2019 16:55:28 -0400
  Finished:   Fri, 13 Sep 2019 16:55:32 -0400
Last State:   Terminated
  Reason:     Error
  Message:    [INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] kubeless [INFO] params [INFO] function [INFO] handler [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building kubeless 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building params 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] kubeless ........................................... SUCCESS [ 0.005 s] [INFO] params ............................................. FAILURE [ 1.105 s] [INFO] function ........................................... SKIPPED [INFO] handler ............................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.437 s [INFO] Finished at: 2019-09-13T20:55:26+00:00 [INFO] Final Memory: 19M/485M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

  Exit Code:    1
  Started:      Fri, 13 Sep 2019 16:55:20 -0400
  Finished:     Fri, 13 Sep 2019 16:55:26 -0400
Ready:          False
Restart Count:  1
Environment:
  MAVEN_OPTS:               -DproxySet=true -DproxyHost=<HOST> -DproxyPort=3128 -DproxyUsername=<USER> -DproxyPassword=<PASSWORD>
  KUBELESS_INSTALL_VOLUME:  /kubeless
  KUBELESS_FUNC_NAME:       foo
Mounts:
  /kubeless from hello-java (rw)
  /var/run/secrets/kubernetes.io/serviceaccount from default-token-g8n46 (ro)

Containers: hello-java: Container ID:
Image: kubeless/java@sha256:fafffa963732c860c08728da99b1ec8c3b722840ac29722e69798124fef63054 Image ID:
Port: 8080/TCP Host Port: 0/TCP State: Waiting Reason: PodInitializing Ready: False Restart Count: 0 Liveness: http-get http://:8080/healthz delay=3s timeout=1s period=30s #success=1 #failure=3 Environment: MAVEN_OPTS: -DproxySet=true -DproxyHost=<HOST> -DproxyPort=3128 -DproxyUsername=<USER> -DproxyPassword=<PASSWORD> FUNC_HANDLER: foo MOD_NAME: Foo FUNC_TIMEOUT: 180 FUNC_RUNTIME: java1.8 FUNC_MEMORY_LIMIT: 0 FUNC_PORT: 8080 KUBELESS_INSTALL_VOLUME: /kubeless Mounts: /kubeless from hello-java (rw) /var/run/secrets/kubernetes.io/serviceaccount from default-token-g8n46 (ro) Conditions: Type Status Initialized False Ready False ContainersReady False PodScheduled True Volumes: hello-java: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium:
SizeLimit: hello-java-deps: Type: ConfigMap (a volume populated by a ConfigMap) Name: hello-java Optional: false default-token-g8n46: Type: Secret (a volume populated by a Secret) SecretName: default-token-g8n46 Optional: false QoS Class: BestEffort Node-Selectors: Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s node.kubernetes.io/unreachable:NoExecute for 300s Events: Type Reason Age From Message


Normal Scheduled 30s default-scheduler Successfully assigned kubeless/hello-java-6f74749484-55lf9 to elmer-glasson Normal Pulled 28s kubelet, elmer-glasson Container image "kubeless/unzip@sha256:4863100364496255de9bf8722a220dad7143ab277ac72435876eb8c93936e9d7" already present on machine Normal Created 28s kubelet, elmer-glasson Created container prepare Normal Started 28s kubelet, elmer-glasson Started container prepare Normal Pulled 20s (x2 over 27s) kubelet, elmer-glasson Container image "kubeless/java-init@sha256:7e49a9c91e0fd7d0ffd0e184116769e56705cc1d6d39b11ced8ec94dbdc77543" already present on machine Normal Created 20s (x2 over 27s) kubelet, elmer-glasson Created container compile Normal Started 19s (x2 over 27s) kubelet, elmer-glasson Started container compile Warning BackOff 13s kubelet, elmer-glasson Back-off restarting failed container

What you expected to happen: Expected to see hello-java function deployed. Also is there a way to pass settings.xml as part of deployment command ?

How to reproduce it (as minimally and precisely as possible):

HelloGet.java

`package io.kubeless;

import io.kubeless.Event; import io.kubeless.Context;

public class Foo { public String foo(io.kubeless.Event event, io.kubeless.Context context) { return "Hello world!"; } } `

Command to deploy

kubeless function deploy hello-java --runtime java1.8 --handler Foo.foo --from-file HelloGet.java --env MAVEN_OPTS='-DproxySet=true -DproxyHost=host -DproxyPort=3128 -DproxyUser=user -DproxyPassword=password'

Anything else we need to know?: Proxy should be configured with authentication enabled.

Environment:

  • Kubernetes version (use kubectl version): 1.14.3
  • Kubeless version (use kubeless version): 1.0.4
  • Cloud provider or physical cluster:

venugopalthati avatar Sep 13 '19 21:09 venugopalthati

Hi @venugopalthati,

That's a known issue, see: https://github.com/kubeless/kubeless/issues/1075. Right now it's not supported to use private dependencies with Maven.

andresmgot avatar Sep 23 '19 10:09 andresmgot