openobserve icon indicating copy to clipboard operation
openobserve copied to clipboard

Support for CPUs without aes feature

Open ojoeth opened this issue 1 year ago • 1 comments

Which OpenObserve functionalities are relevant/related to the feature request?

other

Description

Currently when running OpenObserve on an older CPU (including Raspberry Pi) which does not support the aes hardware feature, OpenObserve refuses to start. I have reported this in Slack and we have come to the conclusion that the issue is the hardware feature (https://discuss.openobserve.ai/2J30d1b)

Proposed solution

Would it be possible to build a separate Docker image for a version of OpenObserve which doesn't require the aes CPU feature?

Alternatives considered

Potentially on startup O2 could detect if the hardware feature is present and enable/disable the things which require aes accordingly?

ojoeth avatar Jul 04 '24 15:07 ojoeth

If we have over 10 users need it, i will add the official docker image for it.

hengfeiyang avatar Jul 04 '24 15:07 hengfeiyang

Try this version:

public.ecr.aws/zinclabs/openobserve:v0.13.1-rc2-arm64-pi

hengfeiyang avatar Nov 01 '24 01:11 hengfeiyang

Something's wrong with this. Logs unfortunately don't reveal the issue, as this is printed, and then the container just dies.

2024-11-01T19:50:20.250064367+00:00 INFO openobserve: Starting OpenObserve v0.13.1-rc2    
2024-11-01T19:50:20.250178773+00:00 INFO openobserve: System info: CPU cores 4, MEM total 3794 MB, Disk total 28 GB, free 15 GB    
2024-11-01T19:50:20.253974021+00:00 INFO config::ider: init ider with machine_id: 0    
2024-11-01T19:50:20.263036318+00:00 INFO infra::cache::file_data::disk: Loading disk cache start    
2024-11-01T19:50:20.264422900+00:00 INFO infra::cache::file_data::disk: Loading disk cache done, total files: 0     
2024-11-01T19:50:22.277989495+00:00 INFO openobserve::service::db::user: Start watching user    
2024-11-01T19:50:22.278572287+00:00 INFO openobserve::service::db::user: Users Cached    
2024-11-01T19:50:22.279620390+00:00 INFO openobserve::service::db::organization: Organization settings Cached    
2024-11-01T19:50:22.281053637+00:00 INFO openobserve::service::db::short_url: Start watching short URLs    
2024-11-01T19:50:22.281975649+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Cached with len: 0    
2024-11-01T19:50:22.282136203+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Garbage collection start with cache size: 0    
2024-11-01T19:50:22.282464959+00:00 INFO openobserve::service::db::schema: Start watching stream schema    
2024-11-01T19:50:22.282497033+00:00 INFO openobserve::service::db::functions: Start watching function    
2024-11-01T19:50:22.282867215+00:00 INFO openobserve::service::db::compact::retention: Start watching compact deleting    
2024-11-01T19:50:22.282937252+00:00 INFO openobserve::service::db::metrics: Start watching prometheus cluster leader    
2024-11-01T19:50:22.282966455+00:00 INFO openobserve::service::db::alerts::templates: Start watching alert templates    
2024-11-01T19:50:22.282979048+00:00 INFO openobserve::service::db::alerts::destinations: Start watching alert destinations    
2024-11-01T19:50:22.283000251+00:00 INFO openobserve::service::db::alerts::realtime_triggers: Start watching alert realtime triggers    
2024-11-01T19:50:22.283028381+00:00 INFO openobserve::service::db::alerts::alert: Start watching alerts    
2024-11-01T19:50:22.283036714+00:00 INFO openobserve::service::db::dashboards::reports: Start watching reports    
2024-11-01T19:50:22.283044955+00:00 INFO openobserve::service::db::organization: Start watching organization settings    
2024-11-01T19:50:22.284479425+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Garbage collection end with cache size: 0    
2024-11-01T19:50:22.285593342+00:00 INFO openobserve::service::db::schema: Stream schemas Cached    
2024-11-01T19:50:22.286627982+00:00 INFO openobserve::service::db::functions: Functions Cached    
2024-11-01T19:50:22.288153858+00:00 INFO openobserve::service::db::metrics: Prometheus cluster leaders Cached    
2024-11-01T19:50:22.289025536+00:00 INFO openobserve::service::db::alerts::templates: Alert templates Cached    
2024-11-01T19:50:22.289885585+00:00 INFO openobserve::service::db::alerts::destinations: Alert destinations Cached    
2024-11-01T19:50:22.290777726+00:00 INFO openobserve::service::db::alerts::realtime_triggers: Alert realtime triggers Cached    
2024-11-01T19:50:22.291661349+00:00 INFO openobserve::service::db::alerts::alert: Alerts Cached    
2024-11-01T19:50:22.292527693+00:00 INFO openobserve::service::db::dashboards::reports: Reports Cached    
2024-11-01T19:50:22.293403946+00:00 INFO openobserve::service::db::syslog: SyslogRoutes Cached    
2024-11-01T19:50:22.294149588+00:00 INFO openobserve::service::db::syslog: SyslogServer settings Cached    
2024-11-01T19:50:22.294990396+00:00 INFO openobserve::service::db::pipeline: [Pipeline] Cached with len: 0    
2024-11-01T19:50:22.295787149+00:00 INFO openobserve::job: Job initialization complete    
2024-11-01T19:50:22.296339404+00:00 INFO openobserve: backend job init success    
2024-11-01T19:50:22.296353459+00:00 INFO openobserve::job::alert_manager: Spawning embedded report server false    
2024-11-01T19:50:22.296499328+00:00 INFO openobserve::service::db::syslog: Start watching syslog routes    
2024-11-01T19:50:22.296544865+00:00 INFO openobserve::service::db::syslog: Start watching SyslogServer settings    
2024-11-01T19:50:22.298152778+00:00 INFO openobserve::job::compactor: [COMPACTOR] start run_compactor_pending_jobs_metric job    
2024-11-01T19:50:22.300755276+00:00 INFO openobserve: starting gRPC server at 0.0.0.0:5081    
2024-11-01T19:50:22.301142291+00:00 INFO openobserve::service::db::schema: EnrichmentTables Cached    
2024-11-01T19:50:22.303136738+00:00 INFO actix_server::builder: starting 4 workers
2024-11-01T19:50:22.303665363+00:00 INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime
2024-11-01T19:50:22.303703474+00:00 INFO actix_server::server: starting service: "actix-web-service-0.0.0.0:5080", workers: 4, listening on: 0.0.0.0:5080
2024-11-01T19:50:22.305419775+00:00 INFO openobserve: starting HTTP server at: 0.0.0.0:5080, thread_id: 0    
2024-11-01T19:50:22.322175807+00:00 INFO openobserve::common::meta::telemetry: sending event OpenObserve - Starting server    
2024-11-01T19:50:22.395465349+00:00 INFO openobserve: starting HTTP server at: 0.0.0.0:5080, thread_id: 0

atonusgit avatar Nov 01 '24 19:11 atonusgit

This log looks fine the service started. did you see the reason why it die? what is the exit code?

hengfeiyang avatar Nov 02 '24 07:11 hengfeiyang

Running this docker inspect <container_id> --format='{{.State.ExitCode}}'

Gives me exit code 132.

atonusgit avatar Nov 02 '24 13:11 atonusgit

I have no idea about this. Maybe need more users help testing.

hengfeiyang avatar Nov 04 '24 02:11 hengfeiyang

Something's wrong with this. Logs unfortunately don't reveal the issue, as this is printed, and then the container just dies.

2024-11-01T19:50:20.250064367+00:00 INFO openobserve: Starting OpenObserve v0.13.1-rc2    
2024-11-01T19:50:20.250178773+00:00 INFO openobserve: System info: CPU cores 4, MEM total 3794 MB, Disk total 28 GB, free 15 GB    
2024-11-01T19:50:20.253974021+00:00 INFO config::ider: init ider with machine_id: 0    
2024-11-01T19:50:20.263036318+00:00 INFO infra::cache::file_data::disk: Loading disk cache start    
2024-11-01T19:50:20.264422900+00:00 INFO infra::cache::file_data::disk: Loading disk cache done, total files: 0     
2024-11-01T19:50:22.277989495+00:00 INFO openobserve::service::db::user: Start watching user    
2024-11-01T19:50:22.278572287+00:00 INFO openobserve::service::db::user: Users Cached    
2024-11-01T19:50:22.279620390+00:00 INFO openobserve::service::db::organization: Organization settings Cached    
2024-11-01T19:50:22.281053637+00:00 INFO openobserve::service::db::short_url: Start watching short URLs    
2024-11-01T19:50:22.281975649+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Cached with len: 0    
2024-11-01T19:50:22.282136203+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Garbage collection start with cache size: 0    
2024-11-01T19:50:22.282464959+00:00 INFO openobserve::service::db::schema: Start watching stream schema    
2024-11-01T19:50:22.282497033+00:00 INFO openobserve::service::db::functions: Start watching function    
2024-11-01T19:50:22.282867215+00:00 INFO openobserve::service::db::compact::retention: Start watching compact deleting    
2024-11-01T19:50:22.282937252+00:00 INFO openobserve::service::db::metrics: Start watching prometheus cluster leader    
2024-11-01T19:50:22.282966455+00:00 INFO openobserve::service::db::alerts::templates: Start watching alert templates    
2024-11-01T19:50:22.282979048+00:00 INFO openobserve::service::db::alerts::destinations: Start watching alert destinations    
2024-11-01T19:50:22.283000251+00:00 INFO openobserve::service::db::alerts::realtime_triggers: Start watching alert realtime triggers    
2024-11-01T19:50:22.283028381+00:00 INFO openobserve::service::db::alerts::alert: Start watching alerts    
2024-11-01T19:50:22.283036714+00:00 INFO openobserve::service::db::dashboards::reports: Start watching reports    
2024-11-01T19:50:22.283044955+00:00 INFO openobserve::service::db::organization: Start watching organization settings    
2024-11-01T19:50:22.284479425+00:00 INFO openobserve::service::db::short_url: [SHORT_URLS] Garbage collection end with cache size: 0    
2024-11-01T19:50:22.285593342+00:00 INFO openobserve::service::db::schema: Stream schemas Cached    
2024-11-01T19:50:22.286627982+00:00 INFO openobserve::service::db::functions: Functions Cached    
2024-11-01T19:50:22.288153858+00:00 INFO openobserve::service::db::metrics: Prometheus cluster leaders Cached    
2024-11-01T19:50:22.289025536+00:00 INFO openobserve::service::db::alerts::templates: Alert templates Cached    
2024-11-01T19:50:22.289885585+00:00 INFO openobserve::service::db::alerts::destinations: Alert destinations Cached    
2024-11-01T19:50:22.290777726+00:00 INFO openobserve::service::db::alerts::realtime_triggers: Alert realtime triggers Cached    
2024-11-01T19:50:22.291661349+00:00 INFO openobserve::service::db::alerts::alert: Alerts Cached    
2024-11-01T19:50:22.292527693+00:00 INFO openobserve::service::db::dashboards::reports: Reports Cached    
2024-11-01T19:50:22.293403946+00:00 INFO openobserve::service::db::syslog: SyslogRoutes Cached    
2024-11-01T19:50:22.294149588+00:00 INFO openobserve::service::db::syslog: SyslogServer settings Cached    
2024-11-01T19:50:22.294990396+00:00 INFO openobserve::service::db::pipeline: [Pipeline] Cached with len: 0    
2024-11-01T19:50:22.295787149+00:00 INFO openobserve::job: Job initialization complete    
2024-11-01T19:50:22.296339404+00:00 INFO openobserve: backend job init success    
2024-11-01T19:50:22.296353459+00:00 INFO openobserve::job::alert_manager: Spawning embedded report server false    
2024-11-01T19:50:22.296499328+00:00 INFO openobserve::service::db::syslog: Start watching syslog routes    
2024-11-01T19:50:22.296544865+00:00 INFO openobserve::service::db::syslog: Start watching SyslogServer settings    
2024-11-01T19:50:22.298152778+00:00 INFO openobserve::job::compactor: [COMPACTOR] start run_compactor_pending_jobs_metric job    
2024-11-01T19:50:22.300755276+00:00 INFO openobserve: starting gRPC server at 0.0.0.0:5081    
2024-11-01T19:50:22.301142291+00:00 INFO openobserve::service::db::schema: EnrichmentTables Cached    
2024-11-01T19:50:22.303136738+00:00 INFO actix_server::builder: starting 4 workers
2024-11-01T19:50:22.303665363+00:00 INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime
2024-11-01T19:50:22.303703474+00:00 INFO actix_server::server: starting service: "actix-web-service-0.0.0.0:5080", workers: 4, listening on: 0.0.0.0:5080
2024-11-01T19:50:22.305419775+00:00 INFO openobserve: starting HTTP server at: 0.0.0.0:5080, thread_id: 0    
2024-11-01T19:50:22.322175807+00:00 INFO openobserve::common::meta::telemetry: sending event OpenObserve - Starting server    
2024-11-01T19:50:22.395465349+00:00 INFO openobserve: starting HTTP server at: 0.0.0.0:5080, thread_id: 0

Got the same logs

j0x3n avatar Nov 06 '24 18:11 j0x3n

I tried to run the binary file directly and got the following error:

2024-11-06T18:12:36.108299646+00:00 INFO openobserve: Starting OpenObserve v0.13.1-rc2 2024-11-06T18:12:36.108580068+00:00 INFO openobserve: System info: CPU cores 4, MEM total 3791 MB, Disk total 113 GB, free 102 GB Illegal instruction

j0x3n avatar Nov 06 '24 18:11 j0x3n

Try this version:

public.ecr.aws/zinclabs/openobserve:v0.13.1-rc3-arm64-pi

hengfeiyang avatar Nov 08 '24 05:11 hengfeiyang

Try this version:

public.ecr.aws/zinclabs/openobserve:v0.13.1-rc3-arm64-pi

Hey, this worked! Nice, thank you!

atonusgit avatar Nov 09 '24 07:11 atonusgit

Also works for me, thanks for making a build. I'll go ahead and close this issue.

ojoeth avatar Nov 09 '24 19:11 ojoeth

The release already added to the CI, we will already have the tag VERSION-arm64-pi from this version.

hengfeiyang avatar Nov 11 '24 04:11 hengfeiyang

It seems it is not possible to have a x86_64 build without aes because of gxhash dependency, right? https://github.com/ogxd/gxhash/blob/main/README.md

juju4 avatar Nov 24 '24 20:11 juju4

it is possible, you can manually do it

# disable gxhash
- sed -i 's/default = \[\"gxhash\"\]/default = []/g' src/config/Cargo.toml
- sed -i 's/+aes,//g' .cargo/config.toml

Then the build will no need AES. I only generate for ARM in our official release because most users ask for that.

hengfeiyang avatar Nov 25 '24 03:11 hengfeiyang

it is possible, you can manually do it

Ah, great! Thanks! I had the impression gxhash was required. Added source build option to my ansible role https://github.com/juju4/ansible-openobserve (work in progress)

juju4 avatar Dec 01 '24 19:12 juju4