Closed llnut closed 2 years ago
Hi @jcsora , thanks for the detailed error report.
Your applications seems to be sending its activation request to the wrong port.
Port 4433
is used for user interaction with the Coordinator, like setting manifest, retrieving attestation etc.
Port 2001
is the one you should be trying to reach with you application.
Replacing the the 4433
with 2001
for EDG_MARBLE_COORDINATOR_ADDR
in you occlum.json file should fix your issue:
{
//...
"env": {
"default": [
"PYTHONHOME=/opt/python-occlum",
"OCCLUM=yes",
"EDG_MARBLE_COORDINATOR_ADDR=coordinator:2001", // <-- Replaced port number
"EDG_MARBLE_TYPE=hello",
"EDG_MARBLE_UUID_FILE=uuid",
"EDG_MARBLE_DNS_NAMES=coordinator"
],
//...
}
Thank you very much for your answer @daniel-weisse , the previous problem has been resolved. But I ran into a new problem, when deploying with marblerun:v0.6.0 and all occlum versions between v0.26.4-v0.28.0, I got the following error of coordinator:
marblerun-coordinator-1 | ERROR: rc = 0xffffde80
marblerun-coordinator-1 | (oe_result_t=OE_CRYPTO_ERROR) [openenclave-src/enclave/crypto/mbedtls/crl.c:oe_crl_read_der:65]
marblerun-coordinator-1 | ERROR: Failed to read CRL. OE_CRYPTO_ERROR (oe_result_t=OE_CRYPTO_ERROR) [openenclave-src/common/sgx/collateral.c:oe_validate_revocation_list:385]
marblerun-coordinator-1 | ERROR: :OE_INVALID_PARAMETER [openenclave-src/enclave/crypto/mbedtls/crl.c:oe_crl_free:140]
marblerun-coordinator-1 | ERROR: Failed to validate revocation info. OE_CRYPTO_ERROR (oe_result_t=OE_CRYPTO_ERROR) [openenclave-src/common/sgx/quote.c:oe_get_sgx_quote_validity:776]
marblerun-coordinator-1 | ERROR: Failed to validate quote. OE_CRYPTO_ERROR (oe_result_t=OE_CRYPTO_ERROR) [openenclave-src/common/sgx/quote.c:oe_verify_quote_with_sgx_endorsements:631]
marblerun-coordinator-1 | 2022-07-28T03:07:57.386Z INFO zap/options.go:212 finished unary call with code Unauthenticated {"grpc.start_time": "2022-07-28T03:07:57Z", "system": "grpc", "span.kind": "server", "grpc.service": "rpc.Marble", "grpc.method": "Activate", "peer.address": "172.18.0.8:49334", "error": "rpc error: code = Unauthenticated desc = invalid quote: verifying quote failed: OE_CRYPTO_ERROR", "grpc.code": "Unauthenticated", "grpc.time_ms": 324.005}
marblerun-coordinator-1 | 2022-07-28T03:07:57.394Z INFO zap/grpclogger.go:92 [transport]transport: loopyWriter.run returning. connection error: desc = "transport is closing" {"system": "grpc", "grpc_log": true}
And when I deploying with marblerun:v0.5.1, the error message becomes the following:
panic: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"
goroutine 1 [running]:
main.prepareOcclum(0x7f9e4a92ca98, 0x7f9e4ae4b438, 0x1, 0x7f9e64000180, 0x200000003, 0x7f9e64000180)
/home/daniel/Edgeless/marblerun/cmd/premain-libos/main.go:113 +0x2da
main.main()
/home/daniel/Edgeless/marblerun/cmd/premain-libos/main.go:57 +0x185
Makefile:27: recipe for target 'run' failed
make: *** [run] Error 2
When I deploying with marblerun:v0.5.1 and occlum:v0.24.1, the error message becomes the following:
cd occlum_instance; occlum run /bin/premain-libos
[PreMain] 2022/07/28 03:54:27 detected libOS: Occlum
[PreMain] 2022/07/28 03:54:27 starting PreMain
[PreMain] 2022/07/28 03:54:27 fetching env variables
[PreMain] 2022/07/28 03:54:27 loading TLS Credentials
[PreMain] 2022/07/28 03:54:27 loading UUID
[PreMain] 2022/07/28 03:54:27 UUID not found. Generating and storing a new UUID
[PreMain] 2022/07/28 03:54:27 generating CSR
[PreMain] 2022/07/28 03:54:27 generating quote
/opt/occlum/build/bin/occlum: line 315: 862 Segmentation fault RUST_BACKTRACE=1 "$instance_dir/build/bin/occlum-run" "$@"
Makefile:27: recipe for target 'run' failed
make: *** [run] Error 139
This looks similar to another issue that was reported to us and is being investigated.
As a workaround, can you try setting pccs_api_version
to 3.1
in ./occlum/patch/sgx_default_qcnl.conf
Thank you for your patient answer @daniel-weisse , I updated the sgx_default_qcnl.conf
, now the problem is solved.
Issue description
The following error message is displayed when deploying the occlum_hello example:
To reproduce
Steps to reproduce the behavior:
Build coordinator and marble-injector docker image using the latest source code.
Start coordinator and marble-injector
In occlum container, verify the quote and get the coordinator's root certificate.
Set the manifest.
Start the occlum service
I also tried it with Minikube, but the error was the same as above.
Expected behavior
Start occlum_hello successfully
Environment
Additional info / screenshots