hummingbot / deploy

This repository provides various examples of how to deploy Hummingbot using Docker.
Apache License 2.0
86 stars 90 forks source link

阿里云部署,connect 连接超时 #39

Closed zzzhao2023 closed 5 months ago

zzzhao2023 commented 8 months ago

在阿里云部署docker的时候,connect 连接超时。 错误信息 24-03-26 03:11:56,085 - 15 - hummingbot.connector.exchange.injective_v2.injective_v2_exchange.InjectiveV2Exchange - ERROR - There was an error requesting exchange info. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/injective_v2_exchange.py", line 799, in _initialize_trading_pair_symbol_map mapping = await self._data_source.spot_market_and_trading_pair_map() File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_read_only_data_source.py", line 115, in spot_market_and_trading_pair_map await self.update_markets() File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_read_only_data_source.py", line 220, in update_markets ) = await self._get_markets_and_tokens() File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_data_source.py", line 1587, in _get_markets_and_tokens spot_markets: Dict[str, SpotMarket] = await self.query_executor.spot_markets() File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/injective_query_executor.py", line 161, in spot_markets return await self._sdk_client.all_spot_markets() File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 324, in all_spot_markets await self._initialize_tokens_and_markets() File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 2653, in _initialize_tokens_and_markets markets_info = (await self.fetch_spot_markets(market_statuses=["active"]))["markets"] File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 1325, in fetch_spot_markets return await self.exchange_spot_api.fetch_markets( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/client/indexer/grpc/indexer_grpc_spot_api.py", line 29, in fetch_markets response = await self._execute_call(call=self._stub.Markets, request=request) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/client/indexer/grpc/indexer_grpc_spot_api.py", line 240, in _execute_call return await self._assistant.execute_call(call=call, request=request) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/utils/grpc_api_request_assistant.py", line 12, in execute_call metadata = await self._metadata_provider() File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 331, in exchange_metadata return await self.cookie_assistant.exchange_metadata(metadata_query_provider=metadata_query_provider) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 25, in exchange_metadata cookie = await self.exchange_cookie(metadata_query_provider=metadata_query_provider) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 113, in exchange_cookie await self._fetch_exchange_cookie(metadata_query_provider=metadata_query_provider) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 133, in _fetch_exchange_cookie raise RuntimeError(f"Error fetching exchange cookie ({metadata})") RuntimeError: Error fetching exchange cookie (Metadata((('alt-svc', 'h3=":443"; ma=2592000'), ('server', 'Caddy'), ('date', 'Tue, 26 Mar 2024 03:11:55 GMT')))) 2024-03-26 03:14:04,692 - 15 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time. Traceback (most recent call last): File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider server_time_ms: float = await time_provider File "/home/hummingbot/hummingbot/connector/exchange/kucoin/kucoin_web_utils.py", line 74, in get_current_server_time response = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request response = await self.execute_request_and_get_response( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response response = await self.call(request=request, timeout=timeout) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call resp = await wait_for(self._connection.call(request), timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call aiohttp_resp = await self._client_session.request( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request conn = await self._connector.connect( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection raise last_exc File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.kucoin.com:443 ssl:default [Network is unreachable] 2024-03-26 03:14:04,698 - 15 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection. 2024-03-26 03:14:04,699 - 15 - hummingbot.connector.exchange.ascend_ex.ascend_ex_exchange.AscendExExchange - ERROR - There was an error requesting exchange info. Traceback (most recent call last): File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1074, in _initialize_trading_pair_symbol_map exchange_info = await self._make_trading_pairs_request() File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1087, in _make_trading_pairs_request exchange_info = await self._api_get(path_url=self.trading_pairs_request_path) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 863, in _api_get return await self._api_request(*args, *kwargs) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 906, in _api_request request_result = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request response = await self.execute_request_and_get_response( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response response = await self.call(request=request, timeout=timeout) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call resp = await wait_for(self._connection.call(request), timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call aiohttp_resp = await self._client_session.request( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request conn = await self._connector.connect( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection raise last_exc File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host ascendex.com:443 ssl:default [Network is unreachable] 2024-03-26 03:14:04,700 - 15 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time. Traceback (most recent call last): File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(args, **kwargs) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider server_time_ms: float = await time_provider File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time response = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request response = await self.execute_request_and_get_response( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response response = await self.call(request=request, timeout=timeout) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call resp = await wait_for(self._connection.call(request), timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call aiohttp_resp = await self._client_session.request( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request conn = await self._connector.connect( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection raise last_exc File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.binance.com:443 ssl:default [Network is unreachable] 2024-03-26 03:14:04,700 - 15 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection. 2024-03-26 03:14:26,460 - 15 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: Traceback (most recent call last): File "/home/hummingbot/hummingbot/user/user_balances.py", line 92, in add_exchange err_msg = await UserBalances._update_balances(market) File "/home/hummingbot/hummingbot/user/user_balances.py", line 53, in _update_balances await market._update_balances() File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_exchange.py", line 517, in _update_balances account_info = await self._api_get( File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 863, in _api_get return await self._api_request(*args, *kwargs) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 906, in _api_request request_result = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request response = await self.execute_request_and_get_response( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response response = await self.call(request=request, timeout=timeout) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 106, in call request = await self._pre_process_request(request) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 114, in _pre_process_request request = await pre_processor.pre_process(request) File "/home/hummingbot/hummingbot/connector/utils.py", line 106, in pre_process await self._synchronizer.update_server_time_if_not_initialized(time_provider=self._time_provider()) File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 84, in update_server_time_if_not_initialized await self.update_server_time_offset_with_time_provider(time_provider) File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider server_time_ms: float = await time_provider File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time response = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request response = await self.execute_request_and_get_response( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response response = await self.call(request=request, timeout=timeout) File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call resp = await wait_for(self._connection.call(request), timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call aiohttp_resp = await self._client_session.request( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request conn = await self._connector.connect( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(args, **kwargs) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 456, in wait_for return fut.result() asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper return await c File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 63, in connect_exchange await self._perform_connect(connector_config) File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 144, in _perform_connect err_msg = await self.validate_n_connect_connector(connector_name) File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 122, in validate_n_connect_connector err_msg = await asyncio.wait_for( File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 458, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError 2024-03-26 03:15:13,401 - 15 - hummingbot.client.hummingbot_application - ERROR - MQTT is already stopped!

david-hummingbot commented 5 months ago

Closing out - repo is now being used to deploy dashboard