GRAALVM本地图像的迁移问题到AWS Graviton2(ARM64)处理器
现有实现:
- 为X86_64架构配置的所有lambdas。
- 这些lambdas将运行编译本机图像的GRAALVM以执行某些功能。
- 使用天然马文 - plugin(0.9.9)&命令: mvn -b -dskiptests -pentive Clean Package
- 我们在构建步骤中将其用作GitHub动作的一部分。
为了将lambdas移至graviton2实例: -
我们根据此 atrate 。这会导致此错误:
'./本机-Executable:无法执行二进制文件'
使其在基于ARM64的处理器上工作,我们试图重新编译此Java代码的AARM64。 这是我做的几件事: -
- 通过使用 delaguardo/setup-graalvm 然后获取以下错误:
无法执行二进制文件:EXEC格式错误错误:使用退出代码完成过程126。
- 尝试了graalvm软件包安装&安装本机映像,获取Java11-Aarch64/x64/bin/gu:无法执行
二进制文件:exec格式错误
。 - 尝试 run-on-on-on-ark package ,但它给了我一个错误
'的of无法在unix:///var/run/docker.sock上连接到Docker守护程序。 Docker守护程序是否在运行?'
- 当我尝试在没有graalvm的情况下创建构建时,找不到
'MVN命令'
。
- 通过使用 delaguardo/setup-graalvm 然后获取以下错误:
因此,总而言之,“ ARM64”的简单体系结构价值变化不足以在Graviton2基于AWS Lambdas& GitHub -Java -ARM64堆栈上的许多与迁移有关的问题。
如果有人可以帮助我从这个瓶颈中前进,这将不胜感激。
Existing Implementation:
- All Lambdas configured for x86_64 Architecture.
- These lambdas are to run a GraalVM compiled Native image to execute some functionality.
- The compilation of this native image is done with Maven using native-maven-plugin(0.9.9) & the command: mvn -B -DskipTests -Pnative clean package
- We are using this as part of Github actions in our build step.
To move the Lambdas to Graviton2 instances:-
We changed the architecture to 'arm64' in the template according to this article. This results in this error:
'./native-executable: cannot execute binary file'
To get it to work on arm64 based processor, we have tried to recompile this java code for aarm64 .
Here are few of the things I did:-- Change graalvm setup on Github to arm64 base by using DeLaGuardo/setup-graalvm and then getting the following error:
cannot execute binary file: Exec format error Error: Process completed with exit code 126.
- Tried Graalvm package install & install native image, getting java11-aarch64/x64/bin/gu: cannot execute
binary file: Exec format error
. - Tried run-on-arch package but it gives me an error of
'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?'
- Also getting
'mvn command not found'
when I try to create a build without Graalvm.
- Change graalvm setup on Github to arm64 base by using DeLaGuardo/setup-graalvm and then getting the following error:
So to summarise, a simple architecture value change of 'arm64' is not sufficient to run native images on Graviton2 based AWS Lambdas & lot of migration related issues on Github - Java - Arm64 stack.
It would be greatly appreciated if someone could help me to move forward from this bottleneck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
GRAALVM确实支持ARM64 https://www.graalvm.org/22.02.0 /参考手册/本机图像/ARM64/版本21.0。
MVN
未安装,这里还有一些步骤,以及aarch64 https://www.graalvm.org/22.0/docs/getting-started/linux-aarch64/
GraalVM does support arm64 https://www.graalvm.org/22.0/reference-manual/native-image/ARM64/ as of version 21.0.
mvn
is not installedThere are some steps here as well for aarch64 https://www.graalvm.org/22.0/docs/getting-started/linux-aarch64/
从您发布的错误中,看起来Docker进程可能没有足够的资源来编译本机可执行文件。
我会仔细检查您的github操作配置,并在可能的情况下添加更多内存。
如果您将AWS运行时接口客户端作为解决方案的一部分,则需要版本2.1.1。这是第一个支持AARCH64的版本。
From the errors you've posted, it looks like the docker process might not have enough resources to compile the native executable.
I would double-check your GitHub actions config and add more memory if possible.
If you are using the AWS runtime interface client as part of your solution you will need version 2.1.1. This is the first version to support aarch64.