GaoQ1 / rasa_chatbot_cn

building a chinese dialogue system based on the newest version of rasa(基于最新版本rasa搭建的对话系统)
960 stars 290 forks source link

关于docker和mongodb #93

Closed 0x10C closed 3 years ago

0x10C commented 3 years ago

docker在linux服务器上运行大概率出现启动起来之后一分钟之后会死掉,并且bert服务起不起来,docker是按照dev里面的delpoy.sh部署的,另外请问是否能绕过mongodb呢,make run的时候和mongodb保error8的错误(因为docker起不成功,所以本机安装了mongodb模拟通信)

[2020-11-05 01:14:54 +0800] [23426] [ERROR] Experienced exception while trying to serve Traceback (most recent call last): File "/anaconda3/lib/python3.7/site-packages/sanic/app.py", line 1096, in run serve(server_settings) File "/anaconda3/lib/python3.7/site-packages/sanic/server.py", line 742, in serve trigger_events(before_start, loop) File "/anaconda3/lib/python3.7/site-packages/sanic/server.py", line 604, in trigger_events loop.run_until_complete(result) File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete File "/anaconda3/lib/python3.7/site-packages/rasa/core/run.py", line 206, in load_agent_on_start None, endpoints.tracker_store, _broker File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 44, in find_tracker_store domain=domain, host=store.url, event_broker=event_broker, store.kwargs File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 227, in init self._ensure_indices() File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 234, in _ensure_indices self.conversations.create_index("sender_id") File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 2059, in create_index return self.create_indexes([index], session, **cmd_options)[0] File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 1919, in create_indexes with self._socket_for_writes(session) as sock_info: File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 198, in _socket_for_writes return self.database.client._socket_for_writes(session) File "/anaconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1293, in _socket_for_writes server = self._select_server(writable_server_selector, session) File "/anaconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1278, in _select_server server = topology.select_server(server_selector) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 243, in select_server address)) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 200, in select_servers selector, server_timeout, address) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 217, in _select_servers_loop (self._error_message(selector), timeout, self.description)) pymongo.errors.ServerSelectionTimeoutError: mongo:27017: [Errno 8] nodename nor servname provided, or not known, Timeout: 30s, Topology Description: <TopologyDescription id: 5fa2e170c0678c332c4a0550, topology_type: Single, servers: [<ServerDescription ('mongo', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mongo:27017: [Errno 8] nodename nor servname provided, or not known')>]> Traceback (most recent call last): File "/anaconda3/bin/rasa", line 8, in sys.exit(main()) File "/anaconda3/lib/python3.7/site-packages/rasa/main.py", line 76, in main cmdline_arguments.func(cmdline_arguments) File "/anaconda3/lib/python3.7/site-packages/rasa/cli/run.py", line 88, in run rasa.run(vars(args)) File "/anaconda3/lib/python3.7/site-packages/rasa/run.py", line 55, in run kwargs File "/anaconda3/lib/python3.7/site-packages/rasa/core/run.py", line 179, in serve_application app.run(host="0.0.0.0", port=port) File "/anaconda3/lib/python3.7/site-packages/sanic/app.py", line 1096, in run serve(server_settings) File "/anaconda3/lib/python3.7/site-packages/sanic/server.py", line 742, in serve trigger_events(before_start, loop) File "/anaconda3/lib/python3.7/site-packages/sanic/server.py", line 604, in trigger_events loop.run_until_complete(result) File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete File "/anaconda3/lib/python3.7/site-packages/rasa/core/run.py", line 206, in load_agent_on_start None, endpoints.tracker_store, _broker File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 44, in find_tracker_store domain=domain, host=store.url, event_broker=event_broker, store.kwargs File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 227, in init self._ensure_indices() File "/anaconda3/lib/python3.7/site-packages/rasa/core/tracker_store.py", line 234, in _ensure_indices self.conversations.create_index("sender_id") File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 2059, in create_index return self.create_indexes([index], session, **cmd_options)[0] File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 1919, in create_indexes with self._socket_for_writes(session) as sock_info: File "/anaconda3/lib/python3.7/site-packages/pymongo/collection.py", line 198, in _socket_for_writes return self.database.client._socket_for_writes(session) File "/anaconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1293, in _socket_for_writes server = self._select_server(writable_server_selector, session) File "/anaconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1278, in _select_server server = topology.select_server(server_selector) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 243, in select_server address)) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 200, in select_servers selector, server_timeout, address) File "/anaconda3/lib/python3.7/site-packages/pymongo/topology.py", line 217, in _select_servers_loop (self._error_message(selector), timeout, self.description)) pymongo.errors.ServerSelectionTimeoutError: mongo:27017: [Errno 8] nodename nor servname provided, or not known, Timeout: 30s, Topology Description: <TopologyDescription id: 5fa2e170c0678c332c4a0550, topology_type: Single, servers: [<ServerDescription ('mongo', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mongo:27017: [Errno 8] nodename nor servname provided, or not known')>]> sys:1: RuntimeWarning: coroutine 'Loop.create_server' was never awaited make: *** [run] Error 1 不知道是否有解决办法

0x10C commented 3 years ago

dockerfile 最后一行 注释掉手动把代码中make train 和make run的错误修改好就行了