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

failing azcmagent for Azure Arc for servers with WSL #6316

Closed
LuisPFlores opened this issue Dec 6, 2020 · 5 comments
Closed

failing azcmagent for Azure Arc for servers with WSL #6316

LuisPFlores opened this issue Dec 6, 2020 · 5 comments

Comments

@LuisPFlores
Copy link

Environment

Windows build number: [Windows 10 enterprise /c 2004`]
Your Distribution version: [Ubutu 1804 LTS]
Whether the issue is on WSL 2 and/or WSL 1: [WSL2]

Steps to reproduce

Download the installation package

wget https://aka.ms/azcmagent -O ~/install_linux_azcmagent.sh

Install the hybrid agent

bash ~/install_linux_azcmagent.sh

Run connect command

azcmagent connect --resource-group "XXXXXXX" --tenant-id "XXX-XXX-XXX-XXX1" --location "eastus" --subscription-id "XXXXXXXXXXX" --cloud "AzureCloud"

@sirredbeard
Copy link
Contributor

Can you please post the error message you are receiving?

@LuisPFlores
Copy link
Author

chiefubt@LAPTOP-PRBRGP7O:~$ bash ~/install_linux_azcmagent.sh
Retrieving distro info from /etc/os-release...
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version (1.19.4-1ubuntu2.2).
0 upgraded, 0 newly installed, 0 to remove and 95 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up azcmagent (1.2.20314.002) ...
Postinstall...configure
ln: failed to create symbolic link '/usr/bin/azcmagent': File exists
Warning: Unable to create azcmagent soft-link.
ln: failed to create symbolic link '/usr/bin/azcmagent_proxy': File exists
Warning: Unable to create azcmagent_proxy soft-link.
System has not been booted with systemd as init system (PID 1). Can't operate.
dpkg: error processing package azcmagent (--configure):
installed azcmagent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
azcmagent
E: Sub-process /usr/bin/dpkg returned an error code (1)
Configuring for Ubuntu 18.04...
--2020-12-10 09:07:14-- https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
Resolving packages.microsoft.com (packages.microsoft.com)... 13.84.47.71
Connecting to packages.microsoft.com (packages.microsoft.com)|13.84.47.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3132 (3.1K) [application/octet-stream]
Saving to: ‘/tmp/packages-microsoft-prod.deb’

/tmp/packages-microsoft-prod.deb 100%[=====================================================================================================================>] 3.06K --.-KB/s in 0s

2020-12-10 09:07:14 (964 MB/s) - ‘/tmp/packages-microsoft-prod.deb’ saved [3132/3132]

(Reading database ... 29473 files and directories currently installed.)
Preparing to unpack .../packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu18.04.2) over (1.0-ubuntu18.04.2) ...
Setting up packages-microsoft-prod (1.0-ubuntu18.04.2) ...
Get:1 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [4002 B]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [149 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1428 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1763 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [281 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [173 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [22.8 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1091 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [244 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [13.3 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [373 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [196 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [26.4 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1694 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [356 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [36.1 kB]
Fetched 8103 kB in 2s (3266 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
azcmagent is already the newest version (1.2.20314.002).
0 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up azcmagent (1.2.20314.002) ...
Postinstall...configure
ln: failed to create symbolic link '/usr/bin/azcmagent': File exists
Warning: Unable to create azcmagent soft-link.
ln: failed to create symbolic link '/usr/bin/azcmagent_proxy': File exists
Warning: Unable to create azcmagent_proxy soft-link.
System has not been booted with systemd as init system (PID 1). Can't operate.
dpkg: error processing package azcmagent (--configure):
installed azcmagent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
azcmagent
E: Sub-process /usr/bin/dpkg returned an error code (1)
/home/chiefubt/install_linux_azcmagent.sh: installation error
chiefubt@LAPTOP-PRBRGP7O:~$

@sirredbeard
Copy link
Contributor

ln: failed to create symbolic link '/usr/bin/azcmagent': File exists
ln: failed to create symbolic link '/usr/bin/azcmagent_proxy': File exists

Those are just warnings but it shows you might have a previous version that wasn't completely removed.

System has not been booted with systemd as init system (PID 1). Can't operate.

WSL does not support systemd at PID1, WSL init is PID1. To get systemd as PID1 you need to use deamonize or systemd genie, there are a handful of different tools and approaches to getting systemd to work.

@therealkenc
Copy link
Collaborator

Punting this to /dupe #994. It is likely azcmagent connect can be installed and made to work absent systemd, but that is more of a tips-and-tricks discussion.

@ghost
Copy link

ghost commented May 11, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost added the duplicate label May 11, 2021
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

3 participants