docker - kubernetes.client.exceptions.ApiException: (0) 原因:握手状态 500 内部服务器错误
问题描述
我正在尝试在 kubernetes 本地 2 节点集群而不是 AWS 集群上运行一个项目,如(https://github.com/hydro-project/cluster/blob/master/docs/getting-started-aws.md)。但是在安装脚本的某个时刻,我收到了这个错误。可能是什么原因?提前致谢。
Traceback (most recent call last):
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/stream/ws_client.py", line 468, in websocket_call
client = WSClient(configuration, url, headers, capture_all)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/stream/ws_client.py", line 62, in __init__
self.sock = create_websocket(configuration, url, headers)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/stream/ws_client.py", line 452, in create_websocket
websocket.connect(url, header=header)
File "/home/akazad/.local/lib/python3.6/site-packages/websocket/_core.py", line 252, in connect
self.handshake_response = handshake(self.sock, *addrs, **options)
File "/home/akazad/.local/lib/python3.6/site-packages/websocket/_handshake.py", line 59, in handshake
status, resp = _get_resp_headers(sock)
File "/home/akazad/.local/lib/python3.6/site-packages/websocket/_handshake.py", line 145, in _get_resp_headers
raise WebSocketBadStatusException("Handshake status %d %s", status, status_message, resp_headers)
websocket._exceptions.WebSocketBadStatusException: Handshake status 500 Internal Server Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/akazad/hydro-project/cluster/hydro/cluster/create_cluster.py", line 245, in <module>
args.conf, args.sshkey, cluster_name)
File "/home/akazad/hydro-project/cluster/hydro/cluster/create_cluster.py", line 120, in create_cluster
batch_add_nodes(client, apps_client, cfile, ['routing'], [route_count], BATCH_SIZE, prefix)
File "/home/akazad/hydro-project/cluster/hydro/cluster/add_nodes.py", line 143, in batch_add_nodes
add_nodes(client, apps_client, cfile, node_types, node_counts, True,prefix)
File "/home/akazad/hydro-project/cluster/hydro/cluster/add_nodes.py", line 128, in add_nodes
'/hydro/anna/conf/', cname)
File "/home/akazad/hydro-project/cluster/hydro/shared/util.py", line 140, in copy_file_to_pod
_preload_content=False, container=container)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/stream/stream.py", line 35, in _websocket_request
return api_method(*args, **kwargs)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 994, in connect_get_namespaced_pod_exec
return self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs) # noqa: E501
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 1115, in connect_get_namespaced_pod_exec_with_http_info
collection_formats=collection_formats)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
_preload_content, _request_timeout, _host)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
_request_timeout=_request_timeout)
File "/home/akazad/.local/lib/python3.6/site-packages/kubernetes/stream/ws_client.py", line 474, in websocket_call
raise ApiException(status=0, reason=str(e))
kubernetes.client.exceptions.ApiException: (0)
Reason: Handshake status 500 Internal Server Error
解决方案
推荐阅读
- elixir - 具有动态构建条件的 Ecto 连接
- r - 如何按每日最小值聚合数据框
- cqrs - 拉戈姆 | 读取端处理器的返回值
- amazon-web-services - 如何将步骤中的输入插入到 json 结构并传递到步骤函数中的下一步?
- javascript - 向后打印特定索引的值
- android - SwipeRefreshLayout 和处理 webview 中的外部链接(手动类)在 android webview 中不能一起工作
- c - strcpy 将结构名称复制到字符数组?
- c# - Why would a non-UI thread block the UI?
- python - Python regular expression match number in string
- c# - 在 N 层项目中使用泛型的自动映射器