Elastic agent on Raspberry Pi

Hello All! I am trying to install the elastic agent to a raspberry pi and trying to enroll it onto our fleet server.

When trying to install the agent I get the error:

./elastic-agent: 1: Syntax error: word unexpected (expecting ")")

Can someone help me with this issue?


Commands used:

curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.2.0-linux-arm64.tar.gz

tar xzvf elastic-agent-8.2.0-linux-arm64.tar.gz 

cd elastic-agent-8.2.0-linux-arm64

sudo ./elastic-agent install --url={{ fleet_server_url}} --enrollment-token={{ token }} --insecure

I am using a local install with self signed certs, so --insecure is needed!

Are you certain your url and token are correct? I was able to install v8.2.2 on an rp4 (ubuntu 22.04) successfully without the insecure flag.

Yes I am certain these are correct, they were given to me by the elastic interface.

It looks like you're using ansible, is it templating correctly? Can you attempt with 8.2.2?

No, I am not using ansible. I just removed the urls and tokens for privacy reasons. Sorry for the confusion

Can you attempt to run the command from Kibana onto a target machine manually to check if the problem is ansible or the agent install?

I do not use ansible... the problem is the agent install

wow, my reading comprehension was bad. Is it still the same issue with v8.2.2?

I have not tested it yet, will look into the near future, thnx for now! Will report back here later!

I just tested with the following:

Version 8.2.2

curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.2.2-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.2.2-linux-x86_64.tar.gz
cd elastic-agent-8.2.2-linux-x86_64
sudo ./elastic-agent install --url= --enrollment-token=TOKEN --insecure

the same commands after that (with respect to the new version).

I now get the error:

./elastic-agent: 1:ELF: not found
./elastic-agent: 36: Syntax error: "(" unexpected

Version 8.2.0

curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.2.0-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.2.0-linux-x86_64.tar.gz
cd elastic-agent-8.2.0-linux-x86_64
sudo ./elastic-agent install --url= --enrollment-token=TOKEN --insecure

the same commands after that (with respect to the new version).

I now get the error:

./elastic-agent: 1:ELF: not found
./elastic-agent: 2: @!: not found
./elastic-agent: 3: ▒▒: not found
./elastic-agent: 4: ▒: not found
./elastic-agent: 5: Syntax error: word unexpected (expecting ")")

Oh, that's an easy fix!

You've downloaded the x86_64 version and raspberry pi are arm64.
Try with:

Oh wow, sorry!

But when installing the arm64 of version 8.2.2 I get the error:

./elastic-agent: 1:ELF▒h%+@8: not found
./elastic-agent: 1: Syntax error: Unterminated quoted string

Command: sudo ./elastic-agent install --url= --enrollment-token=TOKEN --insecure

Are you using a 64bit os?

Oh no... you are right.... 32 bit :sweat_smile:

Is there a 32 bit variant available?

not for the 8.x releases

Okay! thnx for the help! I will look into the 64bit version of raspberry pi os then!