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

Can't run on Intel N5105 #174

Closed
mohshami opened this issue Mar 1, 2023 · 10 comments
Closed

Can't run on Intel N5105 #174

mohshami opened this issue Mar 1, 2023 · 10 comments

Comments

@mohshami
Copy link

mohshami commented Mar 1, 2023

Which ZincObserve functionalities are the source of the bug?

Don't known / other

Is this a regression?

No

Description

I'm trying to run ZincObserve on my home server which is a an Intel N5105 mini PC. It's running NixOS 22.11. When I try to run the AMD64 binary I get the following error
-bash: ./zincobserve: No such file or directory

I temporarily switched to Ubuntu server 22.04 and now get the following
Illegal instruction (core dumped)

I tried running the docker container on both Ubuntu and NixOS, the container just exists without any output

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the version you discovered this bug in (check about page for version information)

Version: v0.1.8

Anything else?

Is there any special CPU requirement?

@hengfeiyang
Copy link
Contributor

Yes, by default we enabled some CPU features, like:

+aes,+avx,+avx2,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2

Maybe this CPU doesn't support those features, Can you check which features this CPU support?

@mohshami
Copy link
Author

mohshami commented Mar 1, 2023

Thank you so much for the quick reply.

It supports all except for AVX. Is there a way I can get it to run?

@hengfeiyang
Copy link
Contributor

If you want to try, you can manually build ZincObserve yourself, I can guide you. and we will discuss how to support this type of CPU. Thanks.

@mohshami
Copy link
Author

mohshami commented Mar 1, 2023

I would love to, I understand having that feature enabled is better, but for a small installation like mine (I only want to collect queries going to my home DNS server) it should be find

@hengfeiyang
Copy link
Contributor

Sure, you can find me in Slack channel.

@hengfeiyang
Copy link
Contributor

Build steps:

  1. clone the project to you local.
  2. change the file https://github.com/zinclabs/zincobserve/blob/main/.cargo/config.toml, and delete the feature your machine not supported.
  3. install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  4. install Special version of Rust
    rustup toolchain install nightly-2023-01-26
    rustup default nightly-2023-01-26
    
  5. install others depends: apt-get install -y protobuf-compiler cmake gcc
  6. build: cargo build --release

@mohshami
Copy link
Author

mohshami commented Mar 1, 2023

I tried with the following config.toml

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=+aes,+sse4.2"]

Sadly I get the same result on NixOS, I will have to booth ubuntu on that server. Will test that later tonight

According to

https://www.cpu-world.com/CPUs/Celeron/Intel-Mobile%20Celeron%20N5105.html

The N5105 supports SSE4.2

Will let you know once I manage to boot ubuntu on this machine

@mohshami
Copy link
Author

mohshami commented Mar 1, 2023

Ok so instead of booting ubuntu on the machine, I ran an ubuntu docker

docker run -v $PWD:/data -it ubuntu /bin/bash

Then

ZO_ROOT_USER_EMAIL=root@example.com ZO_ROOT_USER_PASSWORD=Complexpass#123 ./zincobserve

That worked, so the binary is good, it looks like NixOS is missing a file needed to run the binary, any idea how I can find that file?

@mohshami
Copy link
Author

mohshami commented Mar 2, 2023

So that turned out to be a NixOS thing, so the issue can be closed. Thank you so much

@yibuma
Copy link

yibuma commented Mar 21, 2023

Based on my actual test, it normally after removing AVX and AVX2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants