Azure Arc on Ubuntu: Bad Header while executing script

Manuel Knott MM 0 Reputation points
2024-11-27T14:50:39.3233333+00:00

I try to install the Arc agent on my Ubuntu machine but I run into the following:

~/Arc$ bash ~/Install_linux_azcmagent.sh

Using 'curl' for downloads

Total physical memory: 16375812 kB

Platform type: x86_64:Linux

Retrieving distro info from /etc/os-release...

Configuring for Ubuntu 24.04...

lsof: WARNING: can't stat() fuse.portal file system /run/user/1002/doc

  Output information may be incomplete.

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1002/gvfs

  Output information may be incomplete.

lsof: WARNING: can't stat() fuse.portal file system /run/user/1002/doc

  Output information may be incomplete.

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1002/gvfs

  Output information may be incomplete.

Hit:1 http://nl.archive.ubuntu.com/ubuntu noble InRelease

Hit:2 http://nl.archive.ubuntu.com/ubuntu noble-updates InRelease

Hit:3 http://nl.archive.ubuntu.com/ubuntu noble-backports InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Err:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Bad header line Bad header data [IP: 13.107.253.45 443]

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

6 packages can be upgraded. Run 'apt list --upgradable' to see them.

W: Failed to fetch https://packages.microsoft.com/ubuntu/24.04/prod/dists/noble/InRelease Bad header line Bad header data [IP: 13.107.253.45 443]

W: Some index files failed to download. They have been ignored, or old ones used instead.

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

E: Unable to locate package packages-microsoft-prod

% Total % Received % Xferd Average Speed Time Time Time Current

                             Dload  Upload   Total   Spent    Left  Speed

100 4298 100 4298 0 0 36118 0 --:--:-- --:--:-- --:--:-- 36423

dpkg: error: cannot access archive '/tmp/packages-microsoft-prod.deb': No such file or directory

Hit:1 http://nl.archive.ubuntu.com/ubuntu noble InRelease

Hit:2 http://nl.archive.ubuntu.com/ubuntu noble-updates InRelease

Hit:3 http://nl.archive.ubuntu.com/ubuntu noble-backports InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Ign:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Err:4 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease

Bad header line Bad header data [IP: 13.107.253.45 443]

Reading package lists... Done

W: Failed to fetch https://packages.microsoft.com/ubuntu/24.04/prod/dists/noble/InRelease Bad header line Bad header data [IP: 13.107.253.45 443]

W: Some index files failed to download. They have been ignored, or old ones used instead.

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

E: Unable to locate package azcmagent

any idea?

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
453 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pranay Reddy Madireddy 1,150 Reputation points Microsoft Vendor
    2024-11-28T21:44:13.5533333+00:00

    Hi Manuel Knott MM

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    The error messages you’re getting while installing the Azure Connected Machine agent (Arc agent) on your Ubuntu 24.04 machine suggest there are issues with accessing the package repository and completing the installation.

    Currently, Azure Arc may not officially support Ubuntu 24.04, which could result in installation issues. If possible, it is recommended to use a supported version, such as Ubuntu 22.04 or 20.04, for the installation.

    1.Before running the installation script, make sure your package lists are updated.

    sudo apt update

    2.Ensure that curl is installed, as it is required to download packages.

    sudo apt install -y curl

    3.Because of issues with the Microsoft repository, you can manually download the Azure Connected Machine agent package for a supported Ubuntu version (e.g., 20.04) and install it.

    curl -L https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/a/azcmagent/azcmagent_1.20.02012.246_amd64.deb -o /tmp/azcmagent.deb

    4.Install the Package:

    sudo dpkg -i /tmp/azcmagent.deb

    5.If there are dependency issues after installation, run:

    sudo apt-get install -f

    6.After installation, check that the agent is installed correctly by running:

    azcmagent --version

    7.After installation, connect the agent to Azure Arc using your specific details:

    azcmagent connect --resource-group <YourResourceGroup> --tenant-id <YourTenantID> --location <YourLocation> --subscription-id <YourSubscriptionID>

    For reference, please review this documentation :-
    https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-connected-machine-agent?tabs=LinuxScript
    https://learn.microsoft.com/en-us/azure/azure-arc/servers/manage-agent?tabs=windows
    https://learn.microsoft.com/en-us/azure/azure-arc/servers/troubleshoot-agent-onboard

    If you have any further queries, do let us know.


    If the answer is helpful, please click "Accept Answer" and "Upvote it".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.