Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for registries with just HTTP. #388

Closed
coollog opened this issue Jun 6, 2018 · 1 comment
Closed

Add support for registries with just HTTP. #388

coollog opened this issue Jun 6, 2018 · 1 comment
Assignees

Comments

@coollog
Copy link
Contributor

coollog commented Jun 6, 2018

No description provided.

@coollog coollog changed the title jib:build should give more info on java.net.ConnectException: Connection refused 'jib:build' should give more info on 'java.net.ConnectException: Connection refused' Jun 6, 2018
@gintautassulskus
Copy link

gintautassulskus commented Jun 6, 2018

Context

I am running docker-registry on a k8s cluster. The access to the registry is via:
LoadBalancer --- Ingress Controller -- Docker-Registry Service

Unless I set the Load Balancer to https:443 and configure the Ingress Controller with TLS termination, jib fails with: Connection refused . My assumption is that jib supports only https over 443.

Docker client, on the other hand, works just fine with http:80 and https:443.

Probably it would suffice to document the constraints of jib, e.g.: works only with secure connections https:443

Log output:

mvn compile jib:build

[INFO] Pushing image as docker-registry.cluster.local/demoapp:built-with-jib
[INFO] 
[INFO] RUNNING  Building and pushing image
[INFO] RUNNING  Retrieving registry credentials for docker-registry.cluster.local
[INFO] RUNNING  Retrieving registry credentials for docker-registry.cluster.local
[INFO] No credentials could be retrieved for registry docker-registry.cluster.local
[INFO] Checking credentials from docker-credential-gcr
[INFO] Retrieving registry credentials for docker-registry.cluster.local : 12.627 ms
[INFO] RUNNING  Authenticating with push to docker-registry.cluster.local
[WARNING] The system does not have docker-credential-gcr CLI
[INFO] No credentials could be retrieved for registry gcr.io
[INFO] Retrieving registry credentials for docker-registry.cluster.local : 24.5 ms
[INFO] RUNNING  Building application layers
[INFO] RUNNING  Authenticating pull from gcr.io
[INFO] RUNNING  Building dependencies layer
[INFO] RUNNING  Building resources layer
[INFO] Building application layers : 2.203 ms
[INFO] RUNNING  Building classes layer
[INFO] RUNNING  Setting up to push layers
[INFO] Building dependencies layer : 5.326 ms
[INFO] Setting up to push layers : 3.88 ms
[INFO] Building classes layer : 11.36 ms
[INFO] Building resources layer : 41.223 ms
[INFO] Authenticating with push to docker-registry.cluster.local : 547.814 ms
[INFO] RUNNING  Pushing BLOB sha256:df0e86cb92bfa8ae506bed53e83a81238797203b4e4c85f9d623f673613fa2ef
[INFO] RUNNING  Pushing BLOB sha256:e284665cc3282200f29c695c15c6424a7f659e64b21073cb68d4de492a599b09
[INFO] RUNNING  Pushing BLOB sha256:14a63e790248ad1117badfea1177a71432b254cc35a152348f70ff6c04aa541f
[INFO] Pushing BLOB sha256:e284665cc3282200f29c695c15c6424a7f659e64b21073cb68d4de492a599b09 : 1.312 ms
[INFO] Pushing BLOB sha256:df0e86cb92bfa8ae506bed53e83a81238797203b4e4c85f9d623f673613fa2ef : 0.728 ms
[INFO] Pushing BLOB sha256:14a63e790248ad1117badfea1177a71432b254cc35a152348f70ff6c04aa541f : 1.872 ms
[INFO] Authenticating pull from gcr.io : 772.396 ms
[INFO] RUNNING  Pulling base image manifest
[INFO] Pulling base image manifest : 579.741 ms
[INFO] RUNNING  Setting up base image caching
[INFO] Setting up base image caching : 2.584 ms
[INFO] RUNNING  Pulling base image layer sha256:1cc7b33784d180ad7d46decd2f24b3e34804e8955fe9771e135c42840237e097
[INFO] RUNNING  Pulling base image layer sha256:8171e68b0292aeaa0e4d4127e797391fcb6becd202b1c6b65f6d6f80244a79bd
[INFO] RUNNING  Pulling base image layer sha256:ba7c544469e514f1a9a4dec59ab640540d50992b288adbb34a1a63c45bf19a24
[INFO] Pulling base image layer sha256:8171e68b0292aeaa0e4d4127e797391fcb6becd202b1c6b65f6d6f80244a79bd : 0.778 ms
[INFO] Pulling base image layer sha256:1cc7b33784d180ad7d46decd2f24b3e34804e8955fe9771e135c42840237e097 : 0.434 ms
[INFO] RUNNING  Setting up to push layers
[INFO] Pulling base image layer sha256:ba7c544469e514f1a9a4dec59ab640540d50992b288adbb34a1a63c45bf19a24 : 1.135 ms
[INFO] Setting up to push layers : 1.557 ms
[INFO] RUNNING  Pushing BLOB sha256:8171e68b0292aeaa0e4d4127e797391fcb6becd202b1c6b65f6d6f80244a79bd
[INFO] RUNNING  Pushing BLOB sha256:1cc7b33784d180ad7d46decd2f24b3e34804e8955fe9771e135c42840237e097
[INFO] Pushing BLOB sha256:8171e68b0292aeaa0e4d4127e797391fcb6becd202b1c6b65f6d6f80244a79bd : 0.679 ms
[INFO] RUNNING  Pushing BLOB sha256:ba7c544469e514f1a9a4dec59ab640540d50992b288adbb34a1a63c45bf19a24
[INFO] Pushing BLOB sha256:1cc7b33784d180ad7d46decd2f24b3e34804e8955fe9771e135c42840237e097 : 0.988 ms
[INFO] Pushing BLOB sha256:ba7c544469e514f1a9a4dec59ab640540d50992b288adbb34a1a63c45bf19a24 : 1.329 ms
[INFO] RUNNING  Pushing new image
[INFO] Pushing new image : 0.138 ms
[INFO] Building and pushing image : 1822.916 ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.576 s
[INFO] Finished at: 2018-06-06T23:03:05+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.1.7:build (default-cli) on project demo: Build image failed, perhaps you should make sure your Internet is up and that the registry you are pushing to exists: Connection to https://docker-registry.cluster.local refused: Connection refused -> [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/ConnectException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants