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

ARM64 Support #44

Closed
navanchauhan opened this issue Apr 23, 2022 · 15 comments
Closed

ARM64 Support #44

navanchauhan opened this issue Apr 23, 2022 · 15 comments

Comments

@navanchauhan
Copy link

Leaving this here in case anyone stumbles across this issue. I was able to successfully self-host plausible on an arm64 based Oracle Compute Instance by modifying the docker-compose.

More information on the Discussion plausible/analytics#903 (comment)

In the docker-compose just replace:

  • bytemark/smtp with navanchauhan/smtp (I built a multi-arch version of the original docker file)
  • plausible/analytics with justsky/analytics (They built and pushed a multi-arch version, will not be required if plausible officially starts supporting multi-arch builds)
  • yandex/clickhouse-server:21.3.2.5 with clickhouse/clickhouse-server:22.4.2.1

I did not open a PR because it will be only useful after plausible starts publishing official multi-arch images. plausible/analytics#1287 A simple edit in the GitHub Actions workflow will allow for that

@sebdanielsson
Copy link

I would love arm64/aarch64 support as well. Then I could host Plausible on my odroid-n2.

@sebdanielsson
Copy link

Upgrading to clickhouse-server:22.4.2.1 broke my container setup.

Processing configuration file '/etc/clickhouse-server/config.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/docker_related_config.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/logging.xml'.
Logging warning to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
2022.04.23 16:49:27.078238 [ 1 ] {} <Warning> Context: Linux is not using fast TSC clock source. Performance can be degraded.
2022.04.23 16:49:27.133140 [ 1 ] {} <Warning> Context: Linux threads max count is too low.
2022.04.23 16:49:27.133514 [ 1 ] {} <Warning> Context: Available memory at server startup is too low (2GiB).
2022.04.23 16:49:27.808304 [ 1 ] {} <Warning> Application: Calculated checksum of the binary: F2D14FA394CECCE5AED0925B54461551. There is no information about the reference checksum.
2022.04.23 16:49:27.850562 [ 1 ] {} <Error> CertificateReloader: Cannot obtain modification time for certificate file /etc/clickhouse-server/server.crt, skipping update. errno: 2, strerror: No such file or directory
2022.04.23 16:49:27.851501 [ 1 ] {} <Error> CertificateReloader: Cannot obtain modification time for key file /etc/clickhouse-server/server.key, skipping update. errno: 2, strerror: No such file or directory
2022.04.23 16:49:27.868059 [ 1 ] {} <Error> CertificateReloader: Poco::Exception. Code: 1000, e.code() = 0, SSL context exception: Error loading private key from file /etc/clickhouse-server/server.key: error:02000002:system library:OPENSSL_internal:No such file or directory (version 22.4.2.1 (official build))
2022.04.23 16:49:28.176159 [ 1 ] {} <Warning> Application: Listen [::]:8123 failed: Poco::Exception. Code: 1000, e.code() = 0, DNS error: EAI: Address family for hostname not supported (version 22.4.2.1 (official build)). If it is an IPv6 or IPv4 address and your host has disabled IPv6 or IPv4, then consider to specify not disabled IPv4 or IPv6 address to listen in <listen_host> element of configuration file. Example for disabled IPv6: <listen_host>0.0.0.0</listen_host> . Example for disabled IPv4: <listen_host>::</listen_host>
2022.04.23 16:49:28.177112 [ 1 ] {} <Warning> Application: Listen [::]:9000 failed: Poco::Exception. Code: 1000, e.code() = 0, DNS error: EAI: Address family for hostname not supported (version 22.4.2.1 (official build)). If it is an IPv6 or IPv4 address and your host has disabled IPv6 or IPv4, then consider to specify not disabled IPv4 or IPv6 address to listen in <listen_host> element of configuration file. Example for disabled IPv6: <listen_host>0.0.0.0</listen_host> . Example for disabled IPv4: <listen_host>::</listen_host>
2022.04.23 16:49:28.177829 [ 1 ] {} <Warning> Application: Listen [::]:9009 failed: Poco::Exception. Code: 1000, e.code() = 0, DNS error: EAI: Address family for hostname not supported (version 22.4.2.1 (official build)). If it is an IPv6 or IPv4 address and your host has disabled IPv6 or IPv4, then consider to specify not disabled IPv4 or IPv6 address to listen in <listen_host> element of configuration file. Example for disabled IPv6: <listen_host>0.0.0.0</listen_host> . Example for disabled IPv4: <listen_host>::</listen_host>
2022.04.23 16:49:28.178566 [ 1 ] {} <Warning> Application: Listen [::]:9004 failed: Poco::Exception. Code: 1000, e.code() = 0, DNS error: EAI: Address family for hostname not supported (version 22.4.2.1 (official build)). If it is an IPv6 or IPv4 address and your host has disabled IPv6 or IPv4, then consider to specify not disabled IPv4 or IPv6 address to listen in <listen_host> element of configuration file. Example for disabled IPv6: <listen_host>0.0.0.0</listen_host> . Example for disabled IPv4: <listen_host>::</listen_host>
2022.04.23 16:49:28.179170 [ 1 ] {} <Warning> Application: Listen [::]:9005 failed: Poco::Exception. Code: 1000, e.code() = 0, DNS error: EAI: Address family for hostname not supported (version 22.4.2.1 (official build)). If it is an IPv6 or IPv4 address and your host has disabled IPv6 or IPv4, then consider to specify not disabled IPv4 or IPv6 address to listen in <listen_host> element of configuration file. Example for disabled IPv6: <listen_host>0.0.0.0</listen_host> . Example for disabled IPv4: <listen_host>::</listen_host>
2022.04.23 16:49:28.408196 [ 1 ] {} <Error> CertificateReloader: Cannot obtain modification time for certificate file /etc/clickhouse-server/server.crt, skipping update. errno: 2, strerror: No such file or directory
2022.04.23 16:49:28.408615 [ 1 ] {} <Error> CertificateReloader: Cannot obtain modification time for key file /etc/clickhouse-server/server.key, skipping update. errno: 2, strerror: No such file or directory
2022.04.23 16:49:28.419647 [ 1 ] {} <Error> CertificateReloader: Poco::Exception. Code: 1000, e.code() = 0, SSL context exception: Error loading private key from file /etc/clickhouse-server/server.key: error:02000002:system library:OPENSSL_internal:No such file or directory (version 22.4.2.1 (official build))
2022.04.23 16:52:49.808878 [ 47 ] {} <Error> ServerErrorHandler: Poco::Exception. Code: 1000, e.code() = 107, Net Exception: Socket is not connected, Stack trace (when copying this message, always include the lines below):

