I can reproduce the error even on your tiny hello world example. Running on an x86_64 EC2 instance running AL2. See the log of all the necessary information. Why is it looking for /usr/share/nitro_enclaves/blobs//cmdline which probably just exists in a specific AMI?
`
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ pwd
/home/ec2-user/aws-nitro-enclaves-cli
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ uname -a
Linux i-0ef57f313705cba5a.ec2.internal 5.10.167-147.601.amzn2.x86_64 #1 SMP Tue Feb 14 21:50:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli --version
Nitro CLI 1.2.2
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ sudo systemctl status nitro-enclaves-allocator.service
● nitro-enclaves-allocator.service - Nitro Enclaves Resource Allocator
Loaded: loaded (/usr/lib/systemd/system/nitro-enclaves-allocator.service; enabled; vendor preset: disabled)
Active: active (exited) since Sun 2023-06-25 11:06:20 UTC; 3 days ago
Main PID: 9692 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CGroup: /system.slice/nitro-enclaves-allocator.service
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Auto-generating the enclave CPU pool by using the CPU count...
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Will try to reserve 2048 MB of memory on node 0.
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Configuring the huge page memory...
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: - Reserved 2 pages of type: 1048576kB.
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Done.
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Auto-generated the enclave CPU pool: 1,3.
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Configuring the enclave CPU pool...
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Done.
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Successfully allocated Nitro Enclaves resources: 2048 MiB, 2 CPUs
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal systemd[1]: Started Nitro Enclaves Resource Allocator.
Hint: Some lines were ellipsized, use -l to show in full.
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli build-enclave --docker-dir ./examples/x86_64/hello/ --docker-uri hello --output-f
ile enclave.eif
Dockerfile hello.sh README.md
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli build-enclave --docker-dir ./examples/x86_64/hello/ --docker-uri hello --output-f
ile enclave.eif
Start building the Enclave Image...
[ E19 ] File operation failure. Such error appears when the system fails to perform the requested file operations, such as opening the EIF file when launching an enclave, or seeking to a specific offset in the EIF file, or writing to the log file.
File: '/usr/share/nitro_enclaves/blobs//cmdline', failing operation: 'Open'.
If you open a support ticket, please provide the error log found at "/var/log/nitro_enclaves/err2023-06-28T17:13:17.005305029+00:00.log"
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ cat /var/log/nitro_enclaves/err2023-06-28T17:13:17.005305029+00:00.log
Action: Build Enclave
Subactions:
Failed to build enclave
Failed to build EIF from docker
Could not open kernel command line file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Root error file: src/lib.rs
Root error line: 84
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ logout
`
I can reproduce the error even on your tiny hello world example. Running on an x86_64 EC2 instance running AL2. See the log of all the necessary information. Why is it looking for /usr/share/nitro_enclaves/blobs//cmdline which probably just exists in a specific AMI?
` [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ pwd /home/ec2-user/aws-nitro-enclaves-cli [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ uname -a Linux i-0ef57f313705cba5a.ec2.internal 5.10.167-147.601.amzn2.x86_64 #1 SMP Tue Feb 14 21:50:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli --version Nitro CLI 1.2.2 [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ sudo systemctl status nitro-enclaves-allocator.service ● nitro-enclaves-allocator.service - Nitro Enclaves Resource Allocator Loaded: loaded (/usr/lib/systemd/system/nitro-enclaves-allocator.service; enabled; vendor preset: disabled) Active: active (exited) since Sun 2023-06-25 11:06:20 UTC; 3 days ago Main PID: 9692 (code=exited, status=0/SUCCESS) Tasks: 0 Memory: 0B CGroup: /system.slice/nitro-enclaves-allocator.service
Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Auto-generating the enclave CPU pool by using the CPU count... Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Will try to reserve 2048 MB of memory on node 0. Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Configuring the huge page memory... Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: - Reserved 2 pages of type: 1048576kB. Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Done. Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Auto-generated the enclave CPU pool: 1,3. Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Configuring the enclave CPU pool... Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Done. Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal nitro-enclaves-allocator[9692]: Successfully allocated Nitro Enclaves resources: 2048 MiB, 2 CPUs Jun 25 11:06:20 i-0ef57f313705cba5a.ec2.internal systemd[1]: Started Nitro Enclaves Resource Allocator. Hint: Some lines were ellipsized, use -l to show in full. [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli build-enclave --docker-dir ./examples/x86_64/hello/ --docker-uri hello --output-f ile enclave.eif Dockerfile hello.sh README.md
[ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ nitro-cli build-enclave --docker-dir ./examples/x86_64/hello/ --docker-uri hello --output-f ile enclave.eif Start building the Enclave Image... [ E19 ] File operation failure. Such error appears when the system fails to perform the requested file operations, such as opening the EIF file when launching an enclave, or seeking to a specific offset in the EIF file, or writing to the log file. File: '/usr/share/nitro_enclaves/blobs//cmdline', failing operation: 'Open'.
For more details, please visit https://docs.aws.amazon.com/enclaves/latest/user/cli-errors.html#E19
If you open a support ticket, please provide the error log found at "/var/log/nitro_enclaves/err2023-06-28T17:13:17.005305029+00:00.log" [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ cat /var/log/nitro_enclaves/err2023-06-28T17:13:17.005305029+00:00.log Action: Build Enclave Subactions: Failed to build enclave Failed to build EIF from docker Could not open kernel command line file: Os { code: 2, kind: NotFound, message: "No such file or directory" } Root error file: src/lib.rs Root error line: 84 [ec2-user@i-0ef57f313705cba5a aws-nitro-enclaves-cli]$ logout `