Hostagent Installation Failed, 'Unable to lock directory /var/cache/apt/archives'
Problem
Hostagent installation failed with the below error.
Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)<br>E: Unable to lock directory /var/cache/apt/archives/<br>"}pf9ctl logs show below messages
{"level":"debug","ts":"2021-04-24T22:48:42.3694Z","caller":"pmk/node.go:216","msg":"Hostagent download completed successfully"}..{"level":"debug","ts":"2021-04-24T22:48:45.8739Z","caller":"pmk/node.go:247","msg":"Ran command sudo[bash -c /tmp/installer.sh --no-proxy --skip-os-check --ntpd --no-project --controller=1618992570-18611.platform9.io --username=smeredith@capturealpha.com --password=Crytime1234!!]"}.{"level":"debug","ts":"2021-04-24T22:48:45.8739Z","caller":"pmk/node.go:247","msg":"stdout:<br>Extracting Platform9 installer<br>No TTY available. Skipping all prompts...<br>No TTY available. Skipping all prompts...<br>Skipping operating system compatibility questions<br>Reading package lists...<br>Building dependency tree...<br>Reading state information...<br>tp is already the newest version (1:4.2.8p10+dfsg-5ubuntu7.3).<br>Error: Could not install the ntp package<br>stderr:E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)<br>E: Unable to lock directory /var/cache/apt/archives/<br>"}.{"level":"debug","ts":"2021-04-24T22:48:45.874Z","caller":"pmk/node.go:48","msg":"Sending Segment Event: Prep-node : ERROR"}Environment
Platform9 Managed Kubernetes - v4.0 and Higher
Cause
Not able to get lock on /var/cache/apt/archive directory.
Resolution
Make sure there are no apt processes running on the node that is being onboarded and then retry the pf9ctl prep node command.
PreviousHostagent Installation Failing Due To Apt Key Being Not Present.
NextHost Upgrade Install Fails When Attempting To Download hostagent.conf From Management Plane When Pro
Last updated
