You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting bellow error message when Im trying to build jenkins controller with packer. EFS is created and have verified using the right DNS. Also I have verified EFS is in same region. Please help.
ubuntu@JenkinsPractice:~/devops-projects/01-jenkins-setup$ packer build -var "efs_mount_point=fs-08c78ea2a54d228ba.efs.us-west-2.amazonaws.com" jenkins-controller.pkr.hcl
amazon-ebs.jenkins: output will be in this color.
==> amazon-ebs.jenkins: Prevalidating any provided VPC information
==> amazon-ebs.jenkins: Prevalidating AMI Name: jenkins-controller
amazon-ebs.jenkins: Found Image ID: ami-0735c191cf914754d
==> amazon-ebs.jenkins: Creating temporary keypair: packer_67ebc92a-6413-9d81-c6e8-784022f862e5
==> amazon-ebs.jenkins: Creating temporary security group for this instance: packer_67ebc92b-4ff0-9fac-ace6-0b0cc4134c9c
==> amazon-ebs.jenkins: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups...
==> amazon-ebs.jenkins: Launching a source AWS instance...
amazon-ebs.jenkins: Instance ID: i-02d2555c78f32d960
==> amazon-ebs.jenkins: Waiting for instance (i-02d2555c78f32d960) to become ready...
==> amazon-ebs.jenkins: Using SSH communicator to connect: 54.149.111.76
==> amazon-ebs.jenkins: Waiting for SSH to become available...
==> amazon-ebs.jenkins: Connected to SSH!
==> amazon-ebs.jenkins: Provisioning with Ansible...
amazon-ebs.jenkins: Setting up proxy adapter for Ansible....
==> amazon-ebs.jenkins: Executing Ansible: ansible-playbook -e packer_build_name="jenkins" -e packer_builder_type=amazon-ebs --ssh-extra-args '-o IdentitiesOnly=yes' --extra-vars ami-id=ami-0735c191cf914754d efs_mount_point=fs-08c78ea2a54d228ba.efs.us-west-2.amazonaws.com --scp-extra-args '-O' --ssh-extra-args -o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa -e ansible_ssh_private_key_file=/tmp/ansible-key1286914053 -i /tmp/packer-provisioner-ansible1604042882 /home/ubuntu/devops-projects/01-jenkins-setup/ansible/jenkins-controller.yaml
amazon-ebs.jenkins:
amazon-ebs.jenkins: PLAY [Install Jenkins on servers] **********************************************
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [Gathering Facts] *********************************************************
amazon-ebs.jenkins: [WARNING]: Platform linux on host default is using the discovered Python
amazon-ebs.jenkins: interpreter at /usr/bin/python3.10, but future installation of another Python
amazon-ebs.jenkins: interpreter could change the meaning of that path. See
amazon-ebs.jenkins: https://docs.ansible.com/ansible-
amazon-ebs.jenkins: core/2.17/reference_appendices/interpreter_discovery.html for more information.
amazon-ebs.jenkins: ok: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : include_tasks] **************************************
amazon-ebs.jenkins: included: /home/ubuntu/devops-projects/01-jenkins-setup/ansible/roles/jenkins-controller/tasks/base.yaml for default
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Update apt cache] ***********************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install Python 3] ***********************************
amazon-ebs.jenkins: ok: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install pip] ****************************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install boto3 using pip3] ***************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install AWS CLI using pip] **************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install Java JDK 17] ********************************
amazon-ebs.jenkins: fatal: [default]: FAILED! => {"cache_update_time": 1743505743, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'openjdk-17-jdk=17.0.14+7-1~22.04.1'' failed: E: Unable to correct problems, you have held broken packages.\n", "rc": 100, "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n openjdk-17-jre : Depends: libgtk2.0-0 but it is not going to be installed or\n libgtk-3-0 but it is not going to be installed\n Depends: libxrandr2 but it is not installable\n Depends: libxinerama1 but it is not installable\n Depends: libgl1 but it is not installable\n Depends: libharfbuzz0b but it is not going to be installed\n Depends: libjpeg8 (>= 8c) but it is not installable\n Depends: libxi6 but it is not installable\n Depends: libxrender1 but it is not installable\n Depends: libxtst6 but it is not installable\n Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable\n Recommends: fonts-dejavu-extra but it is not installable\n openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable\n Depends: libfontconfig1 but it is not installable\n Depends: liblcms2-2 (>= 2.2+git20110628) but it is not installable\n Depends: libjpeg8 (>= 8c) but it is not installable\n Depends: libasound2 (>= 1.0.16) but it is not installable\n Depends: libharfbuzz0b (>= 1.2.6) but it is not going to be installed\n Depends: libpcsclite1 (>= 1.3.0) but it is not installable\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " openjdk-17-jre : Depends: libgtk2.0-0 but it is not going to be installed or", " libgtk-3-0 but it is not going to be installed", " Depends: libxrandr2 but it is not installable", " Depends: libxinerama1 but it is not installable", " Depends: libgl1 but it is not installable", " Depends: libharfbuzz0b but it is not going to be installed", " Depends: libjpeg8 (>= 8c) but it is not installable", " Depends: libxi6 but it is not installable", " Depends: libxrender1 but it is not installable", " Depends: libxtst6 but it is not installable", " Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable", " Recommends: fonts-dejavu-extra but it is not installable", " openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable", " Depends: libfontconfig1 but it is not installable", " Depends: liblcms2-2 (>= 2.2+git20110628) but it is not installable", " Depends: libjpeg8 (>= 8c) but it is not installable", " Depends: libasound2 (>= 1.0.16) but it is not installable", " Depends: libharfbuzz0b (>= 1.2.6) but it is not going to be installed", " Depends: libpcsclite1 (>= 1.3.0) but it is not installable"]}
amazon-ebs.jenkins:
amazon-ebs.jenkins: PLAY RECAP *********************************************************************
amazon-ebs.jenkins: default : ok=7 changed=4 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
amazon-ebs.jenkins:
==> amazon-ebs.jenkins: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs.jenkins: Terminating the source AWS instance...
==> amazon-ebs.jenkins: Cleaning up any extra volumes...
==> amazon-ebs.jenkins: No volumes to clean up, skipping
==> amazon-ebs.jenkins: Deleting temporary security group...
==> amazon-ebs.jenkins: Deleting temporary keypair...
Build 'amazon-ebs.jenkins' errored after 1 minute 42 seconds: Error executing Ansible: Non-zero exit status: exit status 2
==> Wait completed after 1 minute 42 seconds
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs.jenkins: Error executing Ansible: Non-zero exit status: exit status 2
==> Builds finished but no artifacts were created.
ubuntu@JenkinsPractice:~/devops-projects/01-jenkins-setup$
The text was updated successfully, but these errors were encountered:
Hi,
The issue is that the package manager (apt-get) cannot resolve certain dependencies for the openjdk-17-jdk package. The error message suggests that "you have held broken packages."
Possible causes:
Unmet Dependencies: Several required libraries (e.g., libgtk2.0-0, libxrandr2, etc.) are either missing or have compatibility issues.
Broken Package System: There might be conflicting or incomplete updates in your system's package repository.
Incorrect Package Version: The specified version 17.0.14+7-1~22.04.1 could be unavailable or incompatible with your Ubuntu setup.
Try-outs:
You may try to update the package repository and fix broken packages. sudo apt --fix-broken install
I am getting bellow error message when Im trying to build jenkins controller with packer. EFS is created and have verified using the right DNS. Also I have verified EFS is in same region. Please help.
ubuntu@JenkinsPractice:~/devops-projects/01-jenkins-setup$ packer build -var "efs_mount_point=fs-08c78ea2a54d228ba.efs.us-west-2.amazonaws.com" jenkins-controller.pkr.hcl
amazon-ebs.jenkins: output will be in this color.
==> amazon-ebs.jenkins: Prevalidating any provided VPC information
==> amazon-ebs.jenkins: Prevalidating AMI Name: jenkins-controller
amazon-ebs.jenkins: Found Image ID: ami-0735c191cf914754d
==> amazon-ebs.jenkins: Creating temporary keypair: packer_67ebc92a-6413-9d81-c6e8-784022f862e5
==> amazon-ebs.jenkins: Creating temporary security group for this instance: packer_67ebc92b-4ff0-9fac-ace6-0b0cc4134c9c
==> amazon-ebs.jenkins: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups...
==> amazon-ebs.jenkins: Launching a source AWS instance...
amazon-ebs.jenkins: Instance ID: i-02d2555c78f32d960
==> amazon-ebs.jenkins: Waiting for instance (i-02d2555c78f32d960) to become ready...
==> amazon-ebs.jenkins: Using SSH communicator to connect: 54.149.111.76
==> amazon-ebs.jenkins: Waiting for SSH to become available...
==> amazon-ebs.jenkins: Connected to SSH!
==> amazon-ebs.jenkins: Provisioning with Ansible...
amazon-ebs.jenkins: Setting up proxy adapter for Ansible....
==> amazon-ebs.jenkins: Executing Ansible: ansible-playbook -e packer_build_name="jenkins" -e packer_builder_type=amazon-ebs --ssh-extra-args '-o IdentitiesOnly=yes' --extra-vars ami-id=ami-0735c191cf914754d efs_mount_point=fs-08c78ea2a54d228ba.efs.us-west-2.amazonaws.com --scp-extra-args '-O' --ssh-extra-args -o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa -e ansible_ssh_private_key_file=/tmp/ansible-key1286914053 -i /tmp/packer-provisioner-ansible1604042882 /home/ubuntu/devops-projects/01-jenkins-setup/ansible/jenkins-controller.yaml
amazon-ebs.jenkins:
amazon-ebs.jenkins: PLAY [Install Jenkins on servers] **********************************************
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [Gathering Facts] *********************************************************
amazon-ebs.jenkins: [WARNING]: Platform linux on host default is using the discovered Python
amazon-ebs.jenkins: interpreter at /usr/bin/python3.10, but future installation of another Python
amazon-ebs.jenkins: interpreter could change the meaning of that path. See
amazon-ebs.jenkins: https://docs.ansible.com/ansible-
amazon-ebs.jenkins: core/2.17/reference_appendices/interpreter_discovery.html for more information.
amazon-ebs.jenkins: ok: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : include_tasks] **************************************
amazon-ebs.jenkins: included: /home/ubuntu/devops-projects/01-jenkins-setup/ansible/roles/jenkins-controller/tasks/base.yaml for default
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Update apt cache] ***********************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install Python 3] ***********************************
amazon-ebs.jenkins: ok: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install pip] ****************************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install boto3 using pip3] ***************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install AWS CLI using pip] **************************
amazon-ebs.jenkins: changed: [default]
amazon-ebs.jenkins:
amazon-ebs.jenkins: TASK [jenkins-controller : Install Java JDK 17] ********************************
amazon-ebs.jenkins: fatal: [default]: FAILED! => {"cache_update_time": 1743505743, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'openjdk-17-jdk=17.0.14+7-1~22.04.1'' failed: E: Unable to correct problems, you have held broken packages.\n", "rc": 100, "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n openjdk-17-jre : Depends: libgtk2.0-0 but it is not going to be installed or\n libgtk-3-0 but it is not going to be installed\n Depends: libxrandr2 but it is not installable\n Depends: libxinerama1 but it is not installable\n Depends: libgl1 but it is not installable\n Depends: libharfbuzz0b but it is not going to be installed\n Depends: libjpeg8 (>= 8c) but it is not installable\n Depends: libxi6 but it is not installable\n Depends: libxrender1 but it is not installable\n Depends: libxtst6 but it is not installable\n Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable\n Recommends: fonts-dejavu-extra but it is not installable\n openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable\n Depends: libfontconfig1 but it is not installable\n Depends: liblcms2-2 (>= 2.2+git20110628) but it is not installable\n Depends: libjpeg8 (>= 8c) but it is not installable\n Depends: libasound2 (>= 1.0.16) but it is not installable\n Depends: libharfbuzz0b (>= 1.2.6) but it is not going to be installed\n Depends: libpcsclite1 (>= 1.3.0) but it is not installable\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " openjdk-17-jre : Depends: libgtk2.0-0 but it is not going to be installed or", " libgtk-3-0 but it is not going to be installed", " Depends: libxrandr2 but it is not installable", " Depends: libxinerama1 but it is not installable", " Depends: libgl1 but it is not installable", " Depends: libharfbuzz0b but it is not going to be installed", " Depends: libjpeg8 (>= 8c) but it is not installable", " Depends: libxi6 but it is not installable", " Depends: libxrender1 but it is not installable", " Depends: libxtst6 but it is not installable", " Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable", " Recommends: fonts-dejavu-extra but it is not installable", " openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable", " Depends: libfontconfig1 but it is not installable", " Depends: liblcms2-2 (>= 2.2+git20110628) but it is not installable", " Depends: libjpeg8 (>= 8c) but it is not installable", " Depends: libasound2 (>= 1.0.16) but it is not installable", " Depends: libharfbuzz0b (>= 1.2.6) but it is not going to be installed", " Depends: libpcsclite1 (>= 1.3.0) but it is not installable"]}
amazon-ebs.jenkins:
amazon-ebs.jenkins: PLAY RECAP *********************************************************************
amazon-ebs.jenkins: default : ok=7 changed=4 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
amazon-ebs.jenkins:
==> amazon-ebs.jenkins: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs.jenkins: Terminating the source AWS instance...
==> amazon-ebs.jenkins: Cleaning up any extra volumes...
==> amazon-ebs.jenkins: No volumes to clean up, skipping
==> amazon-ebs.jenkins: Deleting temporary security group...
==> amazon-ebs.jenkins: Deleting temporary keypair...
Build 'amazon-ebs.jenkins' errored after 1 minute 42 seconds: Error executing Ansible: Non-zero exit status: exit status 2
==> Wait completed after 1 minute 42 seconds
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs.jenkins: Error executing Ansible: Non-zero exit status: exit status 2
==> Builds finished but no artifacts were created.
ubuntu@JenkinsPractice:~/devops-projects/01-jenkins-setup$
The text was updated successfully, but these errors were encountered: