-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Broken Pipe error #3315
Comments
Thanks for the report. I wasn't able to reproduce this problem following your instructions. I took the Jib Sample Spring Boot Project and ran the command:
I was able to successfully upload the image to GCR. Note that |
Hi @dzou Thanks for the reply. Issue is when using same command from Jenkins. Error log: [ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.1.1:build (default-cli) on project liverpool-configuration: Build image failed, perhaps you should make sure you have permissions for gcr.io/careful-record-316411/config-ui and set correct credentials. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-forbidden-or-denied for help: Unauthorized for gcr.io/careful-record-316411/config-ui: 403 Forbidden |
Interesting. So I think the error message means that your service account is getting picked up, however you have not configured the correct permissions for it to access Google Cloud Storage. Can you confirm that your service account does indeed have storage permissions? Maybe try storage.admin first, then reducing to the minimal working scope. Follow instructions here: |
Hi @dzou I set following permissions. Cloud Build Service Account Issue is jib in Jenkins does not take credentials that are configured as "Google Service Account from private key" |
Jib supported service account key authentication since version 1.5.0, so the issue is that something in your configuration is not quite correct. Could you share how you are setting the service account in Jenkins? According to your Jenkins logs, it looks like you already have some default credentials that is different from your service account key on Jenkins:
You seem to be able to log in, but you do not have storage permissions on this GCP account. So you either have to look in your Jenkins script, figure out what account is being used, and then add the storage permissions on that Or, in the Jenkins script, make sure you are actually setting the service account:
|
I'll assume the issue is resolved. What's certain is that Jib picked up some Application Default Credentials and used them to successfully authenticate with For completeness sake, I'll document here that setting |
jenkins_build_error.log
Environment: Cent Os
Description of the issue:
Execute a build with Jenking using command "clean package com.google.cloud.tools:jib-maven-plugin:3.1.1:build -Dimage=gcr.io/careful-record-316411/config-ui"
It sends error while pushing image to GCP Container registry
[ERROR] I/O error for image [gcr.io/careful-record-316411/config-ui]:
[ERROR] java.net.SocketException
[ERROR] Broken pipe (Write failed)
[ERROR] broken pipe: the server shut down the connection. Check the server log if possible. This could also be a proxy issue. For example, a proxy may prevent sending packets that are too large.
Expected behavior:
Image should be created in GCP Container Registry.
Steps to reproduce:
Log output: Attached
Additional Information:
jenkins_build_error.log
The text was updated successfully, but these errors were encountered: