enclave demo client 运行错误:
  aZLS4M2I3mTC 2023年11月02日 46 0

[ec2-user@ip-172-31-66-71 GenerateToken]$ python3 client.py alias/wallet-sec2-enclave-kms u001


Expecting value: line 1 column 1 (char 0)


enclave的console出错信息如下:


Starting run.sh
nohup: appending output to 'nohup.out'
[    6.471168] NSM RNG: returning rand bytes = 64
Listening...
Received new connection
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 309, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fccf6ef1550>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 446, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='kms.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fccf6ef1550>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/main.py", line 117, in <module>
    main()
  File "/app/main.py", line 77, in main
    random = nitro_kms.kms_generate_random(32)  # return bytes 
  File "/app/kms.py", line 75, in kms_generate_random
    kms_response = self._kms_call(amz_target, request_parameters)
  File "/app/kms.py", line 242, in _kms_call
    response = requests.post(endpoint, data=request_parameters, headers=headers)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kms.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fccf6ef1550>: Failed to establish a new connection: [Errno -2] Name or service not known'))
child exited with error
[   37.965822] Unregister pv shared memory for cpu 0
[   37.966445] Unregister pv shared memory for cpu 1
[   37.967089] reboot: Restarting system
[   37.967539] reboot: machine restart
[ E45 ] Enclave console read error. Such error appears when reading from a running enclave's console fails.

For more details, please visit https://docs.aws.amazon.com/enclaves/latest/user/cli-errors.html#E45

If you open a support ticket, please provide the error log found at "/var/log/nitro_enclaves/err2023-09-25T14:27:54.587177126+00:00.log"
[ec2-user@ip-172-31-66-71 GenerateToken]$ cat /var/log/nitro_enclaves/err2023-09-25T14:27:54.587177126+00:00.log
  Action: Enclave Console
  Subactions:
    Failed to connect to enclave console
    Connect to enclave console
    Failed to read data from the console: ENOTCONN
  Root error file: src/utils.rs
  Root error line: 229
  Version: 1.2.2[ec2-user@ip-172-31-66-71 GenerateToken]$ telnet kms.us-east-1.amazonaws.com 443
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  EeGZtZT5Jsfk   2023年11月13日   28   0   0 ecraws
  4Txe79BjyroE   2023年11月02日   40   0   0 aws
  it2nV7RK7uw1   2023年11月28日   25   0   0 Dockerawsui