0. Poco::Net::NetException::NetException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1b3c934c in /usr/bin/clickhouse
1. Poco::Net::SocketImpl::error(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1b3dcdc4 in /usr/bin/clickhouse
2. Poco::Net::SocketImpl::peerAddress() @ 0x1b3df4b6 in /usr/bin/clickhouse
3. DB::HTTPServerRequest::HTTPServerRequest(std::__1::shared_ptr<DB::Context const>, DB::HTTPServerResponse&, Poco::Net::HTTPServerSession&) @ 0x16ffd398 in /usr/bin/clickhouse
4. DB::HTTPServerConnection::run() @ 0x16ffbec2 in /usr/bin/clickhouse
5. Poco::Net::TCPServerConnection::start() @ 0x1b3e444f in /usr/bin/clickhouse
6. Poco::Net::TCPServerDispatcher::run() @ 0x1b3e68a1 in /usr/bin/clickhouse
7. Poco::PooledThread::run() @ 0x1b5ad2e9 in /usr/bin/clickhouse
8. Poco::ThreadImpl::runnableEntry(void*) @ 0x1b5aa640 in /usr/bin/clickhouse
9. ? @ 0x7fc391a30609 in ?
10. __clone @ 0x7fc391955163 in ?
 (version 22.4.2.1 (official build))
2022.04.23 16:52:49.820075 [ 46 ] {} <Error> ServerErrorHandler: Poco::Exception. Code: 1000, e.code() = 107, Net Exception: Socket is not connected, Stack trace (when copying this message, always include the lines below):

0. Poco::Net::NetException::NetException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1b3c934c in /usr/bin/clickhouse
1. Poco::Net::SocketImpl::error(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1b3dcdc4 in /usr/bin/clickhouse
2. Poco::Net::SocketImpl::peerAddress() @ 0x1b3df4b6 in /usr/bin/clickhouse
3. DB::HTTPServerRequest::HTTPServerRequest(std::__1::shared_ptr<DB::Context const>, DB::HTTPServerResponse&, Poco::Net::HTTPServerSession&) @ 0x16ffd398 in /usr/bin/clickhouse
4. DB::HTTPServerConnection::run() @ 0x16ffbec2 in /usr/bin/clickhouse
5. Poco::Net::TCPServerConnection::start() @ 0x1b3e444f in /usr/bin/clickhouse
6. Poco::Net::TCPServerDispatcher::run() @ 0x1b3e68a1 in /usr/bin/clickhouse
7. Poco::PooledThread::run() @ 0x1b5ad2e9 in /usr/bin/clickhouse
8. Poco::ThreadImpl::runnableEntry(void*) @ 0x1b5aa640 in /usr/bin/clickhouse
9. ? @ 0x7fc391a30609 in ?
10. __clone @ 0x7fc391955163 in ?
 (version 22.4.2.1 (official build))

@navanchauhan
Copy link
Author

Are you unable to use it? Or, are these just logged errors and warnings

@sebdanielsson
Copy link

I was unable to use Plausible. The main container restarted every couple of minutes.

@navanchauhan
Copy link
Author

navanchauhan commented Apr 26, 2022 via email

@sebdanielsson
Copy link

sebdanielsson commented Apr 26, 2022

When uppgrading you'll need to update the following config files:
https://github.com/plausible/hosting/blob/master/clickhouse/clickhouse-config.xml
https://github.com/plausible/hosting/blob/master/clickhouse/clickhouse-user-config.xml

And change the tags to .

Other than that I don't know that could cause the issues I'm having upgrading to the latest version.

@openscript
Copy link

With justsky/analytics I get a [warning] OTLP exporter failed to initialize with exception :throw:{:application_either_not_started_or_not_ready, :tls_certificate_check} when running it. Any ideas?

@ruslandoga
Copy link
Contributor

@openscript 👋

That's a rather harmless warning and can be ignored. More info: open-telemetry/opentelemetry-erlang#419

@abishekrsrikaanth
Copy link

@sebdanielsson Just started using on my Mac M1 and I have the same issue of Plausible restarting every few minutes. Is there a solution to get this working on a Mac M1?

@ruslandoga
Copy link
Contributor

@abishekrsrikaanth 👋

Are the any errors in the logs? docker compose logs plausible?

You might want to try using one of arm64 container images.

@abishekrsrikaanth
Copy link

abishekrsrikaanth commented Sep 24, 2022

@ruslandoga can you please elaborate what you mean my using arm64 container images. I just followed the docs to download the repo and run docker compose up

And here are the logs

plausible_1  | Loading plausible..
plausible_1  | Starting dependencies..
plausible_1  | Starting repos..
plausible_1  | create Plausible.Repo database if it doesn't exist
plausible_1  | create Plausible.ClickhouseRepo database if it doesn't exist
plausible_1  | Creation of Db successful!
plausible_1  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
plausible_1  | Segmentation fault
plausible_1  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
plausible_1  | Segmentation fault
plausible_1  | Loading plausible..
plausible_1  | Starting dependencies..
plausible_1  | Starting repos..
plausible_1  | create Plausible.Repo database if it doesn't exist
plausible_1  | create Plausible.ClickhouseRepo database if it doesn't exist
plausible_1  | Creation of Db successful!
plausible_1  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
plausible_1  | Segmentation fault
plausible_1  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
plausible_1  | Segmentation fault
plausible_1  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
plausible_1  | Segmentation fault

@ruslandoga
Copy link
Contributor

ruslandoga commented Sep 24, 2022

@abishekrsrikaanth ah, right :)

So until plausible/analytics#2103 is merged and v1.5.0 is released, there aren't any official arm64 images for plausible/analytics. But some community members have built their own arm64 images, like OP here. You might be able to do the same.

You can also try using --platform linux/amd64 flag to make Docker run the current plausible container in emulator mode. More info: https://forums.docker.com/t/run-x86-intel-and-arm-based-images-on-apple-silicon-m1-macs/117123

@abishekrsrikaanth
Copy link

Thanks, let me look into this. Appreciate the help. Looking forward to the release

@navanchauhan
Copy link
Author

navanchauhan commented Oct 11, 2022 via email

@ruslandoga
Copy link
Contributor

ruslandoga commented Oct 12, 2022

v1.5.1 is out and it has arm64 support :)

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

5 participants