aerospike / aerospike-server.docker

Dockerfiles for Aerospike Server
Other
141 stars 68 forks source link

Running on M1 #50

Closed artursh closed 1 year ago

artursh commented 1 year ago

Hi.

Try to run docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server:latest on mac with m1 proc. And container exited with error. Also try to run with --platfrom flag.

Logs:

➜  ~ docker logs aerospike
/entrypoint.sh: line 35: FEATURE_KEY_FILE: unbound variable
link eth0 state up
link eth0 state up in 0
Dec 01 2022 22:10:03 GMT: WARNING (hardware): (hardware.c:426) invalid index in /sys/devices/system/cpu/cpu0/topology/physical_package_id
Dec 01 2022 22:10:03 GMT: CRITICAL (hardware): (hardware.c:605) error while reading OS package index from /sys/devices/system/cpu/cpu0/topology/physical_package_id
Dec 01 2022 22:10:03 GMT: WARNING (as): (signal.c:217) SIGUSR1 received, aborting Aerospike Community Edition build 6.2.0.0 os debian11
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:621) stacktrace: registers: rax 0000000000000000 rbx ffffffffffffffff rcx 0000000000000027 rdx 0000000000000000 rsi 0000004007bc8c30 rdi 0000000000000002 rbp 000000000000000a rsp 0000004007bc8c30 r8 0000000000000000 r9 0000004007bc8c30 r10 0000000000000008 r11 0000004007f23ea0 r12 00000040063c3f20 r13 0000004007bc92f0 r14 0000004007bc8e78 r15 000000400029a248 rip 0000004007f23fe1
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:633) stacktrace: found 11 frames: 0x160ad9 0xc6622 0x4007f24140 0x4007f23fe1 0x16051c 0x15817a 0x15c156 0x51d5d 0x50c49 0x40082a6d0a 0x513aa offset 0x4000000000
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 0: asd(cf_log_stack_trace+0xe8) [0x4000160ad9]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 1: asd(as_sig_handle_usr1+0x1d) [0x40000c6622]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140) [0x4007f24140]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 3: /lib/x86_64-linux-gnu/libpthread.so.0(raise+0x141) [0x4007f23fe1]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 4: asd(cf_log_write_no_return+0x86) [0x400016051c]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 5: asd(+0x15817a) [0x400015817a]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 6: asd(cf_topo_config+0x23) [0x400015c156]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 7: asd(as_run+0x199) [0x4000051d5d]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 8: asd(main+0x9) [0x4000050c49]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 9: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x40082a6d0a]
Dec 01 2022 22:10:03 GMT: WARNING (as): (log.c:644) stacktrace: frame 10: asd(_start+0x2a) [0x40000513aa]
qemu: uncaught target signal 6 (Aborted) - core dumped

Thanks!

achakrab commented 1 year ago

Was there any permision issue with /sys/devices/system/cpu/cpu0/topology/physical_package_id? (should have read permission for all) Did the customer try the docker run with 'sudo'?

kportertx commented 1 year ago

Could you try again - be sure to re-pull the image.

An earlier release had shipped tini for x86_64 instead of aarch64. I'm unsure how that failure manifested, oddly the image worked fine when emulating aarch64. Just want to be sure this isn't something we've already addressed.

We have tried internally with a Mac with an M1 processor and it worked for us - not sure what is different between your environment and ours. If the issue continues, having more details about your environment could be helpful (such as OSX version and docker-desktop version).

artursh commented 1 year ago

I remove docker image and pull it again. The same problem. Also try to run docker with sudo, not helped =\

About my versions: macos 13.0.1 (22A400) docker 4.14.1 (91661) docker engine 20.10.21 docker compose v2.12.2

kportertx commented 1 year ago

The system we tested on differed only by the macos version - 12.5.1. I'll see if anyone has upgraded to Ventura can attempt to repro this issue.

kportertx commented 1 year ago

Not finding any M1 Macs running Ventura and hesitant to upgrade to Ventura this early. Have you tried running the container in privileged mode or maybe --security-opt systempaths=unconfined.

kportertx commented 1 year ago

Ok, found a M1 Mac running Ventura and tested this image on that machine - ran without issue.

Suggestion is that your docker-desktop is corrupted, which apparently is a common issue. Recommendation is to completely uninstall and reinstall docker-desktop and associated files.

kportertx commented 1 year ago

If this issue does continue after resetting docker, running with the hardware logging context in detail could be helpful.

logging {
    console {
        context any info
        context hardware detail
    }
}

Also if you could start a debian:bullseye-slim container and print the share the contents of /sys/devices/system/cpu/cpu0/topology/physical_package_id - that would be interesting. I would expect it to be 0 on your machine. According to the critical, it is outside of the range (0-1023).

ramunasd commented 1 year ago

I have Apple M1 with Ventura. Aerospike server 6.2.0.1 works fine, at least without any startup errors. MacOS 13.0.1 docker desktop 4.14.1 docker engine 20.10.21 cat /sys/devices/system/cpu/cpu0/topology/physical_package_id returns 0

artursh commented 1 year ago

I reinstall docker, now everything is ok. Thanks a lot!