astarte-platform / astarte_vmq_plugin

Astarte VerneMQ plugin publishes incoming messages on an AMQP exchange with some additional metadata, so they can be processed by other components.
http://astarte-platform.org/
Apache License 2.0
16 stars 10 forks source link

Docker image does not work on Apple M1 machine #52

Open Annopaolo opened 2 years ago

Annopaolo commented 2 years ago

As the title says. The error appears both when running the image alone and with the Astarte docker-compose. Here's the log:

m1@5c5e690b-19ac-4f24-9aee-2925b86df2e8 astarte % docker run astarte/vernemq:1.0.0
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
request send failed: Operation not supported
15:03:14.906 [error] Error generating configuration in phase transform_datatypes
15:03:14.906 [error] Error transforming datatype for: listener.http.metrics
15:03:14.906 [error] ":8888" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.ws.default
15:03:14.907 [error] ":8080" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.tcp.revproxy
15:03:14.907 [error] ":1885" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.tcp.default
15:03:14.907 [error] ":1883" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.vmq.clustering
15:03:14.907 [error] ":44053" cannot be converted to a(n) IP
configuration error, exit
15:03:14.906 [error] Error generating configuration in phase transform_datatypes
15:03:14.906 [error] Error transforming datatype for: listener.http.metrics
15:03:14.906 [error] ":8888" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.ws.default
15:03:14.907 [error] ":8080" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.tcp.revproxy
15:03:14.907 [error] ":1885" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.tcp.default
15:03:14.907 [error] ":1883" cannot be converted to a(n) IP
15:03:14.907 [error] Error transforming datatype for: listener.vmq.clustering
15:03:14.907 [error] ":44053" cannot be converted to a(n) IP
lanphan commented 4 months ago

Hello, I'm using Mac M1 and got problem with astarte/vernemq too, but with different error logs.

Password:
Reenter password:
config is OK
-config /opt/vernemq/data/generated.configs/app.2024.05.29.16.46.34.config -args_file /opt/vernemq/bin/../etc/vm.args -vm_args /opt/vernemq/bin/../etc/vm.args
Exec:  /opt/vernemq/bin/../erts-14.1/bin/erlexec -boot /opt/vernemq/bin/../releases/1.13.0+build.25.ref1cc57fa6/vernemq               -config /opt/vernemq/data/generated.configs/app.2024.05.29.16.46.34.config -args_file /opt/vernemq/bin/../etc/vm.args -vm_args /opt/vernemq/bin/../etc/vm.args              -pa /opt/vernemq/bin/../lib/erlio-patches -- console -noshell -noinput
Root: /opt/vernemq/bin/..
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.167.9',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {1,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Loaded NodeClock fromDisk #{{'VerneMQ@192.168.167.9',undefined} => {0,0},
                            {'VerneMQ@192.168.207.13',
                                <<118,218,223,103,230,97,238,163,184,124,199,
                                  128,72,42,33,82,21,205,148,226>>} =>
                                {0,0}}
Kernel pid terminated (application_controller) ("{application_start_failure,elixir,{bad_return,{{elixir,start,[normal,[]]},{'EXIT',{undef,[{erlang,nif_error,[undef],[{error_info,#{module => erl_erts_errors}}]},{prim_tty,isatty,1,[{file,\"prim_tty.erl\"},{line,1261}]},{elixir,start,2,[{file,\"src/elixir.erl\"},{line,61}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,293}]}]}}}}}")

Crash dump is being written to: /erl_crash.dump...done
/opt/vernemq/bin/vernemq.sh: line 179: ps: command not found
Password:
Reenter password:
Error generating config with cuttlefish
  run `vernemq config generate -l debug` for more information.
/opt/vernemq/bin/vernemq.sh: line 179: ps: command not found

Please help, thanks.

lanphan commented 4 months ago

Hello again,

I also checked that https://hub.docker.com/r/vernemq/vernemq/tags already supports linux/arm64, would you please support linux/arm64 for all astarte images?

Thanks.

Annopaolo commented 4 months ago

Hi @lanphan! We're (still) working on that, we'll provide updates on new developments here!