Failed in commissioning or deployment state

While deployment or commissioning in progress, it’s giving error as follows,
Failed with error "‘cloudinit’ running modules for final

“Failed unmounting /usr/lib/modules”
Also got in log that, it’s trying to download archive.ubuntu.com by proxy port 8000 and failed to connect error.
Need a solution for this.